Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShopperBaskets

Build a checkout experience.

Example with shopper auth

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

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

// must be registered in SLAS. On server, redirectURI is never called
const redirectURI = "http://localhost:3000/callback";
const slasClient = new Customer.ShopperLogin(clientConfig);
token = await slasHelpers.loginGuestUser(slasClient, { redirectURI });

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

Hierarchy

  • BaseClient
    • ShopperBaskets

Index

Type aliases

Constructors

Properties

Methods

Type aliases

Static AsyncCreated

AsyncCreated: {}

Type declaration

Static AttributeDefinition

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

Type declaration

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

Static Basket

Basket: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; agentBasket?: boolean; basketId?: string; billingAddress?: OrderAddress; bonusDiscountLineItems?: Array<BonusDiscountLineItem>; channelType?: string; couponItems?: Array<CouponItem>; creationDate?: any; currency?: string; customerInfo?: CustomerInfo; giftCertificateItems?: Array<GiftCertificateItem>; groupedTaxItems?: Array<GroupedTaxItem>; inventoryReservationExpiry?: any; lastModified?: any; merchandizeTotalTax?: number; notes?: SimpleLink; orderPriceAdjustments?: Array<PriceAdjustment>; orderTotal?: number; paymentInstruments?: Array<OrderPaymentInstrument>; productItems?: Array<ProductItem>; productSubTotal?: number; productTotal?: number; shipments?: Array<Shipment>; shippingItems?: Array<ShippingItem>; shippingTotal?: number; shippingTotalTax?: number; sourceCode?: string; taxRoundedAtGroup?: boolean; taxTotal?: number; taxation?: string; temporaryBasket?: boolean } & {}

Static BasketPaymentInstrumentRequest

BasketPaymentInstrumentRequest: { amount?: number; bankRoutingNumber?: string; giftCertificateCode?: string; paymentCard?: OrderPaymentCardRequest; paymentMethodId?: string } & {}

Static BonusDiscountLineItem

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

Static BoolFilter

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

Static BoolQuery

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

Static ChangeControlled

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

Static ChangeControlledDataType

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

Static ClosedObject

ClosedObject: {} & {}

Static CouponItem

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

Static CustomerInfo

CustomerInfo: { customerId?: string; customerName?: string; customerNo?: string; email: string } & {}

Static DateConditionalRequest

DateConditionalRequest: {}

Type declaration

Static DateRangeFilter

DateRangeFilter: {}

Type declaration

Static DatetimeRangeFilter

DatetimeRangeFilter: {}

Type declaration

Static Discount

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

Static DiscountRequest

DiscountRequest: { type: string; value: number }

Type declaration

  • type: string
  • value: number

Static Error

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

Static ErrorResponse

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

Static EtagConditionalRequest

EtagConditionalRequest: {}

Type declaration

Static EtagResponse

EtagResponse: {}

Type declaration

Static Filter

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

Static FilteredQuery

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

Static GiftCertificateItem

GiftCertificateItem: { amount: number; giftCertificateItemId?: string; message?: string; recipientEmail: string; recipientName?: string; senderName?: string; shipmentId?: string } & {}

Static GroupedTaxItem

GroupedTaxItem: { taxRate?: number; taxValue?: number }

Type declaration

  • Optional taxRate?: number
  • Optional taxValue?: number

Static IntegerRangeFilter

IntegerRangeFilter: {}

Type declaration

Static L10nString

L10nString: {} & {}

Static LocaleSpecific

LocaleSpecific: {}

Type declaration

Static LocalizedString

LocalizedString: {} & {}

Static MatchAllQuery

MatchAllQuery: {} & {}

Static Money

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

Static MoneyMnemonic

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

Static NestedQuery

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

Static NoPropertiesAllowed

NoPropertiesAllowed: {}

Type declaration

Static Note

Note: { createdBy?: string; creationDate?: any; id?: string; subject?: string; text?: string }

Type declaration

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

Static NotesResult

NotesResult: { notes?: Array<Note> } & {}

Static NumericRangeFilter

NumericRangeFilter: {}

Type declaration

Static OffsetPaginated

OffsetPaginated: {}

Type declaration

Static OpenObject

OpenObject: {} & {}

Static OptionItem

OptionItem: { adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; bundledProductItems?: Array<ProductItem>; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; itemText?: string; optionId: string; optionItems?: Array<OptionItem>; optionValueId: string; price?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId?: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId?: string; shippingItemId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number } & {}

Static Order

Order: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; billingAddress?: OrderAddress; bonusDiscountLineItems?: Array<BonusDiscountLineItem>; channelType?: string; confirmationStatus?: string; couponItems?: Array<CouponItem>; createdBy?: string; creationDate?: any; currency?: string; customerInfo?: CustomerInfo; customerName?: string; exportStatus?: string; externalOrderStatus?: string; giftCertificateItems?: Array<GiftCertificateItem>; globalPartyId?: string; groupedTaxItems?: Array<GroupedTaxItem>; guest?: boolean; lastModified?: any; merchandizeTotalTax?: number; notes?: SimpleLink; orderNo?: string; orderPriceAdjustments?: Array<PriceAdjustment>; orderToken?: string; orderTotal?: number; orderViewCode?: string; paymentInstruments?: Array<OrderPaymentInstrument>; paymentStatus?: string; productItems?: Array<ProductItem>; productSubTotal?: number; productTotal?: number; shipments?: Array<Shipment>; shippingItems?: Array<ShippingItem>; shippingStatus?: string; shippingTotal?: number; shippingTotalTax?: number; siteId?: string; sourceCode?: string; status?: string; taxRoundedAtGroup?: boolean; taxTotal?: number; taxation?: string } & {}

Static OrderAddress

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

Static OrderLookupRequest

OrderLookupRequest: { email: string; orderViewCode: string }

Type declaration

  • email: string
  • orderViewCode: string

Static OrderPaymentCardRequest

OrderPaymentCardRequest: { cardType?: string; creditCardToken?: string; expirationMonth?: number; expirationYear?: number; holder?: string; issueNumber?: string; maskedNumber?: string; validFromMonth?: number; validFromYear?: number }

Type declaration

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

Static OrderPaymentInstrument

OrderPaymentInstrument: { amount?: number; authorizationStatus?: Status; bankRoutingNumber?: string; maskedGiftCertificateCode?: string; paymentCard?: PaymentCard; paymentInstrumentId?: string; paymentMethodId?: string } & {}

Static OrderPaymentInstrumentRequest

OrderPaymentInstrumentRequest: { amount?: number; bankRoutingNumber?: string; giftCertificateCode?: string; paymentCard?: OrderPaymentCardRequest; paymentMethodId?: string } & {}

Static PaginatedSearchResult

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

Static PaginatedSearchResultBase

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

Static PaymentCard

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

Type declaration

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

Static PaymentCardSpec

PaymentCardSpec: { cardType?: string; checksumVerificationEnabled?: boolean; description?: string; image?: string; name?: string; numberLengths?: Array<string>; numberPrefixes?: Array<string>; securityCodeLength?: number } & {}

Static PaymentMethod

PaymentMethod: { cards?: Array<PaymentCardSpec>; description?: string; id: string; image?: string; name?: string; paymentProcessorId?: string } & {}

Static PaymentMethodResult

PaymentMethodResult: { applicablePaymentMethods?: Array<PaymentMethod> } & {}

Static PriceAdjustment

PriceAdjustment: { appliedDiscount?: Discount; couponCode?: string; createdBy?: string; creationDate?: any; custom?: boolean; itemText?: string; lastModified?: any; manual?: boolean; price?: number; priceAdjustmentId?: string; promotionId?: string; promotionLink?: string; reasonCode?: string } & {}

Static PriceAdjustmentRequest

PriceAdjustmentRequest: { discount?: DiscountRequest; itemId?: string; itemText?: string; level: string; promotionId?: string; reasonCode?: string } & {}

Static PriceBookIds

PriceBookIds: Array<string>

Static ProductDetailsLink

ProductDetailsLink: { productDescription?: string; productId: string; productName?: string; title?: string }

Type declaration

  • Optional productDescription?: string
  • productId: string
  • Optional productName?: string
  • Optional title?: string

Static ProductItem

ProductItem: { adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; bundledProductItems?: Array<ProductItem>; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; itemText?: string; optionItems?: Array<OptionItem>; price?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId?: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId?: string; shippingItemId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number } & {}

Static ProductListItemReference

ProductListItemReference: { id: string; priority?: number; productDetailsLink?: ProductDetailsLink; productList?: ProductListLink; public?: boolean; purchasedQuantity?: number; quantity?: number; type?: string }

Type declaration

  • id: string
  • Optional priority?: number
  • Optional productDetailsLink?: ProductDetailsLink
  • Optional productList?: ProductListLink
  • Optional public?: boolean
  • Optional purchasedQuantity?: number
  • Optional quantity?: number
  • Optional type?: string

Static ProductListLink

ProductListLink: { description?: string; name?: string; public?: boolean; title?: string; type?: string } & {}

Static PromotionLink

PromotionLink: { calloutMsg?: string; name?: string; promotionId?: string; title?: string }

Type declaration

  • Optional calloutMsg?: string
  • Optional name?: string
  • Optional promotionId?: string
  • Optional title?: string

Static PropertyDefinition

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

Static PropertyValueDefinition

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

Type declaration

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

Static Query

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

Static QueryFilter

QueryFilter: { query: Query } & {}

Static QueryParamsLimit

QueryParamsLimit: {}

Type declaration

Static QueryParamsOffset

QueryParamsOffset: {}

Type declaration

Static Range2Filter

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

Static RangeFilter

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

Static RateLimited

RateLimited: {}

Type declaration

Static RateLimited2

RateLimited2: {}

Type declaration

Static RateLimited3

RateLimited3: {}

Type declaration

Static RateLimited4

RateLimited4: {}

Type declaration

Static RateLimited5

RateLimited5: {}

Type declaration

Static SearchRequest

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

Static SearchRequestBase

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

Static Selectable

Selectable: {}

Type declaration

Static Shipment

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

Static ShippingItem

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

Static ShippingMethod

ShippingMethod: { description?: string; externalShippingMethod?: string; id: string; name?: string; price?: number; shippingPromotions?: Array<ShippingPromotion> } & {}

Static ShippingMethodResult

ShippingMethodResult: { applicableShippingMethods?: Array<ShippingMethod>; defaultShippingMethodId?: string } & {}

Static ShippingPromotion

ShippingPromotion: { calloutMsg?: string; promotionId?: string; promotionName?: string } & {}

Static SimpleLink

SimpleLink: {}

Type declaration

Static SimpleSearchResult

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

Static SimpleSearchResultBase

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

Static SiteSpecific

SiteSpecific: {}

Type declaration

Static Sort

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

Static SpecifiedPropertiesAllowed

SpecifiedPropertiesAllowed: {} & {}

Static Status

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

Type declaration

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

Static SyncCreated

SyncCreated: {}

Type declaration

Static TaxItem

TaxItem: { id: string; rate: number; value?: number }

Type declaration

  • id: string
  • rate: number
  • Optional value?: number

Static TaxItems

TaxItems: { taxItems?: Array<TaxItem> } & {}

Static Taxes

Taxes: { taxes: {} & {} }

Type declaration

  • taxes: {} & {}

Static TermFilter

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

Static TermQuery

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

Static TextQuery

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

Constructors

constructor

  • Parameters

    • config: ClientConfig

    Returns ShopperBaskets

Properties

clientConfig

clientConfig: ClientConfig

Methods

addCouponToBasket

  • addCouponToBasket(options: { body: CouponItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • addCouponToBasket<T>(options: { body: CouponItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • Adds a coupon to an existing basket.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Adds a coupon to an existing basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

addGiftCertificateItemToBasket

  • addGiftCertificateItemToBasket(options: { body: GiftCertificateItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • addGiftCertificateItemToBasket<T>(options: { body: GiftCertificateItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • 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

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Adds a gift certificate item to an existing basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

addItemToBasket

  • addItemToBasket(options: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • addItemToBasket<T>(options: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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.

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

    Parameters

    • options: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Array<ProductItem>
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Array<ProductItem>
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

addPaymentInstrumentToBasket

  • addPaymentInstrumentToBasket(options: { body: BasketPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • addPaymentInstrumentToBasket<T>(options: { body: BasketPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • Adds a payment instrument to a basket.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Adds a payment instrument to a basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

addPriceAdjustmentToBasket

  • addPriceAdjustmentToBasket(options: { body: PriceAdjustmentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • addPriceAdjustmentToBasket<T>(options: { body: PriceAdjustmentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • 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

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Adds a custom manual price adjustment to the basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

addPriceBooksToBasket

  • addPriceBooksToBasket(options: { body: PriceBookIds; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • addPriceBooksToBasket<T>(options: { body: PriceBookIds; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : 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.

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

    Parameters

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

      An object containing the options for this method.

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

    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: { body: PriceBookIds; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : void>

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

addTaxesForBasket

  • addTaxesForBasket(options: { body: Taxes; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • addTaxesForBasket<T>(options: { body: Taxes; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : 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.

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

    Parameters

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

      An object containing the options for this method.

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

    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: { body: Taxes; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : void>

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

addTaxesForBasketItem

  • addTaxesForBasketItem(options: { body: TaxItems; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • addTaxesForBasketItem<T>(options: { body: TaxItems; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : 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.

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

    Parameters

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

      An object containing the options for this method.

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

    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: { body: TaxItems; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : void>

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

createBasket

  • createBasket(options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string; taxMode?: string; temporary?: boolean } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • createBasket<T>(options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string; taxMode?: string; temporary?: boolean } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string; taxMode?: string; temporary?: boolean } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Basket
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; organizationId?: string; siteId?: string; taxMode?: string; temporary?: boolean } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string; taxMode?: string; temporary?: boolean } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Basket
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; organizationId?: string; siteId?: string; taxMode?: string; temporary?: boolean } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

createShipmentForBasket

  • createShipmentForBasket(options: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • createShipmentForBasket<T>(options: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

deleteBasket

  • deleteBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<void>
  • deleteBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : void>
  • Removes a basket.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<void>

    A promise of type void.

  • Removes a basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : void>

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

getBasket

  • getBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • getBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • Gets a basket.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Gets a basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

getPaymentMethodsForBasket

  • getPaymentMethodsForBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<PaymentMethodResult>
  • getPaymentMethodsForBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.PaymentMethodResult>
  • 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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<PaymentMethodResult>

    A promise of type ShopperBaskets.PaymentMethodResult.

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

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.PaymentMethodResult>

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

getPriceBooksForBasket

  • getPriceBooksForBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<PriceBookIds>
  • getPriceBooksForBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.PriceBookIds>
  • ( 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

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

      An object containing the options for this method.

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

    Returns Promise<PriceBookIds>

    A promise of type ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.PriceBookIds>

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

getShippingMethodsForShipment

  • getShippingMethodsForShipment(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<ShippingMethodResult>
  • getShippingMethodsForShipment<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<ShippingMethodResult>

    A promise of type ShopperBaskets.ShippingMethodResult.

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

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.ShippingMethodResult>

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

getTaxesFromBasket

  • getTaxesFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Taxes>
  • getTaxesFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Taxes>

    A promise of type ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Taxes>

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

mergeBasket

  • mergeBasket(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { createDestinationBasket?: boolean; locale?: string; organizationId?: string; productItemMergeMode?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • mergeBasket<T>(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { createDestinationBasket?: boolean; locale?: string; organizationId?: string; productItemMergeMode?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { createDestinationBasket?: boolean; locale?: string; organizationId?: string; productItemMergeMode?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: object
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { createDestinationBasket?: boolean; locale?: string; organizationId?: string; productItemMergeMode?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { createDestinationBasket?: boolean; locale?: string; organizationId?: string; productItemMergeMode?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: object
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { createDestinationBasket?: boolean; locale?: string; organizationId?: string; productItemMergeMode?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

removeCouponFromBasket

  • removeCouponFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; couponItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • removeCouponFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; couponItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; couponItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Removes a coupon from the basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

removeGiftCertificateItemFromBasket

  • removeGiftCertificateItemFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • removeGiftCertificateItemFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Deletes a gift certificate item from an existing basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

removeItemFromBasket

  • removeItemFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • removeItemFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Removes a product item from the basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

removePaymentInstrumentFromBasket

  • removePaymentInstrumentFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • removePaymentInstrumentFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Removes a payment instrument of a basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

removePriceAdjustmentFromBasket

  • removePriceAdjustmentFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; priceAdjustmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • removePriceAdjustmentFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; priceAdjustmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; priceAdjustmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Removes a custom manual price adjustment from the basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

removeShipmentFromBasket

  • removeShipmentFromBasket(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • removeShipmentFromBasket<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

transferBasket

  • transferBasket(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; overrideExisting?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • transferBasket<T>(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; overrideExisting?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; overrideExisting?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; overrideExisting?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateAsAgentBasket

  • updateAsAgentBasket(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateAsAgentBasket<T>(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • Marks a basket as an agent basket.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Marks a basket as an agent basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateAsStorefrontBasket

  • updateAsStorefrontBasket(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; exchange?: boolean; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateAsStorefrontBasket<T>(options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; exchange?: boolean; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; exchange?: boolean; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: object
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; exchange?: boolean; locale?: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Marks a basket as a storefront basket.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: object; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; exchange?: boolean; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: object
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; exchange?: boolean; locale?: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateBasket

  • updateBasket(options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateBasket<T>(options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Basket
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Basket
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateBillingAddressForBasket

  • updateBillingAddressForBasket(options: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string; useAsShipping?: boolean } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateBillingAddressForBasket<T>(options: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string; useAsShipping?: boolean } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string; useAsShipping?: boolean } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string; useAsShipping?: boolean } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Sets the billing address of a basket.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string; useAsShipping?: boolean } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string; useAsShipping?: boolean } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateCustomerForBasket

  • updateCustomerForBasket(options: { body: CustomerInfo; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateCustomerForBasket<T>(options: { body: CustomerInfo; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • Sets customer information for an existing basket.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Sets customer information for an existing basket.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateGiftCertificateItemInBasket

  • updateGiftCertificateItemInBasket(options: { body: GiftCertificateItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateGiftCertificateItemInBasket<T>(options: { body: GiftCertificateItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • 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

    • options: { body: GiftCertificateItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Updates a gift certificate item of an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: GiftCertificateItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; giftCertificateItemId: string; locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateItemInBasket

  • updateItemInBasket(options: { body: ProductItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateItemInBasket<T>(options: { body: ProductItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: ProductItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: ProductItem
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: ProductItem; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: ProductItem
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; itemId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateItemsInBasket

  • updateItemsInBasket(options: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateItemsInBasket<T>(options: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Array<ProductItem>
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: Array<ProductItem>; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Array<ProductItem>
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updatePaymentInstrumentInBasket

  • updatePaymentInstrumentInBasket(options: { body: OrderPaymentInstrument; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updatePaymentInstrumentInBasket<T>(options: { body: OrderPaymentInstrument; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • Updates payment instrument of an existing basket.

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

    Parameters

    • options: { body: OrderPaymentInstrument; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentInstrument
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

  • Updates payment instrument of an existing basket.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderPaymentInstrument; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; removeExternalTax?: boolean; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentInstrument
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; paymentInstrumentId: string; removeExternalTax?: boolean; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updatePriceAdjustmentInBasket

  • updatePriceAdjustmentInBasket(options: { body: PriceAdjustment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; priceAdjustmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updatePriceAdjustmentInBasket<T>(options: { body: PriceAdjustment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; priceAdjustmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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.

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

    Parameters

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

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: PriceAdjustment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; organizationId?: string; priceAdjustmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateShipmentForBasket

  • updateShipmentForBasket(options: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateShipmentForBasket<T>(options: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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

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

    Parameters

    • options: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.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: { body: Shipment; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateShippingAddressForShipment

  • updateShippingAddressForShipment(options: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; shipmentId: string; siteId?: string; useAsBilling?: boolean } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateShippingAddressForShipment<T>(options: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; shipmentId: string; siteId?: string; useAsBilling?: boolean } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.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: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; shipmentId: string; siteId?: string; useAsBilling?: boolean } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; shipmentId: string; siteId?: string; useAsBilling?: boolean } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

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

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderAddress; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; shipmentId: string; siteId?: string; useAsBilling?: boolean } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderAddress
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { basketId: string; locale?: string; organizationId?: string; removeExternalTax?: boolean; shipmentId: string; siteId?: string; useAsBilling?: boolean } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

updateShippingMethodForShipment

  • updateShippingMethodForShipment(options: { body: ShippingMethod; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Basket>
  • updateShippingMethodForShipment<T>(options: { body: ShippingMethod; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperBaskets.Basket>
  • 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

    • options: { body: ShippingMethod; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

    Returns Promise<Basket>

    A promise of type ShopperBaskets.Basket.

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

    Type parameters

    • T: boolean

    Parameters

    • options: { body: ShippingMethod; fetchOptions?: RequestInit; headers?: {}; parameters?: { basketId: string; locale?: string; organizationId?: string; shipmentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

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

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

    Returns Promise<T extends true ? Response : ShopperBaskets.Basket>

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

Generated using TypeDoc