Typescript SDK Type Docs
    Preparing search index...

    Class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyOrdersRequestBuilder

    Index

    Constructors

    Properties

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

    Methods

    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 BusinessUnit.

      The Cart must have a shipping address and an active Shipping Method set.
      
      If the Cart does not reference the same BusinessUnit as the `businessUnitKey` path parameter, an [InvalidOperation](ctp:api:type:InvalidOperationError) is returned.
      
      Specific Error Codes:
      
      - [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError)
      - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError)
      - [OutOfStock](ctp:api:type:OutOfStockError)
      - [PriceChanged](ctp:api:type:PriceChangedError)
      - [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError)
      - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
      - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError)
      

      Parameters

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

      Returns ApiRequest<Order>