Typescript SDK Type Docs
    Preparing search index...

    Class ByProjectKeyInStoreKeyByStoreKeyOrdersRequestBuilder

    Index

    Constructors

    Properties

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

    Methods

    • Retrieves Orders in a Store.

      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>

    post

    • post(
          methodArgs: {
              body: OrderFromCartDraft;
              headers?: { [key: string]: string | string[] };
              queryArgs?: { expand?: string | string[]; [key: string]: QueryParam };
          },
      ): ApiRequest<Order>

      Creates an Order from a Cart in a Store. The Cart must have a shipping address and an active Shipping Method set.

      The shipping address is used for tax calculation for a Cart with `Platform` [TaxMode](ctp:api:type: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>