Typescript SDK Type Docs
    Preparing search index...

    Class ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    args: {
        baseUri?: string;
        executeRequest: executeRequest;
        pathArgs: { projectKey: string; storeKey: string };
    }

    Methods

    • Retrieves the Customer's most recently modified active Cart in a Store. Returns a 200 status if successful.

      Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored.
      
      A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
      
      - If no active Cart exists.
      - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
      - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
      

      Parameters

      • OptionalmethodArgs: {
            headers?: { [key: string]: string | string[] };
            queryArgs?: { expand?: string | string[]; [key: string]: QueryParam };
        }

      Returns ApiRequest<Cart>

    • Checks if an active Cart exists in a Store. Returns 200 OK status if successful.

      A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
      
      - If no active Cart exists in a Store.
      - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
      - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
      

      Parameters

      • OptionalmethodArgs: { headers?: { [key: string]: string | string[] } }

      Returns ApiRequest<void>