Constructors

Properties

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

Methods

  • Parameters

    • OptionalmethodArgs: {
          headers?: { [key: string]: string | string[] };
          queryArgs?: {
              expand?: string | string[];
              limit?: number;
              offset?: number;
              sort?: string | string[];
              where?: string | string[];
              withTotal?: boolean;
              [key: string]: QueryParam;
          };
      }

    Returns ApiRequest<OrderPagedQueryResponse>

  • Before you create an Order, the Cart must have a shipping address set. The shipping address is used for tax calculation for a Cart with Platform TaxMode.

    Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.
    If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned.
    If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number.
    
    Specific Error Codes:
    
    - [OutOfStock](ctp:api:type:OutOfStockError)
    - [PriceChanged](ctp:api:type:PriceChangedError)
    - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
    - [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError)
    - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
    - [InvalidOperation](ctp:api:type:InvalidOperationError)
    - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
    - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
    - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError)
    

    Parameters

    • methodArgs: {
          body: OrderFromCartDraft;
          headers?: { [key: string]: string | string[] };
          queryArgs?: { expand?: string | string[]; [key: string]: QueryParam };
      }

    Returns ApiRequest<Order>