Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Orders

Manage order and order payment status.

For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html

Example with admin auth

import { Checkout, ClientConfig } from "commerce-sdk";
// or
const { Checkout, ClientConfig } = require("commerce-sdk");

const clientConfig: ClientConfig = {
  parameters: {
    clientId: "XXXXXX",
    organizationId: "XXXX",
    shortCode: "XXX",
    siteId: "XX"
  }
};

token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' };

clientConfig.headers['authorization'] = `Bearer ${token.access_token}`;
const ordersClient = new Checkout.Orders(clientConfig);
API Version: 1.4.4
Last Updated:

Hierarchy

  • BaseClient
    • Orders

Index

Type aliases

Constructors

Properties

Methods

Type aliases

Static ABTestSegment

ABTestSegment: { segmentId: string; testId: string }

Type declaration

  • segmentId: string
  • testId: string

Static Address

Address: { address1?: string; address2?: string; city?: string; companyName?: string; countryCode?: string; firstName?: string; fullName?: string; jobTitle?: string; lastName?: string; phone?: string; postBox?: string; postalCode?: string; salutation?: string; secondName?: string; stateCode?: string; suffix?: string; suite?: string; title?: string } & {}

Static AsyncCreated

AsyncCreated: {}

Type declaration

Static AttributeDefinition

AttributeDefinition: { defaultValue?: PropertyValueDefinition; description: L10nString; id?: string; key?: boolean; localizable?: boolean; mandatory?: boolean; max?: number; min?: number; minLength?: number; multiValueType?: boolean; name: L10nString; possibleValues?: Array<PropertyValueDefinition>; regularExpression?: string; scale?: number; searchable?: boolean; siteSpecific?: boolean; system?: boolean; type: string; unit?: L10nString; visible?: boolean }

Type declaration

  • Optional defaultValue?: PropertyValueDefinition
  • description: L10nString
  • Optional id?: string
  • Optional key?: boolean
  • Optional localizable?: boolean
  • Optional mandatory?: boolean
  • Optional max?: number
  • Optional min?: number
  • Optional minLength?: number
  • Optional multiValueType?: boolean
  • name: L10nString
  • Optional possibleValues?: Array<PropertyValueDefinition>
  • Optional regularExpression?: string
  • Optional scale?: number
  • Optional searchable?: boolean
  • Optional siteSpecific?: boolean
  • Optional system?: boolean
  • type: string
  • Optional unit?: L10nString
  • Optional visible?: boolean

Static BadRequest

BadRequest: {}

Type declaration

Static BasketReopen

BasketReopen: {}

Type declaration

Static BonusDiscountLineItem

BonusDiscountLineItem: { bonusProducts?: Array<ProductReference>; couponCode?: string; id?: string; maxBonusItems?: number; promotionId?: string } & {}

Static BoolFilter

BoolFilter: { filters?: Array<Filter>; operator: string } & {}

Static BoolQuery

BoolQuery: { must?: Array<Query>; mustNot?: Array<Query>; should?: Array<Query> } & {}

Static CancelOrderConflict

CancelOrderConflict: {}

Type declaration

Static ChangeControlled

ChangeControlled: { createdBy?: string; creationDate?: any; lastModifiedBy?: string; modificationDate?: any } & {}

Static ChangeControlledDataType

ChangeControlledDataType: { createdBy?: string; creationDate?: any; lastModifiedBy?: string; modificationDate?: any } & {}

Static ClosedObject

ClosedObject: {} & {}

Static CouponItem

CouponItem: { code?: string; couponItemId?: string; statusCode?: string; valid?: boolean }

Type declaration

  • Optional code?: string
  • Optional couponItemId?: string
  • Optional statusCode?: string
  • Optional valid?: boolean

Static CreateOrderOptionItem

CreateOrderOptionItem: { basePrice: number; grossPrice: number; itemText?: string; netPrice: number; optionId: string; optionValueId: string; priceAdjustments?: Array<CreateOrderPriceAdjustment>; productId: string; tax: number; taxBasis?: number } & {}

Static CreateOrderPaymentInstrument

CreateOrderPaymentInstrument: { paymentMethodId: string; paymentTransaction?: CreateOrderPaymentTransaction } & {}

Static CreateOrderPaymentTransaction

CreateOrderPaymentTransaction: { amount: number; authorizationStatus?: Status; transactionId: string } & {}

Static CreateOrderPriceAdjustment

CreateOrderPriceAdjustment: { amount?: number; basePrice?: number; grossPrice: number; itemText?: string; netPrice: number; reasonCode?: string; tax: number; taxBasis?: number } & {}

Static CreateOrderProductItems

CreateOrderProductItems: { basePrice: number; brand?: string; grossPrice: number; itemText?: string; netPrice: number; optionItems?: Array<CreateOrderOptionItem>; priceAdjustments?: Array<CreateOrderPriceAdjustment>; productId: string; productName?: string; quantity: number; shipmentId: string; tax: number; taxBasis?: number; taxRate?: number } & {}

Static CreateOrderRequest

CreateOrderRequest: { billingAddress: Address; businessType?: string; channelType?: string; currency: string; customerLocale?: string; orderNo?: string; orderPriceAdjustments?: Array<CreateOrderPriceAdjustment>; orderTotal: number; paymentInstruments: Array<CreateOrderPaymentInstrument>; paymentStatus?: string; productItems: Array<CreateOrderProductItems>; shipments: Array<CreateOrderShipment>; taxTotal: number } & {}

Static CreateOrderShipment

CreateOrderShipment: { shipmentId: string; shippingAddress: Address; shippingMethod: string; shippingTotal: number; taxTotal: number }

Type declaration

  • shipmentId: string
  • shippingAddress: Address
  • shippingMethod: string
  • shippingTotal: number
  • taxTotal: number

Static CustomerInfo

CustomerInfo: { customerId?: string; customerName?: string; customerNo?: string; email?: string; guest?: boolean }

Type declaration

  • Optional customerId?: string
  • Optional customerName?: string
  • Optional customerNo?: string
  • Optional email?: string
  • Optional guest?: boolean

Static DateConditionalRequest

DateConditionalRequest: {}

Type declaration

Static DateRangeFilter

DateRangeFilter: {}

Type declaration

Static DatetimeRangeFilter

DatetimeRangeFilter: {}

Type declaration

Static Discount

Discount: { amount?: number; percentage?: number; priceBookId?: string; type: string }

Type declaration

  • Optional amount?: number
  • Optional percentage?: number
  • Optional priceBookId?: string
  • type: string

Static Error

Error: { detail?: string; instance?: string; title?: string; type: string } & {}

Static ErrorResponse

ErrorResponse: { detail?: string; instance?: string; title?: string; type: string } & {}

Static EtagConditionalRequest

EtagConditionalRequest: {}

Type declaration

Static EtagResponse

EtagResponse: {}

Type declaration

Static Filter

Filter: { boolFilter?: BoolFilter; queryFilter?: QueryFilter; range2Filter?: Range2Filter; rangeFilter?: RangeFilter; termFilter?: TermFilter } & {}

Static FilteredQuery

FilteredQuery: { filter: Filter; query: Query } & {}

Static GiftCertificateItem

GiftCertificateItem: { basePrice?: number; giftCertificateItemId?: string; giftCertificateMerchantId?: string; grossPrice?: number; itemText?: string; message?: string; netPrice?: number; recipientEmail?: string; recipientName?: string; senderName?: string; shipmentId?: string; tax?: number; taxBasis?: number } & {}

Static IntegerRangeFilter

IntegerRangeFilter: {}

Type declaration

Static InvalidCurrency

InvalidCurrency: {}

Type declaration

Static InvalidOrderTotal

InvalidOrderTotal: {}

Type declaration

Static InvalidTaxTotal

InvalidTaxTotal: {}

Type declaration

Static L10nString

L10nString: {} & {}

Static LocalizedString

LocalizedString: {} & {}

Static MatchAllQuery

MatchAllQuery: {} & {}

Static Money

Money: { currencyMnemonic?: string; value?: number } & {}

Static MoneyMnemonic

MoneyMnemonic: { currencyMnemonic?: string; value?: number } & {}

Static NestedQuery

NestedQuery: { path: string; query: Query; scoreMode?: string } & {}

Static NoContent

NoContent: {}

Type declaration

Static NoPropertiesAllowed

NoPropertiesAllowed: {}

Type declaration

Static NumericRangeFilter

NumericRangeFilter: {}

Type declaration

Static OffsetPaginated

OffsetPaginated: {}

Type declaration

Static OpenObject

OpenObject: {} & {}

Static OptionItem

OptionItem: { basePrice?: number; gift?: boolean; grossPrice?: number; itemText?: string; netPrice?: number; optionId?: string; optionValueId?: string; priceAdjustments?: Array<PriceAdjustment>; productId: string; tax?: number; taxBasis?: number } & {}

Static Order

Order: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; affiliatePartnerId?: string; affiliatePartnerName?: string; billingAddress?: Address; bonusDiscountLineItems?: Array<BonusDiscountLineItem>; businessType?: string; cancelCode?: string; cancelDescription?: string; channelType?: string; confirmationStatus?: string; couponItems?: Array<CouponItem>; createdBy?: string; creationDate?: any; currency?: string; customerInfo?: CustomerInfo; customerLocale?: string; customerOrderReference?: string; exportStatus?: string; externalOrderNo?: string; externalOrderStatus?: string; externalOrderText?: string; giftCertificateItems?: Array<GiftCertificateItem>; globalPartyId?: string; invoiceNo?: string; lastModified?: any; merchandizeTotalTax?: number; notes?: Array<OrderNote>; orderNo: string; orderPriceAdjustments?: Array<PriceAdjustment>; orderTotal?: number; paymentInstruments?: Array<PaymentInstrument>; paymentStatus?: string; placeDate?: any; productItems?: Array<ProductItem>; productSubTotal?: number; productTotal?: number; remoteHost?: string; shipments?: Array<Shipment>; shippingItems?: Array<ShippingItem>; shippingStatus?: string; shippingTotal?: number; shippingTotalTax?: number; siteId?: string; sourceCode?: string; sourceCodeGroupId?: string; status?: string; taxTotal?: number; taxation?: string } & {}

Static OrderConfirmationStatusUpdateRequest

OrderConfirmationStatusUpdateRequest: { status: string }

Type declaration

  • status: string

Static OrderCreated

OrderCreated: {}

Type declaration

Static OrderExportStatusUpdateRequest

OrderExportStatusUpdateRequest: { status: string }

Type declaration

  • status: string

Static OrderExternalStatusUpdateRequest

OrderExternalStatusUpdateRequest: { status: string }

Type declaration

  • status: string

Static OrderNotFound

OrderNotFound: {}

Type declaration

Static OrderNote

OrderNote: { createdBy?: string; creationDate?: any; subject?: string; text?: string }

Type declaration

  • Optional createdBy?: string
  • Optional creationDate?: any
  • Optional subject?: string
  • Optional text?: string

Static OrderPaymentStatusUpdateRequest

OrderPaymentStatusUpdateRequest: { status: string }

Type declaration

  • status: string

Static OrderShippingStatusUpdateRequest

OrderShippingStatusUpdateRequest: { status: string }

Type declaration

  • status: string

Static OrderStatusUpdateRequest

OrderStatusUpdateRequest: { status: string }

Type declaration

  • status: string

Static OrderUpdateRequest

OrderUpdateRequest: {} & {}

Static OrdersResponse

OrdersResponse: { data: Array<Order> }

Type declaration

Static PaginatedSearchResult

PaginatedSearchResult: { hits?: Array<object>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static PaginatedSearchResultBase

PaginatedSearchResultBase: { hits?: Array<object>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static PaymentCard

PaymentCard: { cardType?: string; creditCardExpired?: boolean; creditCardToken?: string; expirationMonth?: number; expirationYear?: number; holder?: string; issueNumber?: string; maskedNumber?: string; numberLastDigits?: string; validFromMonth?: number; validFromYear?: number }

Type declaration

  • Optional cardType?: string
  • Optional creditCardExpired?: boolean
  • Optional creditCardToken?: string
  • Optional expirationMonth?: number
  • Optional expirationYear?: number
  • Optional holder?: string
  • Optional issueNumber?: string
  • Optional maskedNumber?: string
  • Optional numberLastDigits?: string
  • Optional validFromMonth?: number
  • Optional validFromYear?: number

Static PaymentInstrument

PaymentInstrument: { bankRoutingNumber?: string; maskedGiftCertificateCode?: string; paymentCard?: PaymentCard; paymentInstrumentId?: string; paymentMethodId?: string; paymentTransaction?: PaymentTransaction } & {}

Static PaymentInstrumentNotFound

PaymentInstrumentNotFound: {}

Type declaration

Static PaymentInstrumentUpdateRequest

PaymentInstrumentUpdateRequest: {} & {}

Static PaymentTransaction

PaymentTransaction: { amount?: number; authorizationStatus?: Status; transactionId?: string } & {}

Static PaymentTransactionUpdateRequest

PaymentTransactionUpdateRequest: {} & {}

Static PlaceOrderConflict

PlaceOrderConflict: {}

Type declaration

Static PriceAdjustment

PriceAdjustment: { abTestSegment?: ABTestSegment; appliedDiscount?: Discount; basePrice?: number; campaignId?: string; couponCode?: string; createdBy?: string; creationDate?: any; custom?: boolean; grossPrice?: number; itemText?: string; lastModified?: any; manual?: boolean; netPrice?: number; priceAdjustmentId?: string; promotionId: string; reasonCode?: string; tax?: number; taxBasis?: number } & {}

Static ProductItem

ProductItem: { adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; brand?: string; bundledProductItems?: Array<ProductItem>; externalLineItemStatus?: string; externalLineItemText?: string; gift?: boolean; giftMessage?: string; grossPrice?: number; inventoryId?: string; itemId?: string; itemText?: string; minOrderQuantity?: number; netPrice?: number; optionItems?: Array<OptionItem>; position?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId: string; shippingItemId?: string; stepQuantity?: number; tax?: number; taxBasis?: number; taxRate: number } & {}

Static ProductListItemReference

ProductListItemReference: { id?: string; priority?: number; product?: ProductReference; productList?: ProductListReference; public?: boolean; purchasedQuantity: number; quantity?: number; type?: string }

Type declaration

  • Optional id?: string
  • Optional priority?: number
  • Optional product?: ProductReference
  • Optional productList?: ProductListReference
  • Optional public?: boolean
  • purchasedQuantity: number
  • Optional quantity?: number
  • Optional type?: string

Static ProductListReference

ProductListReference: { description?: string; name?: string; public?: boolean; type?: string }

Type declaration

  • Optional description?: string
  • Optional name?: string
  • Optional public?: boolean
  • Optional type?: string

Static ProductReference

ProductReference: { productId?: string; productName?: string }

Type declaration

  • Optional productId?: string
  • Optional productName?: string

Static PropertyDefinition

PropertyDefinition: { defaultValue?: PropertyValueDefinition; description: L10nString; id?: string; key?: boolean; localizable?: boolean; mandatory?: boolean; max?: number; min?: number; minLength?: number; multiValueType?: boolean; name: L10nString; possibleValues?: Array<PropertyValueDefinition>; regularExpression?: string; scale?: number; searchable?: boolean; siteSpecific?: boolean; system?: boolean; type: string; unit?: L10nString; visible?: boolean } & {}

Static PropertyValueDefinition

PropertyValueDefinition: { description: L10nString; displayValue: L10nString; id: string; position?: number; value: string }

Type declaration

  • description: L10nString
  • displayValue: L10nString
  • id: string
  • Optional position?: number
  • value: string

Static Query

Query: { boolQuery?: BoolQuery; filteredQuery?: FilteredQuery; matchAllQuery?: MatchAllQuery; nestedQuery?: NestedQuery; termQuery?: TermQuery; textQuery?: TextQuery } & {}

Static QueryFilter

QueryFilter: { query: Query } & {}

Static QueryParamsLimit

QueryParamsLimit: {}

Type declaration

Static QueryParamsOffset

QueryParamsOffset: {}

Type declaration

Static Range2Filter

Range2Filter: { filterMode?: string; fromField: string; fromInclusive?: boolean; fromValue?: any; toField: string; toInclusive?: boolean; toValue?: any } & {}

Static RangeFilter

RangeFilter: { field: string; from?: any; fromInclusive?: boolean; to?: any; toInclusive?: boolean } & {}

Static RateLimited

RateLimited: {}

Type declaration

Static RateLimited2

RateLimited2: {}

Type declaration

Static RateLimited3

RateLimited3: {}

Type declaration

Static RateLimited4

RateLimited4: {}

Type declaration

Static RateLimited5

RateLimited5: {}

Type declaration

Static SearchRequest

SearchRequest: { limit?: number; offset?: any; query: Query; sorts?: Array<Sort> } & {}

Static SearchRequestBase

SearchRequestBase: { limit?: number; offset?: any; query: Query; sorts?: Array<Sort> } & {}

Static Selectable

Selectable: {}

Type declaration

Static Shipment

Shipment: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; gift?: boolean; giftMessage?: string; merchandizeTotalTax?: number; productSubTotal?: number; productTotal?: number; shipmentId: string; shipmentNo: string; shipmentTotal?: number; shippingAddress?: Address; shippingMethod?: ShippingMethodReference; shippingStatus?: string; shippingTotal?: number; shippingTotalTax?: number; taxTotal?: number; trackingNumber?: string } & {}

Static ShipmentNotFound

ShipmentNotFound: {}

Type declaration

Static ShippingAddressUpdateRequest

ShippingAddressUpdateRequest: {} & {}

Static ShippingItem

ShippingItem: { adjustedTax?: number; basePrice?: number; grossPrice?: number; itemId?: string; itemText?: string; netPrice?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; shipmentId?: string; tax?: number; taxBasis?: number; taxRate: number; type?: string } & {}

Static ShippingMethodReference

ShippingMethodReference: { id?: string }

Type declaration

  • Optional id?: string

Static SimpleSearchResult

SimpleSearchResult: { hits?: Array<object>; limit: number; offset: any; total: any } & {}

Static SimpleSearchResultBase

SimpleSearchResultBase: { hits?: Array<object>; limit: number; offset: any; total: any } & {}

Static SiteNotFound

SiteNotFound: {}

Type declaration

Static SiteSpecific

SiteSpecific: {}

Type declaration

Static Sort

Sort: { field: string; sortOrder?: string } & {}

Static SpecifiedPropertiesAllowed

SpecifiedPropertiesAllowed: {} & {}

Static Status

Status: { code?: string; message?: string; status?: number }

Type declaration

  • Optional code?: string
  • Optional message?: string
  • Optional status?: number

Static StatusTransitionConflict

StatusTransitionConflict: {}

Type declaration

Static SyncCreated

SyncCreated: {}

Type declaration

Static TermFilter

TermFilter: { field: string; operator: string; values?: Array<any> } & {}

Static TermQuery

TermQuery: { fields: Array<string>; operator: string; values?: Array<any> } & {}

Static TextQuery

TextQuery: { fields: Array<string>; searchPhrase: string } & {}

Static UndoCancelOrderConflict

UndoCancelOrderConflict: {}

Type declaration

Static UndoFailOrderConflict

UndoFailOrderConflict: {}

Type declaration

Constructors

constructor

  • new Orders(config: ClientConfig): Orders
  • Parameters

    • config: ClientConfig

    Returns Orders

Properties

clientConfig

clientConfig: ClientConfig

Methods

createOrders

  • createOrders(options: { body: CreateOrderRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • createOrders<T>(options: { body: CreateOrderRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Use this endpoint whenever a fully calculated and paid or authorized order is created in any third-party system.

    The endpoint can create an order on-the-fly in the Commerce Cloud platform by passing the order as JSON payload in the body of the POST request.

    Other than the Basket API, this endpoint decouples any relation to other system domains, such as:

    • Products
    • Inventory
    • Promotions
    • Gift certificates
    • Coupons

    The order isn't treated differently than any other orders in the Commerce Cloud platform, and any status updates or order exports behave the same.

    Note*: For the custom attribute to be available for orders, configure it in Business Manager for both Basket and Order objects.

    Important*: This endpoint uses the ShopperTokenTsob security scheme. Always check the Security section of the endpoint documentation, which is hidden by default.

    Preconditions

    The checkout must happen before making a request to this endpoint. That means that all sanity checks are applied, the inventory is reserved, the payment is authorized, and the Basket is fully calculated (including all promotions).

    When meeting these conditions, it's possible to create the order in the Commerce Cloud platform.

    Decoupling

    This endpoint can create an order with unknown products, with different pricing for known products, any unplanned price-adjustments (unrelated to the system's configured promotions), passing unknown payment, and shipping methods.

    Note*: There's no lookup or calculation, even if the passed object is configured in the platform.

    Still Coupled

    The endpoint is still coupled to the following:

    • the taxation policy (gross or net) is used from the site's preferences.
    • the passed currency must be defined in the site.

    Calculation

    There's no multiplying or dividing operations performed by the platform on this order.

    The following fields are summed up during runtime on the platform:

    Order Level*

    • adjustedMerchandizeTotalTax
    • adjustedShippingTotalTax
    • merchandizeTotalTax
    • adjustedTax
    • productSubTotal
    • productTotal
    • shippingTotalTax
    • orderTotal
    • taxTotal

    Line Item Level*

    • priceAfterItemDiscount
    • priceAfterOrderDiscount
    • adjustedTax

    Shipment*

    • merchandizeTotalTax
    • productSubTotal
    • productTotal
    • shippingTotalTax

    To make sure the fields are summed up correctly, the passed orderTotal and taxTotal are compared to the platform's summed up orderTotal and taxTotal.

    An InvalidOrderTotalException or InvalidTaxTotalException is thrown if the calculation doesn't match.

    The orderTotal and taxTotal are calculated as follows:

    • orderTotal = sum(ProductLineItems.grossPrice) + sum(Shipments.shipmentTotal) - sum(ProductLineItems.PriceAdjustments.grossPrice + Order.PriceAdjustments.grossPrice)
    • taxTotal = sum (ProductLineItems.tax) + sum(Shipments.taxTotal) - sum(ProductLineItems.PriceAdjustments.tax + Order.PriceAdjustments.tax)

    Order Status

    The order is automatically placed after creation.

    The payment status can be set via payload.

    All other status can be set via PATCH orders/\{orderNo\}/status.

    If you would like to get a raw Response object use the other createOrders function.

    Parameters

    • options: { body: CreateOrderRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: CreateOrderRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Use this endpoint whenever a fully calculated and paid or authorized order is created in any third-party system.

    The endpoint can create an order on-the-fly in the Commerce Cloud platform by passing the order as JSON payload in the body of the POST request.

    Other than the Basket API, this endpoint decouples any relation to other system domains, such as:

    • Products
    • Inventory
    • Promotions
    • Gift certificates
    • Coupons

    The order isn't treated differently than any other orders in the Commerce Cloud platform, and any status updates or order exports behave the same.

    Note*: For the custom attribute to be available for orders, configure it in Business Manager for both Basket and Order objects.

    Important*: This endpoint uses the ShopperTokenTsob security scheme. Always check the Security section of the endpoint documentation, which is hidden by default.

    Preconditions

    The checkout must happen before making a request to this endpoint. That means that all sanity checks are applied, the inventory is reserved, the payment is authorized, and the Basket is fully calculated (including all promotions).

    When meeting these conditions, it's possible to create the order in the Commerce Cloud platform.

    Decoupling

    This endpoint can create an order with unknown products, with different pricing for known products, any unplanned price-adjustments (unrelated to the system's configured promotions), passing unknown payment, and shipping methods.

    Note*: There's no lookup or calculation, even if the passed object is configured in the platform.

    Still Coupled

    The endpoint is still coupled to the following:

    • the taxation policy (gross or net) is used from the site's preferences.
    • the passed currency must be defined in the site.

    Calculation

    There's no multiplying or dividing operations performed by the platform on this order.

    The following fields are summed up during runtime on the platform:

    Order Level*

    • adjustedMerchandizeTotalTax
    • adjustedShippingTotalTax
    • merchandizeTotalTax
    • adjustedTax
    • productSubTotal
    • productTotal
    • shippingTotalTax
    • orderTotal
    • taxTotal

    Line Item Level*

    • priceAfterItemDiscount
    • priceAfterOrderDiscount
    • adjustedTax

    Shipment*

    • merchandizeTotalTax
    • productSubTotal
    • productTotal
    • shippingTotalTax

    To make sure the fields are summed up correctly, the passed orderTotal and taxTotal are compared to the platform's summed up orderTotal and taxTotal.

    An InvalidOrderTotalException or InvalidTaxTotalException is thrown if the calculation doesn't match.

    The orderTotal and taxTotal are calculated as follows:

    • orderTotal = sum(ProductLineItems.grossPrice) + sum(Shipments.shipmentTotal) - sum(ProductLineItems.PriceAdjustments.grossPrice + Order.PriceAdjustments.grossPrice)
    • taxTotal = sum (ProductLineItems.tax) + sum(Shipments.taxTotal) - sum(ProductLineItems.PriceAdjustments.tax + Order.PriceAdjustments.tax)

    Order Status

    The order is automatically placed after creation.

    The payment status can be set via payload.

    All other status can be set via PATCH orders/\{orderNo\}/status.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: CreateOrderRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: CreateOrderRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

getOrder

  • getOrder(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Order>
  • getOrder<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Orders.Order>
  • Returns the details of the order with the specified order number.

    If you would like to get a raw Response object use the other getOrder function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Order>

    A promise of type Orders.Order.

  • Returns the details of the order with the specified order number.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Orders.Order>

    A promise of type Response if rawResponse is true, a promise of type Orders.Order otherwise.

getOrders

  • getOrders(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { confirmationStatus?: string; creationDateFrom?: any; creationDateTo?: any; exportStatus?: string; externalStatus?: string; lastModifiedDateFrom?: any; lastModifiedDateTo?: any; limit?: number; offset?: any; organizationId?: string; paymentStatus?: string; shippingStatus?: string; siteId?: string; sortBy?: string; sortOrder?: string; status?: string } & {}; retrySettings?: OperationOptions }): Promise<OrdersResponse>
  • getOrders<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { confirmationStatus?: string; creationDateFrom?: any; creationDateTo?: any; exportStatus?: string; externalStatus?: string; lastModifiedDateFrom?: any; lastModifiedDateTo?: any; limit?: number; offset?: any; organizationId?: string; paymentStatus?: string; shippingStatus?: string; siteId?: string; sortBy?: string; sortOrder?: string; status?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : Orders.OrdersResponse>
  • Returns the details of orders that match the query filters. By default, calling this API with no filter returns the 100 most recently created orders. To return up to 200 orders, use the limit parameter. To return a page of results past the first page, use a resource offset. Note : The sum of the offset and limit parameters cannot be greater than 10000.

    If you would like to get a raw Response object use the other getOrders function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { confirmationStatus?: string; creationDateFrom?: any; creationDateTo?: any; exportStatus?: string; externalStatus?: string; lastModifiedDateFrom?: any; lastModifiedDateTo?: any; limit?: number; offset?: any; organizationId?: string; paymentStatus?: string; shippingStatus?: string; siteId?: string; sortBy?: string; sortOrder?: string; status?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { confirmationStatus?: string; creationDateFrom?: any; creationDateTo?: any; exportStatus?: string; externalStatus?: string; lastModifiedDateFrom?: any; lastModifiedDateTo?: any; limit?: number; offset?: any; organizationId?: string; paymentStatus?: string; shippingStatus?: string; siteId?: string; sortBy?: string; sortOrder?: string; status?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<OrdersResponse>

    A promise of type Orders.OrdersResponse.

  • Returns the details of orders that match the query filters. By default, calling this API with no filter returns the 100 most recently created orders. To return up to 200 orders, use the limit parameter. To return a page of results past the first page, use a resource offset. Note : The sum of the offset and limit parameters cannot be greater than 10000.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { confirmationStatus?: string; creationDateFrom?: any; creationDateTo?: any; exportStatus?: string; externalStatus?: string; lastModifiedDateFrom?: any; lastModifiedDateTo?: any; limit?: number; offset?: any; organizationId?: string; paymentStatus?: string; shippingStatus?: string; siteId?: string; sortBy?: string; sortOrder?: string; status?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { confirmationStatus?: string; creationDateFrom?: any; creationDateTo?: any; exportStatus?: string; externalStatus?: string; lastModifiedDateFrom?: any; lastModifiedDateTo?: any; limit?: number; offset?: any; organizationId?: string; paymentStatus?: string; shippingStatus?: string; siteId?: string; sortBy?: string; sortOrder?: string; status?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : Orders.OrdersResponse>

    A promise of type Response if rawResponse is true, a promise of type Orders.OrdersResponse otherwise.

updateOrder

  • updateOrder(options: { body: OrderUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrder<T>(options: { body: OrderUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the order.

    If you would like to get a raw Response object use the other updateOrder function.

    Parameters

    • options: { body: OrderUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the order.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderConfirmationStatus

  • updateOrderConfirmationStatus(options: { body: OrderConfirmationStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderConfirmationStatus<T>(options: { body: OrderConfirmationStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the order confirmation status.

    If you would like to get a raw Response object use the other updateOrderConfirmationStatus function.

    Parameters

    • options: { body: OrderConfirmationStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderConfirmationStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the order confirmation status.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderConfirmationStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderConfirmationStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderExportStatus

  • updateOrderExportStatus(options: { body: OrderExportStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderExportStatus<T>(options: { body: OrderExportStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the order export status. If on-order inventory is turned on for the associated inventory list, then setting the export status to EXPORTED finalizes on-order inventory transactions for this order by changing their type from on-order to final.

    If you would like to get a raw Response object use the other updateOrderExportStatus function.

    Parameters

    • options: { body: OrderExportStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderExportStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the order export status. If on-order inventory is turned on for the associated inventory list, then setting the export status to EXPORTED finalizes on-order inventory transactions for this order by changing their type from on-order to final.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderExportStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderExportStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderExternalStatus

  • updateOrderExternalStatus(options: { body: OrderExternalStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderExternalStatus<T>(options: { body: OrderExternalStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the order external status.

    If you would like to get a raw Response object use the other updateOrderExternalStatus function.

    Parameters

    • options: { body: OrderExternalStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderExternalStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the order external status.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderExternalStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderExternalStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderPaymentInstrument

  • updateOrderPaymentInstrument(options: { body: PaymentInstrumentUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderPaymentInstrument<T>(options: { body: PaymentInstrumentUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the payment instrument of an order.

    If you would like to get a raw Response object use the other updateOrderPaymentInstrument function.

    Parameters

    • options: { body: PaymentInstrumentUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: PaymentInstrumentUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the payment instrument of an order.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: PaymentInstrumentUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: PaymentInstrumentUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderPaymentStatus

  • updateOrderPaymentStatus(options: { body: OrderPaymentStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderPaymentStatus<T>(options: { body: OrderPaymentStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the order payment status.

    If you would like to get a raw Response object use the other updateOrderPaymentStatus function.

    Parameters

    • options: { body: OrderPaymentStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the order payment status.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderPaymentStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderPaymentTransaction

  • updateOrderPaymentTransaction(options: { body: PaymentTransactionUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderPaymentTransaction<T>(options: { body: PaymentTransactionUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the transaction of an order payment instrument.

    If you would like to get a raw Response object use the other updateOrderPaymentTransaction function.

    Parameters

    • options: { body: PaymentTransactionUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: PaymentTransactionUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the transaction of an order payment instrument.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: PaymentTransactionUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: PaymentTransactionUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderShippingAddress

  • updateOrderShippingAddress(options: { body: ShippingAddressUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderShippingAddress<T>(options: { body: ShippingAddressUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Creates or replaces the shipping address.

    If you would like to get a raw Response object use the other updateOrderShippingAddress function.

    Parameters

    • options: { body: ShippingAddressUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: ShippingAddressUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; shipmentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Creates or replaces the shipping address.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: ShippingAddressUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: ShippingAddressUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; shipmentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderShippingStatus

  • updateOrderShippingStatus(options: { body: OrderShippingStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • updateOrderShippingStatus<T>(options: { body: OrderShippingStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Updates the order shipping status.

    If you would like to get a raw Response object use the other updateOrderShippingStatus function.

    Parameters

    • options: { body: OrderShippingStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderShippingStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void>

    A promise of type void.

  • Updates the order shipping status.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderShippingStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderShippingStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void>

    A promise of type Response if rawResponse is true, a promise of type void otherwise.

updateOrderStatus

  • updateOrderStatus(options: { body: OrderStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void | void>
  • updateOrderStatus<T>(options: { body: OrderStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void | void>
  • Updates the order status. Orders in status NEW, COMPLETED or CANCELLED can't be changed to status CREATED or FAILED.

    Changing the status processes different actions on inventory, coupons, wishlists and the order itself. Here are the supported actions:

    • Fail Order: Release inventory and remove coupon redemptions. (CREATED -> FAILED)
    • Fail Order With Reopen Basket: Release inventory, remove coupon redemptions, and reopen the basket, if applicable. A basket can only be reopened if no other basket for the customer exists at the moment of failing the order since a customer is limited to 1 storefront basket at a time. (CREATED -> FAILED)
    • Undo Fail Order: Reserve inventory and recreate coupon redemptions. (FAILED -> CREATED)
    • Place Order: Generate Shipment and Invoice numbers. (CREATED -> NEW, COMPLETED or CANCELLED)
    • Cancel Order: Release inventory, remove wishlist purchases, and remove coupon redemptions. (NEW, COMPLETED -> CANCELLED)
    • Undo Cancel Order: Reserve inventory, add wishlist purchases, and recreate coupon redemptions. (CANCELLED -> NEW, COMPLETED)

    Actions can fail for example when inventory is not available anymore.

    If you would like to get a raw Response object use the other updateOrderStatus function.

    Parameters

    • options: { body: OrderStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<void | void>

    A promise of type void | void.

  • Updates the order status. Orders in status NEW, COMPLETED or CANCELLED can't be changed to status CREATED or FAILED.

    Changing the status processes different actions on inventory, coupons, wishlists and the order itself. Here are the supported actions:

    • Fail Order: Release inventory and remove coupon redemptions. (CREATED -> FAILED)
    • Fail Order With Reopen Basket: Release inventory, remove coupon redemptions, and reopen the basket, if applicable. A basket can only be reopened if no other basket for the customer exists at the moment of failing the order since a customer is limited to 1 storefront basket at a time. (CREATED -> FAILED)
    • Undo Fail Order: Reserve inventory and recreate coupon redemptions. (FAILED -> CREATED)
    • Place Order: Generate Shipment and Invoice numbers. (CREATED -> NEW, COMPLETED or CANCELLED)
    • Cancel Order: Release inventory, remove wishlist purchases, and remove coupon redemptions. (NEW, COMPLETED -> CANCELLED)
    • Undo Cancel Order: Reserve inventory, add wishlist purchases, and recreate coupon redemptions. (CANCELLED -> NEW, COMPLETED)

    Actions can fail for example when inventory is not available anymore.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderStatusUpdateRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderStatusUpdateRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : void | void>

    A promise of type Response if rawResponse is true, a promise of type void | void otherwise.

Generated using TypeDoc