Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShopperCustomers<ConfigParameters>

Allow customers to manage their own profiles and product lists.

Simple example:

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

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

Type parameters

Hierarchy

  • ShopperCustomers

Index

Constructors

constructor

Properties

clientConfig

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

Static Readonly defaultBaseUri

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

Static Readonly paramKeys

paramKeys: { createCustomerAddress: ["organizationId", "customerId", "siteId"]; createCustomerAddressRequired: ["organizationId", "customerId", "siteId"]; createCustomerPaymentInstrument: ["organizationId", "customerId", "siteId"]; createCustomerPaymentInstrumentRequired: ["organizationId", "customerId", "siteId"]; createCustomerProductList: ["organizationId", "customerId", "siteId"]; createCustomerProductListItem: ["organizationId", "customerId", "listId", "siteId"]; createCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "siteId"]; createCustomerProductListRequired: ["organizationId", "customerId", "siteId"]; deleteCustomerPaymentInstrument: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]; deleteCustomerPaymentInstrumentRequired: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]; deleteCustomerProductList: ["organizationId", "customerId", "listId", "siteId"]; deleteCustomerProductListItem: ["organizationId", "customerId", "listId", "itemId", "siteId"]; deleteCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "itemId", "siteId"]; deleteCustomerProductListRequired: ["organizationId", "customerId", "listId", "siteId"]; getCustomer: ["organizationId", "customerId", "siteId"]; getCustomerAddress: ["organizationId", "customerId", "addressName", "siteId"]; getCustomerAddressRequired: ["organizationId", "customerId", "addressName", "siteId"]; getCustomerBaskets: ["organizationId", "customerId", "siteId"]; getCustomerBasketsRequired: ["organizationId", "customerId", "siteId"]; getCustomerOrders: ["organizationId", "customerId", "crossSites", "from", "until", "status", "siteId", "offset", "limit"]; getCustomerOrdersRequired: ["organizationId", "customerId", "siteId"]; getCustomerPaymentInstrument: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]; getCustomerPaymentInstrumentRequired: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]; getCustomerProductList: ["organizationId", "customerId", "listId", "siteId"]; getCustomerProductListItem: ["organizationId", "customerId", "listId", "itemId", "siteId"]; getCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "itemId", "siteId"]; getCustomerProductListRequired: ["organizationId", "customerId", "listId", "siteId"]; getCustomerProductLists: ["organizationId", "customerId", "siteId"]; getCustomerProductListsRequired: ["organizationId", "customerId", "siteId"]; getCustomerRequired: ["organizationId", "customerId", "siteId"]; getExternalProfile: ["organizationId", "externalId", "authenticationProviderId", "siteId"]; getExternalProfileRequired: ["organizationId", "externalId", "authenticationProviderId", "siteId"]; getProductListItem: ["organizationId", "listId", "itemId", "siteId"]; getProductListItemRequired: ["organizationId", "listId", "itemId", "siteId"]; getPublicProductList: ["organizationId", "listId", "siteId"]; getPublicProductListRequired: ["organizationId", "listId", "siteId"]; getPublicProductListsBySearchTerm: ["organizationId", "email", "firstName", "lastName", "siteId"]; getPublicProductListsBySearchTermRequired: ["organizationId", "siteId"]; getResetPasswordToken: ["organizationId", "siteId"]; getResetPasswordTokenRequired: ["organizationId", "siteId"]; registerCustomer: ["organizationId", "siteId"]; registerCustomerRequired: ["organizationId", "siteId"]; registerExternalProfile: ["organizationId", "siteId"]; registerExternalProfileRequired: ["organizationId", "siteId"]; removeCustomerAddress: ["organizationId", "customerId", "addressName", "siteId"]; removeCustomerAddressRequired: ["organizationId", "customerId", "addressName", "siteId"]; resetPassword: ["organizationId", "siteId"]; resetPasswordRequired: ["organizationId", "siteId"]; updateCustomer: ["organizationId", "customerId", "siteId"]; updateCustomerAddress: ["organizationId", "customerId", "addressName", "siteId"]; updateCustomerAddressRequired: ["organizationId", "customerId", "addressName", "siteId"]; updateCustomerPassword: ["organizationId", "customerId", "siteId"]; updateCustomerPasswordRequired: ["organizationId", "customerId", "siteId"]; updateCustomerProductList: ["organizationId", "customerId", "listId", "siteId"]; updateCustomerProductListItem: ["organizationId", "customerId", "listId", "itemId", "siteId"]; updateCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "itemId", "siteId"]; updateCustomerProductListRequired: ["organizationId", "customerId", "listId", "siteId"]; updateCustomerRequired: ["organizationId", "customerId", "siteId"] } = {registerCustomer: ['organizationId','siteId',],registerCustomerRequired: ['organizationId','siteId',],resetPassword: ['organizationId','siteId',],resetPasswordRequired: ['organizationId','siteId',],getResetPasswordToken: ['organizationId','siteId',],getResetPasswordTokenRequired: ['organizationId','siteId',],registerExternalProfile: ['organizationId','siteId',],registerExternalProfileRequired: ['organizationId','siteId',],getExternalProfile: ['organizationId','externalId','authenticationProviderId','siteId',],getExternalProfileRequired: ['organizationId','externalId','authenticationProviderId','siteId',],getCustomer: ['organizationId','customerId','siteId',],getCustomerRequired: ['organizationId','customerId','siteId',],updateCustomer: ['organizationId','customerId','siteId',],updateCustomerRequired: ['organizationId','customerId','siteId',],createCustomerAddress: ['organizationId','customerId','siteId',],createCustomerAddressRequired: ['organizationId','customerId','siteId',],getCustomerAddress: ['organizationId','customerId','addressName','siteId',],getCustomerAddressRequired: ['organizationId','customerId','addressName','siteId',],removeCustomerAddress: ['organizationId','customerId','addressName','siteId',],removeCustomerAddressRequired: ['organizationId','customerId','addressName','siteId',],updateCustomerAddress: ['organizationId','customerId','addressName','siteId',],updateCustomerAddressRequired: ['organizationId','customerId','addressName','siteId',],getCustomerBaskets: ['organizationId','customerId','siteId',],getCustomerBasketsRequired: ['organizationId','customerId','siteId',],getCustomerOrders: ['organizationId','customerId','crossSites','from','until','status','siteId','offset','limit',],getCustomerOrdersRequired: ['organizationId','customerId','siteId',],updateCustomerPassword: ['organizationId','customerId','siteId',],updateCustomerPasswordRequired: ['organizationId','customerId','siteId',],createCustomerPaymentInstrument: ['organizationId','customerId','siteId',],createCustomerPaymentInstrumentRequired: ['organizationId','customerId','siteId',],deleteCustomerPaymentInstrument: ['organizationId','customerId','paymentInstrumentId','siteId',],deleteCustomerPaymentInstrumentRequired: ['organizationId','customerId','paymentInstrumentId','siteId',],getCustomerPaymentInstrument: ['organizationId','customerId','paymentInstrumentId','siteId',],getCustomerPaymentInstrumentRequired: ['organizationId','customerId','paymentInstrumentId','siteId',],getCustomerProductLists: ['organizationId','customerId','siteId',],getCustomerProductListsRequired: ['organizationId','customerId','siteId',],createCustomerProductList: ['organizationId','customerId','siteId',],createCustomerProductListRequired: ['organizationId','customerId','siteId',],deleteCustomerProductList: ['organizationId','customerId','listId','siteId',],deleteCustomerProductListRequired: ['organizationId','customerId','listId','siteId',],getCustomerProductList: ['organizationId','customerId','listId','siteId',],getCustomerProductListRequired: ['organizationId','customerId','listId','siteId',],updateCustomerProductList: ['organizationId','customerId','listId','siteId',],updateCustomerProductListRequired: ['organizationId','customerId','listId','siteId',],createCustomerProductListItem: ['organizationId','customerId','listId','siteId',],createCustomerProductListItemRequired: ['organizationId','customerId','listId','siteId',],deleteCustomerProductListItem: ['organizationId','customerId','listId','itemId','siteId',],deleteCustomerProductListItemRequired: ['organizationId','customerId','listId','itemId','siteId',],getCustomerProductListItem: ['organizationId','customerId','listId','itemId','siteId',],getCustomerProductListItemRequired: ['organizationId','customerId','listId','itemId','siteId',],updateCustomerProductListItem: ['organizationId','customerId','listId','itemId','siteId',],updateCustomerProductListItemRequired: ['organizationId','customerId','listId','itemId','siteId',],getPublicProductListsBySearchTerm: ['organizationId','email','firstName','lastName','siteId',],getPublicProductListsBySearchTermRequired: ['organizationId','siteId',],getPublicProductList: ['organizationId','listId','siteId',],getPublicProductListRequired: ['organizationId','listId','siteId',],getProductListItem: ['organizationId','listId','itemId','siteId',],getProductListItemRequired: ['organizationId','listId','itemId','siteId',],} as const

Type declaration

  • createCustomerAddress: ["organizationId", "customerId", "siteId"]
  • createCustomerAddressRequired: ["organizationId", "customerId", "siteId"]
  • createCustomerPaymentInstrument: ["organizationId", "customerId", "siteId"]
  • createCustomerPaymentInstrumentRequired: ["organizationId", "customerId", "siteId"]
  • createCustomerProductList: ["organizationId", "customerId", "siteId"]
  • createCustomerProductListItem: ["organizationId", "customerId", "listId", "siteId"]
  • createCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "siteId"]
  • createCustomerProductListRequired: ["organizationId", "customerId", "siteId"]
  • deleteCustomerPaymentInstrument: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]
  • deleteCustomerPaymentInstrumentRequired: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]
  • deleteCustomerProductList: ["organizationId", "customerId", "listId", "siteId"]
  • deleteCustomerProductListItem: ["organizationId", "customerId", "listId", "itemId", "siteId"]
  • deleteCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "itemId", "siteId"]
  • deleteCustomerProductListRequired: ["organizationId", "customerId", "listId", "siteId"]
  • getCustomer: ["organizationId", "customerId", "siteId"]
  • getCustomerAddress: ["organizationId", "customerId", "addressName", "siteId"]
  • getCustomerAddressRequired: ["organizationId", "customerId", "addressName", "siteId"]
  • getCustomerBaskets: ["organizationId", "customerId", "siteId"]
  • getCustomerBasketsRequired: ["organizationId", "customerId", "siteId"]
  • getCustomerOrders: ["organizationId", "customerId", "crossSites", "from", "until", "status", "siteId", "offset", "limit"]
  • getCustomerOrdersRequired: ["organizationId", "customerId", "siteId"]
  • getCustomerPaymentInstrument: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]
  • getCustomerPaymentInstrumentRequired: ["organizationId", "customerId", "paymentInstrumentId", "siteId"]
  • getCustomerProductList: ["organizationId", "customerId", "listId", "siteId"]
  • getCustomerProductListItem: ["organizationId", "customerId", "listId", "itemId", "siteId"]
  • getCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "itemId", "siteId"]
  • getCustomerProductListRequired: ["organizationId", "customerId", "listId", "siteId"]
  • getCustomerProductLists: ["organizationId", "customerId", "siteId"]
  • getCustomerProductListsRequired: ["organizationId", "customerId", "siteId"]
  • getCustomerRequired: ["organizationId", "customerId", "siteId"]
  • getExternalProfile: ["organizationId", "externalId", "authenticationProviderId", "siteId"]
  • getExternalProfileRequired: ["organizationId", "externalId", "authenticationProviderId", "siteId"]
  • getProductListItem: ["organizationId", "listId", "itemId", "siteId"]
  • getProductListItemRequired: ["organizationId", "listId", "itemId", "siteId"]
  • getPublicProductList: ["organizationId", "listId", "siteId"]
  • getPublicProductListRequired: ["organizationId", "listId", "siteId"]
  • getPublicProductListsBySearchTerm: ["organizationId", "email", "firstName", "lastName", "siteId"]
  • getPublicProductListsBySearchTermRequired: ["organizationId", "siteId"]
  • getResetPasswordToken: ["organizationId", "siteId"]
  • getResetPasswordTokenRequired: ["organizationId", "siteId"]
  • registerCustomer: ["organizationId", "siteId"]
  • registerCustomerRequired: ["organizationId", "siteId"]
  • registerExternalProfile: ["organizationId", "siteId"]
  • registerExternalProfileRequired: ["organizationId", "siteId"]
  • removeCustomerAddress: ["organizationId", "customerId", "addressName", "siteId"]
  • removeCustomerAddressRequired: ["organizationId", "customerId", "addressName", "siteId"]
  • resetPassword: ["organizationId", "siteId"]
  • resetPasswordRequired: ["organizationId", "siteId"]
  • updateCustomer: ["organizationId", "customerId", "siteId"]
  • updateCustomerAddress: ["organizationId", "customerId", "addressName", "siteId"]
  • updateCustomerAddressRequired: ["organizationId", "customerId", "addressName", "siteId"]
  • updateCustomerPassword: ["organizationId", "customerId", "siteId"]
  • updateCustomerPasswordRequired: ["organizationId", "customerId", "siteId"]
  • updateCustomerProductList: ["organizationId", "customerId", "listId", "siteId"]
  • updateCustomerProductListItem: ["organizationId", "customerId", "listId", "itemId", "siteId"]
  • updateCustomerProductListItemRequired: ["organizationId", "customerId", "listId", "itemId", "siteId"]
  • updateCustomerProductListRequired: ["organizationId", "customerId", "listId", "siteId"]
  • updateCustomerRequired: ["organizationId", "customerId", "siteId"]

Methods

createCustomerAddress

  • Creates a new address with the given name for the given customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<CustomerAddress>

    A promise of type CustomerAddress.

  • Creates a new address with the given name for the given customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerAddress>

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

createCustomerPaymentInstrument

  • Adds a payment instrument to the customer information. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<CustomerPaymentInstrument>

    A promise of type CustomerPaymentInstrument.

  • Adds a payment instrument to the customer information. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerPaymentInstrument>

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

createCustomerProductList

  • Creates a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<CustomerProductList>

    A promise of type CustomerProductList.

  • Creates a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerProductList>

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

createCustomerProductListItem

  • Adds an item to the customer's product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Considered values from the request body are:

    • type → The type of the item to be added to the customer's product. Must be a valid type. Mandatory. list.
    • priority → The priority of the item to be added to the customer's product list.
    • public → The flag that determines whether the item to be added to the customer's product list is public.
    • product_id → The ID (SKU) of the product related to the item to be added to the customer's product list. A valid product ID, used for product item type only. Must be a valid product ID; otherwise, a ProductListProductIdMissingException or ProductListProductNotFoundException is thrown. Mandatory when item type is product.
    • quantity → Used for product item type only. This is the quantity of the item to be added to the customer's product list.

    You can also use a custom property of the form c_\<CUSTOM_NAME\>. The custom property must correspond to a custom attribute (\<CUSTOM_NAME\>) that is defined for ProductListItem. The value of this property must be valid for the type of custom attribute defined for ProductListItem.

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

    Parameters

    Returns Promise<CustomerProductListItem>

    A promise of type CustomerProductListItem.

  • Adds an item to the customer's product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Considered values from the request body are:

    • type → The type of the item to be added to the customer's product. Must be a valid type. Mandatory. list.
    • priority → The priority of the item to be added to the customer's product list.
    • public → The flag that determines whether the item to be added to the customer's product list is public.
    • product_id → The ID (SKU) of the product related to the item to be added to the customer's product list. A valid product ID, used for product item type only. Must be a valid product ID; otherwise, a ProductListProductIdMissingException or ProductListProductNotFoundException is thrown. Mandatory when item type is product.
    • quantity → Used for product item type only. This is the quantity of the item to be added to the customer's product list.

    You can also use a custom property of the form c_\<CUSTOM_NAME\>. The custom property must correspond to a custom attribute (\<CUSTOM_NAME\>) that is defined for ProductListItem. The value of this property must be valid for the type of custom attribute defined for ProductListItem.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerProductListItem>

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

deleteCustomerPaymentInstrument

  • deleteCustomerPaymentInstrument(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ customerId: string; organizationId: string; paymentInstrumentId: string; siteId: string } & {}, ConfigParameters> }>): Promise<void>
  • deleteCustomerPaymentInstrument<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ customerId: string; organizationId: string; paymentInstrumentId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : void>
  • Deletes a customer's payment instrument. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<void>

    A promise of type void.

  • Deletes a customer's payment instrument. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : void>

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

deleteCustomerProductList

  • Deletes a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Deletes a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : void>

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

deleteCustomerProductListItem

  • deleteCustomerProductListItem(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ customerId: string; itemId: string; listId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<void>
  • deleteCustomerProductListItem<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ customerId: string; itemId: string; listId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : void>
  • Removes an item from a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<void>

    A promise of type void.

  • Removes an item from a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : void>

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

getCustomer

  • Gets a customer with all existing addresses and payment instruments associated with the requested customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<Customer>

    A promise of type Customer.

  • Gets a customer with all existing addresses and payment instruments associated with the requested customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Customer>

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

getCustomerAddress

  • Retrieves a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<CustomerAddress>

    A promise of type CustomerAddress.

  • Retrieves a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerAddress>

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

getCustomerBaskets

  • Gets the baskets of a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<BasketsResult>

    A promise of type BasketsResult.

  • Gets the baskets of a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : BasketsResult>

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

getCustomerOrders

  • getCustomerOrders(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ crossSites?: undefined | false | true; customerId: string; from?: undefined | string; limit?: undefined | number; offset?: any; organizationId: string; siteId: string; status?: undefined | string; until?: undefined | string } & {}, ConfigParameters> }>): Promise<CustomerOrderResult>
  • getCustomerOrders<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ crossSites?: undefined | false | true; customerId: string; from?: undefined | string; limit?: undefined | number; offset?: any; organizationId: string; siteId: string; status?: undefined | string; until?: undefined | string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : CustomerOrderResult>
  • Returns a pageable list of all customer's orders. The default page size is 10. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ crossSites?: undefined | false | true; customerId: string; from?: undefined | string; limit?: undefined | number; offset?: any; organizationId: string; siteId: string; status?: undefined | string; until?: undefined | string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    Returns Promise<CustomerOrderResult>

    A promise of type CustomerOrderResult.

  • Returns a pageable list of all customer's orders. The default page size is 10. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ crossSites?: undefined | false | true; customerId: string; from?: undefined | string; limit?: undefined | number; offset?: any; organizationId: string; siteId: string; status?: undefined | string; until?: undefined | string } & {}, ConfigParameters> }>

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerOrderResult>

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

getCustomerPaymentInstrument

  • Retrieves a customer's payment instrument by its ID. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<CustomerPaymentInstrument>

    A promise of type CustomerPaymentInstrument.

  • Retrieves a customer's payment instrument by its ID. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerPaymentInstrument>

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

getCustomerProductList

  • Returns a customer product list of the given customer and the items in the list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<CustomerProductList>

    A promise of type CustomerProductList.

  • Returns a customer product list of the given customer and the items in the list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerProductList>

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

getCustomerProductListItem

  • Returns an item of a customer product list and the actual product details like image, availability and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<CustomerProductListItem>

    A promise of type CustomerProductListItem.

  • Returns an item of a customer product list and the actual product details like image, availability and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerProductListItem>

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

getCustomerProductLists

  • Returns all customer product lists. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<CustomerProductListResult>

    A promise of type CustomerProductListResult.

  • Returns all customer product lists. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerProductListResult>

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

getExternalProfile

  • Gets the new external profile for a customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<CustomerExternalProfile>

    A promise of type CustomerExternalProfile.

  • Gets the new external profile for a customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerExternalProfile>

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

getProductListItem

  • Retrieves an item from a public product list and the actual product details like product, image, availability and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<PublicProductListItem>

    A promise of type PublicProductListItem.

  • Retrieves an item from a public product list and the actual product details like product, image, availability and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : PublicProductListItem>

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

getPublicProductList

  • Retrieves a public product list by ID and the items under that product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<PublicProductList>

    A promise of type PublicProductList.

  • Retrieves a public product list by ID and the items under that product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : PublicProductList>

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

getPublicProductListsBySearchTerm

  • getPublicProductListsBySearchTerm(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ email?: undefined | string; firstName?: undefined | string; lastName?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<PublicProductListResult>
  • getPublicProductListsBySearchTerm<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ email?: undefined | string; firstName?: undefined | string; lastName?: undefined | string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : PublicProductListResult>
  • Retrieves all public product lists as defined by the given search term (for example, email OR first name and last name). This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

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

      An object containing the options for this method.

    Returns Promise<PublicProductListResult>

    A promise of type PublicProductListResult.

  • Retrieves all public product lists as defined by the given search term (for example, email OR first name and last name). This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : PublicProductListResult>

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

getResetPasswordToken

  • Get reset password token. This is the first step in the reset customer password flow, where a password reset token is requested for future use to reset a customer password. This call should be followed by a call to the /reset endpoint.

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

    Parameters

    Returns Promise<ResetPasswordToken>

    A promise of type ResetPasswordToken.

  • Get reset password token. This is the first step in the reset customer password flow, where a password reset token is requested for future use to reset a customer password. This call should be followed by a call to the /reset endpoint.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : ResetPasswordToken>

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

registerCustomer

  • Registers a new customer. The mandatory data are the credentials, profile last name, and email. This requires a JSON Web Token (JWT) which needs to be obtained using the POST /customers/auth API with type "guest", or from the Shopper Login (SLAS) API. The return type object for this endpoint is a common customer object shared by multiple Shopper Customer endpoints. In this case, all customer object details are returned, but attributes that are not included in the response, although they might be part of the customer object, are ignored. For example, although address information is included in the customer object, it is not displayed in the response for this endpoint and is ignored.

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

    Parameters

    Returns Promise<Customer>

    A promise of type Customer.

  • Registers a new customer. The mandatory data are the credentials, profile last name, and email. This requires a JSON Web Token (JWT) which needs to be obtained using the POST /customers/auth API with type "guest", or from the Shopper Login (SLAS) API. The return type object for this endpoint is a common customer object shared by multiple Shopper Customer endpoints. In this case, all customer object details are returned, but attributes that are not included in the response, although they might be part of the customer object, are ignored. For example, although address information is included in the customer object, it is not displayed in the response for this endpoint and is ignored.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : Customer>

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

registerExternalProfile

  • Registers a new external profile for a customer. This endpoint accepts a guest customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<CustomerExternalProfile>

    A promise of type CustomerExternalProfile.

  • Registers a new external profile for a customer. This endpoint accepts a guest customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerExternalProfile>

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

removeCustomerAddress

  • removeCustomerAddress(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ addressName: string; customerId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>): Promise<void>
  • removeCustomerAddress<T>(options?: RequireParametersUnlessAllAreOptional<{ headers?: undefined | {}; parameters?: CompositeParameters<{ addressName: string; customerId: string; organizationId: string; siteId: string } & {}, ConfigParameters> }>, rawResponse?: T): Promise<T extends true ? Response : void>
  • Deletes a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Deletes a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : void>

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

resetPassword

  • Reset customer password, after obtaining a reset token. This is the second step in the reset customer password flow, where a customer password is reset by providing the new credentials along with a reset token. This call should be preceded by a call to the /create-reset-token endpoint.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Reset customer password, after obtaining a reset token. This is the second step in the reset customer password flow, where a customer password is reset by providing the new credentials along with a reset token. This call should be preceded by a call to the /create-reset-token endpoint.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : void>

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

updateCustomer

  • Updates a customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<Customer>

    A promise of type Customer.

  • Updates a customer. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : Customer>

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

updateCustomerAddress

  • Updates a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<CustomerAddress>

    A promise of type CustomerAddress.

  • Updates a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

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

      An object containing the options for this method.

    • Optional rawResponse: T

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

    Returns Promise<T extends true ? Response : CustomerAddress>

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

updateCustomerPassword

  • Updates the customer's password. This endpoint accepts a registered customer ShopperToken (JWT) only.

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

    Parameters

    Returns Promise<void>

    A promise of type void.

  • Updates the customer's password. This endpoint accepts a registered customer ShopperToken (JWT) only.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : void>

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

updateCustomerProductList

  • Changes a product list. Changeable properties are the name, description, and if the list is public. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

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

    Parameters

    Returns Promise<CustomerProductList>

    A promise of type CustomerProductList.

  • Changes a product list. Changeable properties are the name, description, and if the list is public. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerProductList>

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

updateCustomerProductListItem

  • Updates an item of a customer's product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. Considered values from the request body are:

    priority: This is the priority of the customer's product list item. public: This is the flag whether the customer's product list item is public. quantity: This is the quantity of the customer's product list item. Used for product item type only. custom properties in the form c_<CUSTOM_NAME>: The custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductListItem. The value of this property must be valid for the type of custom attribute defined for ProductListItem.

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

    Parameters

    Returns Promise<CustomerProductListItem>

    A promise of type CustomerProductListItem.

  • Updates an item of a customer's product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. Considered values from the request body are:

    priority: This is the priority of the customer's product list item. public: This is the flag whether the customer's product list item is public. quantity: This is the quantity of the customer's product list item. Used for product item type only. custom properties in the form c_<CUSTOM_NAME>: The custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductListItem. The value of this property must be valid for the type of custom attribute defined for ProductListItem.

    Type parameters

    • T: boolean

    Parameters

    Returns Promise<T extends true ? Response : CustomerProductListItem>

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

Generated using TypeDoc