Constructors

Properties

Methods

Constructors

Properties

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

Type declaration

  • Optional baseUri?: string
  • executeRequest: executeRequest
  • pathArgs: {
        projectKey: string;
    }
    • projectKey: string

Methods

  • Parameters

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

    Returns ApiRequest<OrderPagedQueryResponse>

  • Checks if an Order exists for a given Query Predicate. Returns a 200 OK status if any Orders match the Query Predicate or a 404 Not Found otherwise.

    Parameters

    • Optional methodArgs: {
          headers?: {
              [key: string]: string | string[];
          };
          queryArgs?: {
              where?: string | string[];
              [key: string]: QueryParam;
          };
      }
      • Optional headers?: {
            [key: string]: string | string[];
        }
        • [key: string]: string | string[]
      • Optional queryArgs?: {
            where?: string | string[];
            [key: string]: QueryParam;
        }
        • [key: string]: QueryParam
        • Optional where?: string | string[]

    Returns ApiRequest<void>

  • The Cart must have a shipping address set for taxes to be calculated. When creating B2B Orders, the Customer must have the CreateMyOrdersFromMyCarts Permission.

    Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message.

    Specific Error Codes:

    - [OutOfStock](ctp:api:type:OutOfStockError)
    - [PriceChanged](ctp:api:type:PriceChangedError)
    - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
    - [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError)

    Parameters

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

    Returns ApiRequest<Order>