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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerAddress otherwise.
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.
An object containing the options for this method.
A promise of type CustomerPaymentInstrument.
Adds a payment instrument to the customer information. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerPaymentInstrument otherwise.
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.
An object containing the options for this method.
A promise of type CustomerProductList.
Creates a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductList otherwise.
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.
An object containing the options for this method.
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
.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductListItem otherwise.
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.
An object containing the options for this method.
A promise of type void.
Deletes a customer's payment instrument. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
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.
An object containing the options for this method.
A promise of type void.
Deletes a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
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.
An object containing the options for this method.
A promise of type CustomerAddress.
Retrieves a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerAddress otherwise.
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.
An object containing the options for this method.
A promise of type BasketsResult.
Gets the baskets of a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type BasketsResult otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerOrderResult otherwise.
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.
An object containing the options for this method.
A promise of type CustomerPaymentInstrument.
Retrieves a customer's payment instrument by its ID. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerPaymentInstrument otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductList otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductListItem otherwise.
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.
An object containing the options for this method.
A promise of type CustomerProductListResult.
Returns all customer product lists. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductListResult otherwise.
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.
An object containing the options for this method.
A promise of type CustomerExternalProfile.
Gets the new external profile for a customer. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerExternalProfile otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type PublicProductListItem otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type PublicProductList otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type PublicProductListResult otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type ResetPasswordToken otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
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.
An object containing the options for this method.
A promise of type CustomerExternalProfile.
Registers a new external profile for a customer. This endpoint accepts a guest customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerExternalProfile otherwise.
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.
An object containing the options for this method.
A promise of type void.
Deletes a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
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.
An object containing the options for this method.
A promise of type Customer.
Updates a customer. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Customer otherwise.
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.
An object containing the options for this method.
A promise of type CustomerAddress.
Updates a customer's address by address name. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerAddress otherwise.
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.
An object containing the options for this method.
A promise of type void.
Updates the customer's password. This endpoint accepts a registered customer ShopperToken (JWT) only.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductList otherwise.
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.
An object containing the options for this method.
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.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type CustomerProductListItem otherwise.
Generated using TypeDoc
Shopper Customers
Allow customers to manage their own profiles and product lists.
Simple example:
API Version: 0.0.49import { ShopperCustomers } from "commerce-sdk-isomorphic"; const clientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; const shopperCustomersClient = new ShopperCustomers(clientConfig);
Last Updated: