Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShopperBaskets<ConfigParameters>

Build a checkout experience.

Simple example:

  import { ShopperBaskets } from "commerce-sdk-isomorphic";

  const clientConfig = {
    parameters: {
      clientId: "XXXXXX",
      organizationId: "XXXX",
      shortCode: "XXX",
      siteId: "XX"
    }
  };
  const shopperBasketsClient = new ShopperBaskets(clientConfig);
API Version: 2.0.9
Last Updated:

Type parameters

Hierarchy

  • ShopperBaskets

Index

Constructors

constructor

Properties

clientConfig

clientConfig: ClientConfig<ConfigParameters> & { baseUri: string }

Static Readonly defaultBaseUri

defaultBaseUri: "https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}" = "https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}"

Static Readonly paramKeys

paramKeys: { addCouponToBasket: ["organizationId", "basketId", "siteId", "locale"]; addCouponToBasketRequired: ["organizationId", "basketId", "siteId"]; addGiftCertificateItemToBasket: ["organizationId", "basketId", "siteId", "locale"]; addGiftCertificateItemToBasketRequired: ["organizationId", "basketId", "siteId"]; addItemToBasket: ["organizationId", "basketId", "siteId", "locale"]; addItemToBasketRequired: ["organizationId", "basketId", "siteId"]; addPaymentInstrumentToBasket: ["organizationId", "basketId", "siteId", "locale"]; addPaymentInstrumentToBasketRequired: ["organizationId", "basketId", "siteId"]; addPriceAdjustmentToBasket: ["organizationId", "basketId", "siteId", "locale"]; addPriceAdjustmentToBasketRequired: ["organizationId", "basketId", "siteId"]; addPriceBooksToBasket: ["organizationId", "basketId", "siteId"]; addPriceBooksToBasketRequired: ["organizationId", "basketId", "siteId"]; addTaxesForBasket: ["organizationId", "basketId", "siteId"]; addTaxesForBasketItem: ["organizationId", "basketId", "itemId", "siteId"]; addTaxesForBasketItemRequired: ["organizationId", "basketId", "itemId", "siteId"]; addTaxesForBasketRequired: ["organizationId", "basketId", "siteId"]; createBasket: ["organizationId", "taxMode", "temporary", "siteId", "locale"]; createBasketRequired: ["organizationId", "siteId"]; createShipmentForBasket: ["organizationId", "basketId", "siteId", "locale"]; createShipmentForBasketRequired: ["organizationId", "basketId", "siteId"]; deleteBasket: ["organizationId", "basketId", "siteId"]; deleteBasketRequired: ["organizationId", "basketId", "siteId"]; getBasket: ["organizationId", "basketId", "siteId", "locale"]; getBasketRequired: ["organizationId", "basketId", "siteId"]; getPaymentMethodsForBasket: ["organizationId", "basketId", "siteId", "locale"]; getPaymentMethodsForBasketRequired: ["organizationId", "basketId", "siteId"]; getPriceBooksForBasket: ["organizationId", "basketId", "siteId"]; getPriceBooksForBasketRequired: ["organizationId", "basketId", "siteId"]; getShippingMethodsForShipment: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]; getShippingMethodsForShipmentRequired: ["organizationId", "basketId", "shipmentId", "siteId"]; getTaxesFromBasket: ["organizationId", "basketId", "siteId"]; getTaxesFromBasketRequired: ["organizationId", "basketId", "siteId"]; mergeBasket: ["organizationId", "createDestinationBasket", "productItemMergeMode", "siteId", "locale"]; mergeBasketRequired: ["organizationId", "siteId"]; removeCouponFromBasket: ["organizationId", "basketId", "couponItemId", "siteId", "locale"]; removeCouponFromBasketRequired: ["organizationId", "basketId", "couponItemId", "siteId"]; removeGiftCertificateItemFromBasket: ["organizationId", "basketId", "giftCertificateItemId", "siteId", "locale"]; removeGiftCertificateItemFromBasketRequired: ["organizationId", "basketId", "giftCertificateItemId", "siteId"]; removeItemFromBasket: ["organizationId", "basketId", "itemId", "siteId", "locale"]; removeItemFromBasketRequired: ["organizationId", "basketId", "itemId", "siteId"]; removePaymentInstrumentFromBasket: ["organizationId", "basketId", "paymentInstrumentId", "siteId", "locale"]; removePaymentInstrumentFromBasketRequired: ["organizationId", "basketId", "paymentInstrumentId", "siteId"]; removePriceAdjustmentFromBasket: ["organizationId", "basketId", "priceAdjustmentId", "siteId", "locale"]; removePriceAdjustmentFromBasketRequired: ["organizationId", "basketId", "priceAdjustmentId", "siteId"]; removeShipmentFromBasket: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]; removeShipmentFromBasketRequired: ["organizationId", "basketId", "shipmentId", "siteId"]; transferBasket: ["organizationId", "overrideExisting", "siteId", "locale"]; transferBasketRequired: ["organizationId", "siteId"]; updateAsAgentBasket: ["organizationId", "basketId", "siteId", "locale"]; updateAsAgentBasketRequired: ["organizationId", "basketId", "siteId"]; updateAsStorefrontBasket: ["organizationId", "basketId", "exchange", "siteId", "locale"]; updateAsStorefrontBasketRequired: ["organizationId", "basketId", "siteId"]; updateBasket: ["organizationId", "basketId", "removeExternalTax", "siteId", "locale"]; updateBasketRequired: ["organizationId", "basketId", "siteId"]; updateBillingAddressForBasket: ["organizationId", "basketId", "useAsShipping", "removeExternalTax", "siteId", "locale"]; updateBillingAddressForBasketRequired: ["organizationId", "basketId", "siteId"]; updateCustomerForBasket: ["organizationId", "basketId", "siteId", "locale"]; updateCustomerForBasketRequired: ["organizationId", "basketId", "siteId"]; updateGiftCertificateItemInBasket: ["organizationId", "basketId", "giftCertificateItemId", "siteId", "locale"]; updateGiftCertificateItemInBasketRequired: ["organizationId", "basketId", "giftCertificateItemId", "siteId"]; updateItemInBasket: ["organizationId", "basketId", "itemId", "removeExternalTax", "siteId", "locale"]; updateItemInBasketRequired: ["organizationId", "basketId", "itemId", "siteId"]; updateItemsInBasket: ["organizationId", "basketId", "removeExternalTax", "siteId", "locale"]; updateItemsInBasketRequired: ["organizationId", "basketId", "siteId"]; updatePaymentInstrumentInBasket: ["organizationId", "basketId", "paymentInstrumentId", "removeExternalTax", "siteId", "locale"]; updatePaymentInstrumentInBasketRequired: ["organizationId", "basketId", "paymentInstrumentId", "siteId"]; updatePriceAdjustmentInBasket: ["organizationId", "basketId", "priceAdjustmentId", "siteId"]; updatePriceAdjustmentInBasketRequired: ["organizationId", "basketId", "priceAdjustmentId", "siteId"]; updateShipmentForBasket: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]; updateShipmentForBasketRequired: ["organizationId", "basketId", "shipmentId", "siteId"]; updateShippingAddressForShipment: ["organizationId", "basketId", "shipmentId", "useAsBilling", "removeExternalTax", "siteId", "locale"]; updateShippingAddressForShipmentRequired: ["organizationId", "basketId", "shipmentId", "siteId"]; updateShippingMethodForShipment: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]; updateShippingMethodForShipmentRequired: ["organizationId", "basketId", "shipmentId", "siteId"] } = {createBasket: ['organizationId','taxMode','temporary','siteId','locale',],createBasketRequired: ['organizationId','siteId',],transferBasket: ['organizationId','overrideExisting','siteId','locale',],transferBasketRequired: ['organizationId','siteId',],mergeBasket: ['organizationId','createDestinationBasket','productItemMergeMode','siteId','locale',],mergeBasketRequired: ['organizationId','siteId',],deleteBasket: ['organizationId','basketId','siteId',],deleteBasketRequired: ['organizationId','basketId','siteId',],getBasket: ['organizationId','basketId','siteId','locale',],getBasketRequired: ['organizationId','basketId','siteId',],updateBasket: ['organizationId','basketId','removeExternalTax','siteId','locale',],updateBasketRequired: ['organizationId','basketId','siteId',],updateAsAgentBasket: ['organizationId','basketId','siteId','locale',],updateAsAgentBasketRequired: ['organizationId','basketId','siteId',],updateBillingAddressForBasket: ['organizationId','basketId','useAsShipping','removeExternalTax','siteId','locale',],updateBillingAddressForBasketRequired: ['organizationId','basketId','siteId',],addCouponToBasket: ['organizationId','basketId','siteId','locale',],addCouponToBasketRequired: ['organizationId','basketId','siteId',],removeCouponFromBasket: ['organizationId','basketId','couponItemId','siteId','locale',],removeCouponFromBasketRequired: ['organizationId','basketId','couponItemId','siteId',],updateCustomerForBasket: ['organizationId','basketId','siteId','locale',],updateCustomerForBasketRequired: ['organizationId','basketId','siteId',],addGiftCertificateItemToBasket: ['organizationId','basketId','siteId','locale',],addGiftCertificateItemToBasketRequired: ['organizationId','basketId','siteId',],removeGiftCertificateItemFromBasket: ['organizationId','basketId','giftCertificateItemId','siteId','locale',],removeGiftCertificateItemFromBasketRequired: ['organizationId','basketId','giftCertificateItemId','siteId',],updateGiftCertificateItemInBasket: ['organizationId','basketId','giftCertificateItemId','siteId','locale',],updateGiftCertificateItemInBasketRequired: ['organizationId','basketId','giftCertificateItemId','siteId',],addItemToBasket: ['organizationId','basketId','siteId','locale',],addItemToBasketRequired: ['organizationId','basketId','siteId',],updateItemsInBasket: ['organizationId','basketId','removeExternalTax','siteId','locale',],updateItemsInBasketRequired: ['organizationId','basketId','siteId',],removeItemFromBasket: ['organizationId','basketId','itemId','siteId','locale',],removeItemFromBasketRequired: ['organizationId','basketId','itemId','siteId',],updateItemInBasket: ['organizationId','basketId','itemId','removeExternalTax','siteId','locale',],updateItemInBasketRequired: ['organizationId','basketId','itemId','siteId',],addTaxesForBasketItem: ['organizationId','basketId','itemId','siteId',],addTaxesForBasketItemRequired: ['organizationId','basketId','itemId','siteId',],addPaymentInstrumentToBasket: ['organizationId','basketId','siteId','locale',],addPaymentInstrumentToBasketRequired: ['organizationId','basketId','siteId',],removePaymentInstrumentFromBasket: ['organizationId','basketId','paymentInstrumentId','siteId','locale',],removePaymentInstrumentFromBasketRequired: ['organizationId','basketId','paymentInstrumentId','siteId',],updatePaymentInstrumentInBasket: ['organizationId','basketId','paymentInstrumentId','removeExternalTax','siteId','locale',],updatePaymentInstrumentInBasketRequired: ['organizationId','basketId','paymentInstrumentId','siteId',],getPaymentMethodsForBasket: ['organizationId','basketId','siteId','locale',],getPaymentMethodsForBasketRequired: ['organizationId','basketId','siteId',],addPriceAdjustmentToBasket: ['organizationId','basketId','siteId','locale',],addPriceAdjustmentToBasketRequired: ['organizationId','basketId','siteId',],removePriceAdjustmentFromBasket: ['organizationId','basketId','priceAdjustmentId','siteId','locale',],removePriceAdjustmentFromBasketRequired: ['organizationId','basketId','priceAdjustmentId','siteId',],updatePriceAdjustmentInBasket: ['organizationId','basketId','priceAdjustmentId','siteId',],updatePriceAdjustmentInBasketRequired: ['organizationId','basketId','priceAdjustmentId','siteId',],getPriceBooksForBasket: ['organizationId','basketId','siteId',],getPriceBooksForBasketRequired: ['organizationId','basketId','siteId',],addPriceBooksToBasket: ['organizationId','basketId','siteId',],addPriceBooksToBasketRequired: ['organizationId','basketId','siteId',],createShipmentForBasket: ['organizationId','basketId','siteId','locale',],createShipmentForBasketRequired: ['organizationId','basketId','siteId',],removeShipmentFromBasket: ['organizationId','basketId','shipmentId','siteId','locale',],removeShipmentFromBasketRequired: ['organizationId','basketId','shipmentId','siteId',],updateShipmentForBasket: ['organizationId','basketId','shipmentId','siteId','locale',],updateShipmentForBasketRequired: ['organizationId','basketId','shipmentId','siteId',],updateShippingAddressForShipment: ['organizationId','basketId','shipmentId','useAsBilling','removeExternalTax','siteId','locale',],updateShippingAddressForShipmentRequired: ['organizationId','basketId','shipmentId','siteId',],updateShippingMethodForShipment: ['organizationId','basketId','shipmentId','siteId','locale',],updateShippingMethodForShipmentRequired: ['organizationId','basketId','shipmentId','siteId',],getShippingMethodsForShipment: ['organizationId','basketId','shipmentId','siteId','locale',],getShippingMethodsForShipmentRequired: ['organizationId','basketId','shipmentId','siteId',],updateAsStorefrontBasket: ['organizationId','basketId','exchange','siteId','locale',],updateAsStorefrontBasketRequired: ['organizationId','basketId','siteId',],getTaxesFromBasket: ['organizationId','basketId','siteId',],getTaxesFromBasketRequired: ['organizationId','basketId','siteId',],addTaxesForBasket: ['organizationId','basketId','siteId',],addTaxesForBasketRequired: ['organizationId','basketId','siteId',],} as const

Type declaration

  • addCouponToBasket: ["organizationId", "basketId", "siteId", "locale"]
  • addCouponToBasketRequired: ["organizationId", "basketId", "siteId"]
  • addGiftCertificateItemToBasket: ["organizationId", "basketId", "siteId", "locale"]
  • addGiftCertificateItemToBasketRequired: ["organizationId", "basketId", "siteId"]
  • addItemToBasket: ["organizationId", "basketId", "siteId", "locale"]
  • addItemToBasketRequired: ["organizationId", "basketId", "siteId"]
  • addPaymentInstrumentToBasket: ["organizationId", "basketId", "siteId", "locale"]
  • addPaymentInstrumentToBasketRequired: ["organizationId", "basketId", "siteId"]
  • addPriceAdjustmentToBasket: ["organizationId", "basketId", "siteId", "locale"]
  • addPriceAdjustmentToBasketRequired: ["organizationId", "basketId", "siteId"]
  • addPriceBooksToBasket: ["organizationId", "basketId", "siteId"]
  • addPriceBooksToBasketRequired: ["organizationId", "basketId", "siteId"]
  • addTaxesForBasket: ["organizationId", "basketId", "siteId"]
  • addTaxesForBasketItem: ["organizationId", "basketId", "itemId", "siteId"]
  • addTaxesForBasketItemRequired: ["organizationId", "basketId", "itemId", "siteId"]
  • addTaxesForBasketRequired: ["organizationId", "basketId", "siteId"]
  • createBasket: ["organizationId", "taxMode", "temporary", "siteId", "locale"]
  • createBasketRequired: ["organizationId", "siteId"]
  • createShipmentForBasket: ["organizationId", "basketId", "siteId", "locale"]
  • createShipmentForBasketRequired: ["organizationId", "basketId", "siteId"]
  • deleteBasket: ["organizationId", "basketId", "siteId"]
  • deleteBasketRequired: ["organizationId", "basketId", "siteId"]
  • getBasket: ["organizationId", "basketId", "siteId", "locale"]
  • getBasketRequired: ["organizationId", "basketId", "siteId"]
  • getPaymentMethodsForBasket: ["organizationId", "basketId", "siteId", "locale"]
  • getPaymentMethodsForBasketRequired: ["organizationId", "basketId", "siteId"]
  • getPriceBooksForBasket: ["organizationId", "basketId", "siteId"]
  • getPriceBooksForBasketRequired: ["organizationId", "basketId", "siteId"]
  • getShippingMethodsForShipment: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]
  • getShippingMethodsForShipmentRequired: ["organizationId", "basketId", "shipmentId", "siteId"]
  • getTaxesFromBasket: ["organizationId", "basketId", "siteId"]
  • getTaxesFromBasketRequired: ["organizationId", "basketId", "siteId"]
  • mergeBasket: ["organizationId", "createDestinationBasket", "productItemMergeMode", "siteId", "locale"]
  • mergeBasketRequired: ["organizationId", "siteId"]
  • removeCouponFromBasket: ["organizationId", "basketId", "couponItemId", "siteId", "locale"]
  • removeCouponFromBasketRequired: ["organizationId", "basketId", "couponItemId", "siteId"]
  • removeGiftCertificateItemFromBasket: ["organizationId", "basketId", "giftCertificateItemId", "siteId", "locale"]
  • removeGiftCertificateItemFromBasketRequired: ["organizationId", "basketId", "giftCertificateItemId", "siteId"]
  • removeItemFromBasket: ["organizationId", "basketId", "itemId", "siteId", "locale"]
  • removeItemFromBasketRequired: ["organizationId", "basketId", "itemId", "siteId"]
  • removePaymentInstrumentFromBasket: ["organizationId", "basketId", "paymentInstrumentId", "siteId", "locale"]
  • removePaymentInstrumentFromBasketRequired: ["organizationId", "basketId", "paymentInstrumentId", "siteId"]
  • removePriceAdjustmentFromBasket: ["organizationId", "basketId", "priceAdjustmentId", "siteId", "locale"]
  • removePriceAdjustmentFromBasketRequired: ["organizationId", "basketId", "priceAdjustmentId", "siteId"]
  • removeShipmentFromBasket: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]
  • removeShipmentFromBasketRequired: ["organizationId", "basketId", "shipmentId", "siteId"]
  • transferBasket: ["organizationId", "overrideExisting", "siteId", "locale"]
  • transferBasketRequired: ["organizationId", "siteId"]
  • updateAsAgentBasket: ["organizationId", "basketId", "siteId", "locale"]
  • updateAsAgentBasketRequired: ["organizationId", "basketId", "siteId"]
  • updateAsStorefrontBasket: ["organizationId", "basketId", "exchange", "siteId", "locale"]
  • updateAsStorefrontBasketRequired: ["organizationId", "basketId", "siteId"]
  • updateBasket: ["organizationId", "basketId", "removeExternalTax", "siteId", "locale"]
  • updateBasketRequired: ["organizationId", "basketId", "siteId"]
  • updateBillingAddressForBasket: ["organizationId", "basketId", "useAsShipping", "removeExternalTax", "siteId", "locale"]
  • updateBillingAddressForBasketRequired: ["organizationId", "basketId", "siteId"]
  • updateCustomerForBasket: ["organizationId", "basketId", "siteId", "locale"]
  • updateCustomerForBasketRequired: ["organizationId", "basketId", "siteId"]
  • updateGiftCertificateItemInBasket: ["organizationId", "basketId", "giftCertificateItemId", "siteId", "locale"]
  • updateGiftCertificateItemInBasketRequired: ["organizationId", "basketId", "giftCertificateItemId", "siteId"]
  • updateItemInBasket: ["organizationId", "basketId", "itemId", "removeExternalTax", "siteId", "locale"]
  • updateItemInBasketRequired: ["organizationId", "basketId", "itemId", "siteId"]
  • updateItemsInBasket: ["organizationId", "basketId", "removeExternalTax", "siteId", "locale"]
  • updateItemsInBasketRequired: ["organizationId", "basketId", "siteId"]
  • updatePaymentInstrumentInBasket: ["organizationId", "basketId", "paymentInstrumentId", "removeExternalTax", "siteId", "locale"]
  • updatePaymentInstrumentInBasketRequired: ["organizationId", "basketId", "paymentInstrumentId", "siteId"]
  • updatePriceAdjustmentInBasket: ["organizationId", "basketId", "priceAdjustmentId", "siteId"]
  • updatePriceAdjustmentInBasketRequired: ["organizationId", "basketId", "priceAdjustmentId", "siteId"]
  • updateShipmentForBasket: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]
  • updateShipmentForBasketRequired: ["organizationId", "basketId", "shipmentId", "siteId"]
  • updateShippingAddressForShipment: ["organizationId", "basketId", "shipmentId", "useAsBilling", "removeExternalTax", "siteId", "locale"]
  • updateShippingAddressForShipmentRequired: ["organizationId", "basketId", "shipmentId", "siteId"]
  • updateShippingMethodForShipment: ["organizationId", "basketId", "shipmentId", "siteId", "locale"]
  • updateShippingMethodForShipmentRequired: ["organizationId", "basketId", "shipmentId", "siteId"]

Methods

addCouponToBasket

  • Adds a coupon to an existing basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Adds a coupon to an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: CouponItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

addGiftCertificateItemToBasket

  • Adds a gift certificate item to an existing basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Adds a gift certificate item to an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: GiftCertificateItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

addItemToBasket

  • Adds new items to a basket. The added items are associated with the specified shipment. If no shipment id is specified, the added items are associated with the default shipment. Considered values from the request body, for each item are:

    • productId: a valid product ID. This is the ID of the product to be added to the basket. If the product is already in the basket, the API either increments the quantity of the existing product line item or creates a new product line item, based on the site preference 'Add Product Behavior'. For option products and product bundles containing variation masters, the API creates a new product line item regardless of the site preference.
    • shipmentId: a valid shipment ID (optional). This is the ID of the shipment in which the product item is created.
    • quantity: a number between 0.01 and 999. This is the quantity of the product to order.
    • inventoryId: a valid inventory ID (optional). This is the ID of the inventory from which the item is allocated.
    • bonusDiscountLineItemId: a valid bonus discount line item ID (optional). This is the ID of the bonus discount line item for which the added product is a selected bonus product.
    • optionItems/optionValueId: a valid option value ID. This is an option value for an option item of an option product. This is only possible if the product item is an option product. To set option values, you must specify a collection of option items in the optionItems property. These option items must contain optionId and optionValueId. Also, the values you specify must be valid for the option product that this product item represents. Otherwise, the server throws an InvalidProductOptionItemException or an InvalidProductOptionValueItemException.
    • custom properties in the form c_<CUSTOM_NAME>: the custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductLineItem. The value of this property must be valid for the type of custom attribute defined for ProductLineItem.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Adds new items to a basket. The added items are associated with the specified shipment. If no shipment id is specified, the added items are associated with the default shipment. Considered values from the request body, for each item are:

    • productId: a valid product ID. This is the ID of the product to be added to the basket. If the product is already in the basket, the API either increments the quantity of the existing product line item or creates a new product line item, based on the site preference 'Add Product Behavior'. For option products and product bundles containing variation masters, the API creates a new product line item regardless of the site preference.
    • shipmentId: a valid shipment ID (optional). This is the ID of the shipment in which the product item is created.
    • quantity: a number between 0.01 and 999. This is the quantity of the product to order.
    • inventoryId: a valid inventory ID (optional). This is the ID of the inventory from which the item is allocated.
    • bonusDiscountLineItemId: a valid bonus discount line item ID (optional). This is the ID of the bonus discount line item for which the added product is a selected bonus product.
    • optionItems/optionValueId: a valid option value ID. This is an option value for an option item of an option product. This is only possible if the product item is an option product. To set option values, you must specify a collection of option items in the optionItems property. These option items must contain optionId and optionValueId. Also, the values you specify must be valid for the option product that this product item represents. Otherwise, the server throws an InvalidProductOptionItemException or an InvalidProductOptionValueItemException.
    • custom properties in the form c_<CUSTOM_NAME>: the custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductLineItem. The value of this property must be valid for the type of custom attribute defined for ProductLineItem.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Array<ProductItem>; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

addPaymentInstrumentToBasket

  • Adds a payment instrument to a basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Adds a payment instrument to a basket.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : Basket>

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

addPriceAdjustmentToBasket

  • Adds a custom manual price adjustment to the basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Adds a custom manual price adjustment to the basket.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : Basket>

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

addPriceBooksToBasket

  • ( DEPRECATED ) This method allows you to put an array of priceBookIds to an existing basket, which will be used for basket calculation. This endpoint is deprecated. Use Shopper Context, hooks or dw.catalog.PriceBookMgr#setApplicablePriceBooks() instead.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • ( DEPRECATED ) This method allows you to put an array of priceBookIds to an existing basket, which will be used for basket calculation. This endpoint is deprecated. Use Shopper Context, hooks or dw.catalog.PriceBookMgr#setApplicablePriceBooks() instead.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: PriceBookIds; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

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

addTaxesForBasket

  • This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for all taxable line items. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for all taxable line items. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Taxes; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

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

addTaxesForBasketItem

  • This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for a specific taxable line item. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • This method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for a specific taxable line item. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: TaxItems; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

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

createBasket

  • createBasket(options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; siteId: string; taxMode?: undefined | string; temporary?: undefined | false | true } & {}, ConfigParameters> }>): Promise<Basket>
  • createBasket<T>(options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; siteId: string; taxMode?: undefined | string; temporary?: undefined | false | true } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Creates a new basket.

    The created basket is initialized with default values. Optional JSON data provided in the request body is populated into the created basket. It can be updated with other endpoints offered by the Shopper Baskets API.

    Each customer can have just one open basket. When a basket is created, it is said to be open. It remains open until either an order is created from it or it is deleted.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; siteId: string; taxMode?: undefined | string; temporary?: undefined | false | true } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Creates a new basket.

    The created basket is initialized with default values. Optional JSON data provided in the request body is populated into the created basket. It can be updated with other endpoints offered by the Shopper Baskets API.

    Each customer can have just one open basket. When a basket is created, it is said to be open. It remains open until either an order is created from it or it is deleted.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; siteId: string; taxMode?: undefined | string; temporary?: undefined | false | true } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

createShipmentForBasket

  • Creates a new shipment for a basket.

    The created shipment is initialized with values provided in the body document and can be updated with further data API calls. Considered from the body are the following properties if specified:

    • the ID
    • the shipping address
    • the shipping method
    • gift boolean flag
    • gift message
    • custom properties

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Creates a new shipment for a basket.

    The created shipment is initialized with values provided in the body document and can be updated with further data API calls. Considered from the body are the following properties if specified:

    • the ID
    • the shipping address
    • the shipping method
    • gift boolean flag
    • gift message
    • custom properties

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Shipment; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

deleteBasket

  • Removes a basket.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Removes a basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

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

getBasket

  • Gets a basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Gets a basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

getPaymentMethodsForBasket

  • Gets applicable payment methods for an existing basket considering the open payment amount only.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<PaymentMethodResult>

    A promise of type PaymentMethodResult.

  • Gets applicable payment methods for an existing basket considering the open payment amount only.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : PaymentMethodResult>

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

getPriceBooksForBasket

  • ( DEPRECATED ) Gets applicable price books for an existing basket. This endpoint is deprecated. Use Shopper Context, hooks or dw.catalog.PriceBookMgr#getApplicablePriceBooks() instead.

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

    Parameters

    Returns Promise<PriceBookIds>

    A promise of type PriceBookIds.

  • ( DEPRECATED ) Gets applicable price books for an existing basket. This endpoint is deprecated. Use Shopper Context, hooks or dw.catalog.PriceBookMgr#getApplicablePriceBooks() instead.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : PriceBookIds>

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

getShippingMethodsForShipment

  • getShippingMethodsForShipment(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>): Promise<ShippingMethodResult>
  • getShippingMethodsForShipment<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : ShippingMethodResult>
  • Gets the applicable shipping methods for a certain shipment of a basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<ShippingMethodResult>

    A promise of type ShippingMethodResult.

  • Gets the applicable shipping methods for a certain shipment of a basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShippingMethodResult>

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

getTaxesFromBasket

  • This method gives you the external taxation data set by the PUT taxes API. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.

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

    Parameters

    Returns Promise<Taxes>

    A promise of type Taxes.

  • This method gives you the external taxation data set by the PUT taxes API. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Taxes>

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

mergeBasket

  • mergeBasket(options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ createDestinationBasket?: undefined | false | true; locale?: undefined | string; organizationId: string; productItemMergeMode?: undefined | string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • mergeBasket<T>(options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ createDestinationBasket?: undefined | false | true; locale?: undefined | string; organizationId: string; productItemMergeMode?: undefined | string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.

    The following information is merged:

    • custom attributes on the basket and on all copied records
    • product items
    • gift certificate items
    • coupon items
    • shipments
    • ad-hoc price adjustments

    To control the merging of products that exist in both baskets, use the productItemMergeMode parameter. By default, the higher of the two basket quantities is used for each product. Products in both baskets are considered to be the same when all of the following values match (if one product doesn't have a value, the other product is a match only if it also doesn't have that value):

    • shipment
    • productId
    • option values
    • wishlist reference
    • inventory list id
    • gift flag & message
    • ad-hoc price adjustments

    If any of the listed values don't match, then the item in the previous shopper's basket is copied to a new line item in the current shopper's basket. If the listed values all match, but the matching products have different values for any custom attribute, the merged line item keeps the custom attribute value from the current shopper's basket.

    A success response contains the current shopper's active basket. The previous guest shopper's active basket is deleted.

    If the current shopper doesn't have an active basket, and the createDestinationBasket request parameter is false, then the merge request returns a BasketMergeException (HTTP status 409). You can proceed with one of these options:

    • Transfer the previous shopper's active basket to the current logged-in shopper by calling the baskets/transfer endpoint.
    • Force the merge by calling the baskets/merge endpoint again, with the parameter createDestinationBasket=true. Forcing the merge creates a new basket for the current shopper and copies information from the previous shopper's basket into it. Because the merge doesn't copy all basket data, a forced merge is not the same as a transfer. For example, the new basket doesn't contain any Personally Identifiable Information (PII) from the previous basket.

    before merge

    Previous Shopper's Basket, SKU: Quantity, Custom Attributes Current Shopper's Basket, SKU: Quantity, Custom Attributes
    SKU_A: 5<br> SKU_B: 3<br> SKU_C: 4<br> c_customAttr_1: 'ABC' <br> c_customAttr_2: 'DEF' SKU_A: 2<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_3: 'XYZ'

    after merge - (previous shopper's basket is deleted)

    productItemMergeMode Current Shopper's Basket - SKU: Quantity, Custom Attributes
    sum_quantities SKU_A: 7<br> SKU_B: 3<br> SKU_C: 4<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'
    higher_quantity SKU_A: 5<br> SKU_B: 3<br> SKU_C: 4<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'
    saved_quantity SKU_A: 2<br> SKU_B: 3<br> SKU_C: 4<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'
    separate_item SKU_A: 5<br> SKU_B: 3<br> SKU_C: 4<br> SKU_A: 2<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ createDestinationBasket?: undefined | false | true; locale?: undefined | string; organizationId: string; productItemMergeMode?: undefined | string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Merge data from the previous shopper's basket into the current shopper's active basket and delete the previous shopper's basket. This endpoint doesn't merge Personally Identifiable Information (PII). You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token. After the merge, all basket amounts are recalculated and totaled, including lookups for prices, taxes, shipping, and promotions, unless hooks are enabled.

    The following information is merged:

    • custom attributes on the basket and on all copied records
    • product items
    • gift certificate items
    • coupon items
    • shipments
    • ad-hoc price adjustments

    To control the merging of products that exist in both baskets, use the productItemMergeMode parameter. By default, the higher of the two basket quantities is used for each product. Products in both baskets are considered to be the same when all of the following values match (if one product doesn't have a value, the other product is a match only if it also doesn't have that value):

    • shipment
    • productId
    • option values
    • wishlist reference
    • inventory list id
    • gift flag & message
    • ad-hoc price adjustments

    If any of the listed values don't match, then the item in the previous shopper's basket is copied to a new line item in the current shopper's basket. If the listed values all match, but the matching products have different values for any custom attribute, the merged line item keeps the custom attribute value from the current shopper's basket.

    A success response contains the current shopper's active basket. The previous guest shopper's active basket is deleted.

    If the current shopper doesn't have an active basket, and the createDestinationBasket request parameter is false, then the merge request returns a BasketMergeException (HTTP status 409). You can proceed with one of these options:

    • Transfer the previous shopper's active basket to the current logged-in shopper by calling the baskets/transfer endpoint.
    • Force the merge by calling the baskets/merge endpoint again, with the parameter createDestinationBasket=true. Forcing the merge creates a new basket for the current shopper and copies information from the previous shopper's basket into it. Because the merge doesn't copy all basket data, a forced merge is not the same as a transfer. For example, the new basket doesn't contain any Personally Identifiable Information (PII) from the previous basket.

    before merge

    Previous Shopper's Basket, SKU: Quantity, Custom Attributes Current Shopper's Basket, SKU: Quantity, Custom Attributes
    SKU_A: 5<br> SKU_B: 3<br> SKU_C: 4<br> c_customAttr_1: 'ABC' <br> c_customAttr_2: 'DEF' SKU_A: 2<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_3: 'XYZ'

    after merge - (previous shopper's basket is deleted)

    productItemMergeMode Current Shopper's Basket - SKU: Quantity, Custom Attributes
    sum_quantities SKU_A: 7<br> SKU_B: 3<br> SKU_C: 4<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'
    higher_quantity SKU_A: 5<br> SKU_B: 3<br> SKU_C: 4<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'
    saved_quantity SKU_A: 2<br> SKU_B: 3<br> SKU_C: 4<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'
    separate_item SKU_A: 5<br> SKU_B: 3<br> SKU_C: 4<br> SKU_A: 2<br> SKU_D: 6<br> SKU_E: 7<br> c_customAttr_1: 'UVW' <br> c_customAttr_2: 'DEF' <br> c_customAttr_3: 'XYZ'

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ createDestinationBasket?: undefined | false | true; locale?: undefined | string; organizationId: string; productItemMergeMode?: undefined | string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

removeCouponFromBasket

  • removeCouponFromBasket(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; couponItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • removeCouponFromBasket<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; couponItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Removes a coupon from the basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; couponItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Removes a coupon from the basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; couponItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

removeGiftCertificateItemFromBasket

  • removeGiftCertificateItemFromBasket(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; giftCertificateItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • removeGiftCertificateItemFromBasket<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; giftCertificateItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Deletes a gift certificate item from an existing basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; giftCertificateItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Deletes a gift certificate item from an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; giftCertificateItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

removeItemFromBasket

  • removeItemFromBasket(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • removeItemFromBasket<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Removes a product item from the basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Removes a product item from the basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

removePaymentInstrumentFromBasket

  • removePaymentInstrumentFromBasket(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; paymentInstrumentId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • removePaymentInstrumentFromBasket<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; paymentInstrumentId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Removes a payment instrument of a basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; paymentInstrumentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Removes a payment instrument of a basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; paymentInstrumentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

removePriceAdjustmentFromBasket

  • removePriceAdjustmentFromBasket(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; priceAdjustmentId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • removePriceAdjustmentFromBasket<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; priceAdjustmentId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Removes a custom manual price adjustment from the basket.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; priceAdjustmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Removes a custom manual price adjustment from the basket.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; priceAdjustmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

removeShipmentFromBasket

  • removeShipmentFromBasket(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • removeShipmentFromBasket<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Removes a specified shipment and all associated product, gift certificate, shipping, and price adjustment line items from a basket. It is not allowed to remove the default shipment.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Removes a specified shipment and all associated product, gift certificate, shipping, and price adjustment line items from a basket. It is not allowed to remove the default shipment.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

transferBasket

  • transferBasket(options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; overrideExisting?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • transferBasket<T>(options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; overrideExisting?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.

    A success response contains the transferred basket.

    If the current shopper has an active basket, and the overrideExisting request parameter is false, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:

    • Keep the current shopper's active basket.
    • Merge the previous and current shoppers' baskets by calling the baskets/merge endpoint.
    • Force the transfer by calling the baskets/transfer endpoint again, with the parameter overrideExisting=true. Forcing the transfer deletes the current shopper's active basket.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; overrideExisting?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Transfer the previous shopper's basket to the current shopper by updating the basket's owner. No other values change. You must obtain the shopper authorization token via SLAS and you must provide the ‘guest usid‘ in both the ‘/oauth2/login‘ and ‘/oauth2/token‘ calls while fetching the registered user JWT token.

    A success response contains the transferred basket.

    If the current shopper has an active basket, and the overrideExisting request parameter is false, then the transfer request returns a BasketTransferException (HTTP status 409). You can proceed with one of these options:

    • Keep the current shopper's active basket.
    • Merge the previous and current shoppers' baskets by calling the baskets/merge endpoint.
    • Force the transfer by calling the baskets/transfer endpoint again, with the parameter overrideExisting=true. Forcing the transfer deletes the current shopper's active basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ locale?: undefined | string; organizationId: string; overrideExisting?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateAsAgentBasket

  • Marks a basket as an agent basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Marks a basket as an agent basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateAsStorefrontBasket

  • updateAsStorefrontBasket(options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; exchange?: undefined | false | true; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • updateAsStorefrontBasket<T>(options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; exchange?: undefined | false | true; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Marks a basket as a storefront basket.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; exchange?: undefined | false | true; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Marks a basket as a storefront basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; exchange?: undefined | false | true; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateBasket

  • updateBasket(options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • updateBasket<T>(options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Updates a basket. Only the currency of the basket, source code, the custom properties of the basket, and the shipping items will be considered.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates a basket. Only the currency of the basket, source code, the custom properties of the basket, and the shipping items will be considered.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Basket; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateBillingAddressForBasket

  • updateBillingAddressForBasket(options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string; useAsShipping?: undefined | false | true } & {}, ConfigParameters> }>): Promise<Basket>
  • updateBillingAddressForBasket<T>(options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string; useAsShipping?: undefined | false | true } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Sets the billing address of a basket.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string; useAsShipping?: undefined | false | true } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Sets the billing address of a basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string; useAsShipping?: undefined | false | true } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateCustomerForBasket

  • Sets customer information for an existing basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Sets customer information for an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: CustomerInfo; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateGiftCertificateItemInBasket

  • Updates a gift certificate item of an existing basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates a gift certificate item of an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: GiftCertificateItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; giftCertificateItemId: string; locale?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateItemInBasket

  • updateItemInBasket(options: RequireParametersUnlessAllAreOptional<{ body: ProductItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • updateItemInBasket<T>(options: RequireParametersUnlessAllAreOptional<{ body: ProductItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Updates an item in a basket. The item to be updated can be a bundled product item, although the kind of update supported for bundled product items is limited to productId (to support variation products), gift, giftMessage and custom properties. The following values in the request body are considered by the server:

    • productId: a valid product ID. The purpose of this value is to exchange a variation of a variation product.
    • shipmentId: a valid shipment ID. The purpose of this value is to move a product item to another shipment.
    • quantity: a number between 0 and 999. The purpose of this value is to change quantity of the product item. If quantity is 0, the product item is removed.
    • optionItems/optionValueId: a valid option value ID. The purpose of this value is to exchange an option value for an option item of an option product. This is only possible if the product item is an option product. To change option values a collection of option items to be changed need to be provided in property optionItems. Those optionItems need to contain optionId and optionValueId. The provided values must be valid for the option product that this product item represents. Otherwise, InvalidProductOptionItemException or InvalidProductOptionValueItemException is thrown.
    • custom properties c_\<CUSTOM_NAME\>: a value corresponding to the type defined for custom attribute \<CUSTOM_NAME\> of ProductLineItem. The purpose of this value is to add or change the value of a custom attribute defined for ProductLineItem.
    • gift: a boolean value that specifies whether the item is a gift
    • giftMessage: a message for the gift

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: ProductItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates an item in a basket. The item to be updated can be a bundled product item, although the kind of update supported for bundled product items is limited to productId (to support variation products), gift, giftMessage and custom properties. The following values in the request body are considered by the server:

    • productId: a valid product ID. The purpose of this value is to exchange a variation of a variation product.
    • shipmentId: a valid shipment ID. The purpose of this value is to move a product item to another shipment.
    • quantity: a number between 0 and 999. The purpose of this value is to change quantity of the product item. If quantity is 0, the product item is removed.
    • optionItems/optionValueId: a valid option value ID. The purpose of this value is to exchange an option value for an option item of an option product. This is only possible if the product item is an option product. To change option values a collection of option items to be changed need to be provided in property optionItems. Those optionItems need to contain optionId and optionValueId. The provided values must be valid for the option product that this product item represents. Otherwise, InvalidProductOptionItemException or InvalidProductOptionValueItemException is thrown.
    • custom properties c_\<CUSTOM_NAME\>: a value corresponding to the type defined for custom attribute \<CUSTOM_NAME\> of ProductLineItem. The purpose of this value is to add or change the value of a custom attribute defined for ProductLineItem.
    • gift: a boolean value that specifies whether the item is a gift
    • giftMessage: a message for the gift

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: ProductItem; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; itemId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateItemsInBasket

  • updateItemsInBasket(options: RequireParametersUnlessAllAreOptional<{ body: Array<ProductItem>; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>): Promise<Basket>
  • updateItemsInBasket<T>(options: RequireParametersUnlessAllAreOptional<{ body: Array<ProductItem>; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Updates multiple items in a basket. This behaviour matches that of updating a single item, but the body contains an array of ProductItems to be updated that are identified by itemId. The items to update can include bundled product items, although the kind of update supported for bundled product items is limited to productId, gift, giftMessage and custom properties. The following values in the request body are considered by the server:

    • itemId (mandatory): identifies an item to be updated.
    • productId: a valid product ID. The purpose of this value is to change the variation of a variation product.
    • shipmentId: a valid shipment ID. The purpose of this value is to move a product item to another shipment.
    • quantity: a number between 0 and 999. The purpose of this value is to change the quantity of the product item. If the quantity is 0, the product item is removed.
    • optionItems/optionValueId: a valid option value ID. The purpose of this value is to exchange an option value for an option item of an option product. This is only possible if the product item is an option product. To change option values, a collection of the option items to be changed must be provided in the property optionItems. Those optionItems must contain optionId and optionValueId. The provided values must be valid for the option product that this product item represents. Otherwise, InvalidProductOptionItemException or InvalidProductOptionValueItemException is thrown.
    • custom properties c_\<CUSTOM_NAME\>: a value corresponding to the type defined for custom attribute \<CUSTOM_NAME\> of the ProductLineItem. The purpose of this value is to add or change the value of a custom attribute defined for the ProductLineItem.
    • gift: a boolean value that specifies whether the item is a gift.
    • giftMessage: a message to include with the gift.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Array<ProductItem>; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates multiple items in a basket. This behaviour matches that of updating a single item, but the body contains an array of ProductItems to be updated that are identified by itemId. The items to update can include bundled product items, although the kind of update supported for bundled product items is limited to productId, gift, giftMessage and custom properties. The following values in the request body are considered by the server:

    • itemId (mandatory): identifies an item to be updated.
    • productId: a valid product ID. The purpose of this value is to change the variation of a variation product.
    • shipmentId: a valid shipment ID. The purpose of this value is to move a product item to another shipment.
    • quantity: a number between 0 and 999. The purpose of this value is to change the quantity of the product item. If the quantity is 0, the product item is removed.
    • optionItems/optionValueId: a valid option value ID. The purpose of this value is to exchange an option value for an option item of an option product. This is only possible if the product item is an option product. To change option values, a collection of the option items to be changed must be provided in the property optionItems. Those optionItems must contain optionId and optionValueId. The provided values must be valid for the option product that this product item represents. Otherwise, InvalidProductOptionItemException or InvalidProductOptionValueItemException is thrown.
    • custom properties c_\<CUSTOM_NAME\>: a value corresponding to the type defined for custom attribute \<CUSTOM_NAME\> of the ProductLineItem. The purpose of this value is to add or change the value of a custom attribute defined for the ProductLineItem.
    • gift: a boolean value that specifies whether the item is a gift.
    • giftMessage: a message to include with the gift.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Array<ProductItem>; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updatePaymentInstrumentInBasket

  • Updates payment instrument of an existing basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates payment instrument of an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: OrderPaymentInstrument; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; paymentInstrumentId: string; removeExternalTax?: undefined | false | true; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updatePriceAdjustmentInBasket

  • Updates a custom manual price adjustment on the basket. Only the following path values are considered for the update; all other attributes are ignored.

    • discount
    • itemText
    • reasonCode
    • custom properties The discount type of a price adjustment cannot be updated and therefore, the value of the existing type must be passed. For an adjustment of type percentage, the percentage attribute is mandatory. For adjustments of type amount and fixed_price, the amount attribute is mandatory.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates a custom manual price adjustment on the basket. Only the following path values are considered for the update; all other attributes are ignored.

    • discount
    • itemText
    • reasonCode
    • custom properties The discount type of a price adjustment cannot be updated and therefore, the value of the existing type must be passed. For an adjustment of type percentage, the percentage attribute is mandatory. For adjustments of type amount and fixed_price, the amount attribute is mandatory.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: PriceAdjustment; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; organizationId: string; priceAdjustmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateShipmentForBasket

  • Updates a shipment for a basket.

    The shipment is initialized with values provided in the body document and can be updated with further data API calls. Considered from the body are the following properties if specified:

    • the ID
    • the shipping address
    • the shipping method
    • gift boolean flag
    • gift message
    • custom properties

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Updates a shipment for a basket.

    The shipment is initialized with values provided in the body document and can be updated with further data API calls. Considered from the body are the following properties if specified:

    • the ID
    • the shipping address
    • the shipping method
    • gift boolean flag
    • gift message
    • custom properties

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: Shipment; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateShippingAddressForShipment

  • updateShippingAddressForShipment(options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; shipmentId: string; siteId: string; useAsBilling?: undefined | false | true } & {}, ConfigParameters> }>): Promise<Basket>
  • updateShippingAddressForShipment<T>(options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; shipmentId: string; siteId: string; useAsBilling?: undefined | false | true } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : Basket>
  • Sets a shipping address of a specific shipment of a basket.

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

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; shipmentId: string; siteId: string; useAsBilling?: undefined | false | true } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<Basket>

    A promise of type Basket.

  • Sets a shipping address of a specific shipment of a basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: OrderAddress; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; removeExternalTax?: undefined | false | true; shipmentId: string; siteId: string; useAsBilling?: undefined | false | true } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

updateShippingMethodForShipment

  • Sets a shipping method to a specific shipment of a basket.

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

    Parameters

    Returns Promise<Basket>

    A promise of type Basket.

  • Sets a shipping method to a specific shipment of a basket.

    Type parameters

    • T: boolean

    Parameters

    • options: RequireParametersUnlessAllAreOptional<{ body: ShippingMethod; headers?: undefined | {}; parameters?: CompositeParameters<{ basketId: string; locale?: undefined | string; organizationId: string; shipmentId: string; siteId: string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Basket>

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

Generated using TypeDoc