new module:api/CustomersApi(apiClient)
Constructs a new CustomersApi.
Parameters:
Name | Type | Description |
---|---|---|
apiClient |
module:ApiClient | Optional API client implementation to use, default to module:ApiClient#instance if unspecified. |
- Source:
Methods
deleteCustomersAuth(opts) → {Promise}
Invalidates the JWT provided in the header.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise
- Type
- Promise
deleteCustomersAuthWithHttpInfo(opts) → {Promise}
Invalidates the JWT provided in the header.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
deleteCustomersByIDAddressesByID(customerId, addressName) → {Promise}
Deletes a customer's address by address name.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to delete the address for |
addressName |
String | the name of the address to delete |
- Source:
Returns:
a Promise
- Type
- Promise
deleteCustomersByIDAddressesByIDWithHttpInfo(customerId, addressName) → {Promise}
Deletes a customer's address by address name.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to delete the address for |
addressName |
String | the name of the address to delete |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
deleteCustomersByIDPaymentInstrumentsByID(customerId, paymentInstrumentId) → {Promise}
Deletes a customer's payment instrument.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to delete the payment instrument for |
paymentInstrumentId |
String | the id of the payment instrument to be deleted |
- Source:
Returns:
a Promise
- Type
- Promise
deleteCustomersByIDPaymentInstrumentsByIDWithHttpInfo(customerId, paymentInstrumentId) → {Promise}
Deletes a customer's payment instrument.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to delete the payment instrument for |
paymentInstrumentId |
String | the id of the payment instrument to be deleted |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
deleteCustomersByIDProductListsByID(customerId, listId) → {Promise}
Deletes a customer product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The customer id. |
listId |
String | The product list id. |
- Source:
Returns:
a Promise
- Type
- Promise
deleteCustomersByIDProductListsByIDItemsByID(customerId, listId, itemId) → {Promise}
Removes an item from a customer product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the owner of the product list |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to delete. |
- Source:
Returns:
a Promise
- Type
- Promise
deleteCustomersByIDProductListsByIDItemsByIDWithHttpInfo(customerId, listId, itemId) → {Promise}
Removes an item from a customer product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the owner of the product list |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to delete. |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
deleteCustomersByIDProductListsByIDWithHttpInfo(customerId, listId) → {Promise}
Deletes a customer product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The customer id. |
listId |
String | The product list id. |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
getCustomersByID(customerId, opts) → {Promise}
Gets a customer.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The customer id |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/Customer
- Type
- Promise
getCustomersByIDAddresses(customerId, opts) → {Promise}
Returns a sorted pageable list of all customer addresses in the address book. The default page size is 10 customer addresses. The addresses are sorted so that the preferred address is always sorted first. The remaining addresses are sorted alphabetically by ID. When the customer cannot be found CustomerNotFoundException is thrown in a case of an agent but an empty result list is returned in a case of JWT.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
customerId |
String | The customer uuid |
|||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerAddressResult
- Type
- Promise
getCustomersByIDAddressesByID(customerId, addressName) → {Promise}
Retrieves a customer's address by address name.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to retrieve the address for |
addressName |
String | the name of the address to retrieve |
- Source:
Returns:
a Promise, with data of type module:models/CustomerAddress
- Type
- Promise
getCustomersByIDAddressesByIDWithHttpInfo(customerId, addressName) → {Promise}
Retrieves a customer's address by address name.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to retrieve the address for |
addressName |
String | the name of the address to retrieve |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerAddress and HTTP response
- Type
- Promise
getCustomersByIDAddressesWithHttpInfo(customerId, opts) → {Promise}
Returns a sorted pageable list of all customer addresses in the address book. The default page size is 10 customer addresses. The addresses are sorted so that the preferred address is always sorted first. The remaining addresses are sorted alphabetically by ID. When the customer cannot be found CustomerNotFoundException is thrown in a case of an agent but an empty result list is returned in a case of JWT.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
customerId |
String | The customer uuid |
|||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerAddressResult and HTTP response
- Type
- Promise
getCustomersByIDBaskets(customerId) → {Promise}
Gets the baskets of a customer.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to retrieve the baskets for |
- Source:
Returns:
a Promise, with data of type module:models/BasketsResult
- Type
- Promise
getCustomersByIDBasketsWithHttpInfo(customerId) → {Promise}
Gets the baskets of a customer.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to retrieve the baskets for |
- Source:
Returns:
a Promise, with an object containing data of type module:models/BasketsResult and HTTP response
- Type
- Promise
getCustomersByIDOrders(customerId, opts) → {Promise}
Returns a pageable list of all customer's orders. The default page size is 10.
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
customerId |
String | the customer uuid |
|||||||||||||||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerOrderResult
- Type
- Promise
getCustomersByIDOrdersWithHttpInfo(customerId, opts) → {Promise}
Returns a pageable list of all customer's orders. The default page size is 10.
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
customerId |
String | the customer uuid |
|||||||||||||||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerOrderResult and HTTP response
- Type
- Promise
getCustomersByIDPaymentInstruments(customerId, opts) → {Promise}
Gets customer payment instruments for an customer. Can be limited to a specific payment method by providing query parameter payment_method_id. When the customer cannot be found CustomerNotFoundException is thrown in a case of an agent but an empty result list is returned in a case of JWT.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | the id of the customer to retrieve the payment instruments for |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerPaymentInstrumentResult
- Type
- Promise
getCustomersByIDPaymentInstrumentsByID(customerId, paymentInstrumentId) → {Promise}
Retrieves a customer's payment instrument by its id.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to retrieve the payment instrument for |
paymentInstrumentId |
String | the id of the payment instrument to be retrievedCustomer |
- Source:
Returns:
a Promise, with data of type module:models/CustomerPaymentInstrument
- Type
- Promise
getCustomersByIDPaymentInstrumentsByIDWithHttpInfo(customerId, paymentInstrumentId) → {Promise}
Retrieves a customer's payment instrument by its id.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to retrieve the payment instrument for |
paymentInstrumentId |
String | the id of the payment instrument to be retrievedCustomer |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerPaymentInstrument and HTTP response
- Type
- Promise
getCustomersByIDPaymentInstrumentsWithHttpInfo(customerId, opts) → {Promise}
Gets customer payment instruments for an customer. Can be limited to a specific payment method by providing query parameter payment_method_id. When the customer cannot be found CustomerNotFoundException is thrown in a case of an agent but an empty result list is returned in a case of JWT.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | the id of the customer to retrieve the payment instruments for |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerPaymentInstrumentResult and HTTP response
- Type
- Promise
getCustomersByIDProductLists(customerId, opts) → {Promise}
Returns all customer product lists.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The customer id. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListResult
- Type
- Promise
getCustomersByIDProductListsByID(customerId, listId, opts) → {Promise}
Returns a customer product list of the given customer.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The customer id. |
||||||
listId |
String | The product list id. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductList
- Type
- Promise
getCustomersByIDProductListsByIDItems(customerId, listId, opts) → {Promise}
Returns a pageable list of all items of a customer's product list. The default page size is 10.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
customerId |
String | The id of the customer to retrieve the product list items for. |
||||||||||||
listId |
String | The id of the product list. |
||||||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItemResult
- Type
- Promise
getCustomersByIDProductListsByIDItemsByID(customerId, listId, itemId, opts) → {Promise}
Returns an item of a customer product list.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The id of the customer to retrieve the product list items for. |
||||||
listId |
String | The id of the product list. |
||||||
itemId |
String | The id of the product list item to retrieve. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItem
- Type
- Promise
getCustomersByIDProductListsByIDItemsByIDPurchases(customerId, listId, itemId) → {Promise}
Returns a list of all purchases of an item from a customer's product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer to retrieve the product list item purchases for. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to retrieve from. |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItemPurchaseResult
- Type
- Promise
getCustomersByIDProductListsByIDItemsByIDPurchasesByID(customerId, listId, itemId, purchaseId) → {Promise}
Returns a purchase of an item from a customer's product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer to retrieve the product list items for. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to retrieve. |
purchaseId |
String | The id of the product list item purchase to retrieve. |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItemPurchase
- Type
- Promise
getCustomersByIDProductListsByIDItemsByIDPurchasesByIDWithHttpInfo(customerId, listId, itemId, purchaseId) → {Promise}
Returns a purchase of an item from a customer's product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer to retrieve the product list items for. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to retrieve. |
purchaseId |
String | The id of the product list item purchase to retrieve. |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItemPurchase and HTTP response
- Type
- Promise
getCustomersByIDProductListsByIDItemsByIDPurchasesWithHttpInfo(customerId, listId, itemId) → {Promise}
Returns a list of all purchases of an item from a customer's product list.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer to retrieve the product list item purchases for. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to retrieve from. |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItemPurchaseResult and HTTP response
- Type
- Promise
getCustomersByIDProductListsByIDItemsByIDWithHttpInfo(customerId, listId, itemId, opts) → {Promise}
Returns an item of a customer product list.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The id of the customer to retrieve the product list items for. |
||||||
listId |
String | The id of the product list. |
||||||
itemId |
String | The id of the product list item to retrieve. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItem and HTTP response
- Type
- Promise
getCustomersByIDProductListsByIDItemsWithHttpInfo(customerId, listId, opts) → {Promise}
Returns a pageable list of all items of a customer's product list. The default page size is 10.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
customerId |
String | The id of the customer to retrieve the product list items for. |
||||||||||||
listId |
String | The id of the product list. |
||||||||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItemResult and HTTP response
- Type
- Promise
getCustomersByIDProductListsByIDWithHttpInfo(customerId, listId, opts) → {Promise}
Returns a customer product list of the given customer.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The customer id. |
||||||
listId |
String | The product list id. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductList and HTTP response
- Type
- Promise
getCustomersByIDProductListsWithHttpInfo(customerId, opts) → {Promise}
Returns all customer product lists.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The customer id. |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListResult and HTTP response
- Type
- Promise
getCustomersByIDWithHttpInfo(customerId, opts) → {Promise}
Gets a customer.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
customerId |
String | The customer id |
||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/Customer and HTTP response
- Type
- Promise
patchCustomersByID(customerId, body) → {Promise}
Updates a customer.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the customer id |
body |
module:models/Customer |
- Source:
Returns:
a Promise, with data of type module:models/Customer
- Type
- Promise
patchCustomersByIDAddressesByID(customerId, addressName, body) → {Promise}
Updates a customer's address by address name.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to update the address for |
addressName |
String | the name of the address to update |
body |
module:models/CustomerAddress |
- Source:
Returns:
a Promise, with data of type module:models/CustomerAddress
- Type
- Promise
patchCustomersByIDAddressesByIDWithHttpInfo(customerId, addressName, body) → {Promise}
Updates a customer's address by address name.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to update the address for |
addressName |
String | the name of the address to update |
body |
module:models/CustomerAddress |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerAddress and HTTP response
- Type
- Promise
patchCustomersByIDProductListsByID(body, customerId, listId) → {Promise}
Changes a product list. Changeable properties are the name, description and if the list is public.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/CustomerProductList | |
customerId |
String | The customer id. |
listId |
String | The product list id. |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductList
- Type
- Promise
patchCustomersByIDProductListsByIDItemsByID(customerId, listId, itemId, body) → {Promise}
Updates an item of a customer's product list. 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: used for product item type only. This is the quantity of the customer's product list item. 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.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the owner of the product list. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to update. |
body |
module:models/CustomerProductListItem |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItem
- Type
- Promise
patchCustomersByIDProductListsByIDItemsByIDPurchasesByID(customerId, listId, itemId, purchaseId, body) → {Promise}
Updates a purchase of an item from a customer's product list. Considered values from the request body are: custom properties in the form c_<CUSTOM_NAME>: the custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductListItemPurchase. The value of this property must be valid for the type of custom attribute defined for ProductListItemPurchase.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer to retrieve the product list item purchases for. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to retrieve. |
purchaseId |
String | The id of the product list item purchase to retrieve. |
body |
module:models/CustomerProductListItemPurchase |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItemPurchase
- Type
- Promise
patchCustomersByIDProductListsByIDItemsByIDPurchasesByIDWithHttpInfo(customerId, listId, itemId, purchaseId, body) → {Promise}
Updates a purchase of an item from a customer's product list. Considered values from the request body are: custom properties in the form c_<CUSTOM_NAME>: the custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductListItemPurchase. The value of this property must be valid for the type of custom attribute defined for ProductListItemPurchase.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer to retrieve the product list item purchases for. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to retrieve. |
purchaseId |
String | The id of the product list item purchase to retrieve. |
body |
module:models/CustomerProductListItemPurchase |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItemPurchase and HTTP response
- Type
- Promise
patchCustomersByIDProductListsByIDItemsByIDWithHttpInfo(customerId, listId, itemId, body) → {Promise}
Updates an item of a customer's product list. 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: used for product item type only. This is the quantity of the customer's product list item. 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.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the owner of the product list. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item to update. |
body |
module:models/CustomerProductListItem |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItem and HTTP response
- Type
- Promise
patchCustomersByIDProductListsByIDWithHttpInfo(body, customerId, listId) → {Promise}
Changes a product list. Changeable properties are the name, description and if the list is public.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/CustomerProductList | |
customerId |
String | The customer id. |
listId |
String | The product list id. |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductList and HTTP response
- Type
- Promise
patchCustomersByIDWithHttpInfo(customerId, body) → {Promise}
Updates a customer.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the customer id |
body |
module:models/Customer |
- Source:
Returns:
a Promise, with an object containing data of type module:models/Customer and HTTP response
- Type
- Promise
postCustomers(body) → {Promise}
Registers a customer. The mandatory data are the credentials and profile last name and email. When using OAuth the password in the request must not be set, otherwise an InvalidPasswordException will be thrown. When using JWT the password is required.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/CustomerRegistration |
- Source:
Returns:
a Promise, with data of type module:models/Customer
- Type
- Promise
postCustomersAuth(body, opts) → {Promise}
Obtains a new JWT (JSON Web Token) for a guest or registered customer. Tokens are returned as a HTTP Authorization:Bearer response header entry. These kinds of request are supported, as specified by the type: Type guest - creates a new guest (non-authenticated) customer and returns a token for the customer. Type credentials - authenticates credentials passed in the HTTP Authorization:Basic request header, returning a token for a successfully authenticated customer, otherwise it throws an AuthenticationFailedException. Type session - authenticates the customer (anonymous or registered) based on the dwsid and dwsecuretoken cookies. It returns a token for a successfully authenticated customer, otherwise it throws an AuthenticationFailedException. Type refresh - examines the token passed in the HTTP Authorization:Bearer request header and when valid returns a new token with an updated expiry time. For a request of type credentials: Updates profile attributes for the customer (for example, "last-visited"). Handles the maximum number of failed login attempts. For a request of type session: The session and corresponding dwsecuretoken must be active and valid. An expired session can't be used. The dwsecuretoken cookie must have been used for at least one previous HTTPS request with the same dwsid cookie. Does not touch profile attributes for the registered customer (for example, "last-visited"), since this is not a real login. Returns different tokens for multiple requests with the same session id. Means, there should be only one call per session. About JWT The token contains 3 sections: the header section (specifies token type and algorithm used) the payload section (contains customer information, client id, issue and expiration time) finally the signature section records the token signature. A token is created and returned to the client whenever a registered customer logs in (type "credentials") or a guest customer requests it (type "guest"). The token is returned in the response header as Authorization: Bearer --token-- The client has to include the token in the request header as Authorization: Bearer --token-- in any follow up request. The server declines any follow up requests without a token or which cannot be verified based on the token signature or expiration time. A token nearing its expiration time should be exchanged for a new one (type "refresh"). See "API Usage > JWT" for more details on using JWT as an authentication mechanism.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
body |
module:models/AuthRequest | |||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with data of type module:models/Customer
- Type
- Promise
postCustomersAuthTrustedsystem(body) → {Promise}
Obtain the JWTs for registered customers whose credentials are stored using a third party system. Accepts login_id and client_id Returns a customer object in the response body, and the JWT generated against the client_id in the response header.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/TrustedSystemAuthRequest |
- Source:
Returns:
a Promise, with data of type module:models/Customer
- Type
- Promise
postCustomersAuthTrustedsystemWithHttpInfo(body) → {Promise}
Obtain the JWTs for registered customers whose credentials are stored using a third party system. Accepts login_id and client_id Returns a customer object in the response body, and the JWT generated against the client_id in the response header.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/TrustedSystemAuthRequest |
- Source:
Returns:
a Promise, with an object containing data of type module:models/Customer and HTTP response
- Type
- Promise
postCustomersAuthWithHttpInfo(body, opts) → {Promise}
Obtains a new JWT (JSON Web Token) for a guest or registered customer. Tokens are returned as a HTTP Authorization:Bearer response header entry. These kinds of request are supported, as specified by the type: Type guest - creates a new guest (non-authenticated) customer and returns a token for the customer. Type credentials - authenticates credentials passed in the HTTP Authorization:Basic request header, returning a token for a successfully authenticated customer, otherwise it throws an AuthenticationFailedException. Type session - authenticates the customer (anonymous or registered) based on the dwsid and dwsecuretoken cookies. It returns a token for a successfully authenticated customer, otherwise it throws an AuthenticationFailedException. Type refresh - examines the token passed in the HTTP Authorization:Bearer request header and when valid returns a new token with an updated expiry time. For a request of type credentials: Updates profile attributes for the customer (for example, "last-visited"). Handles the maximum number of failed login attempts. For a request of type session: The session and corresponding dwsecuretoken must be active and valid. An expired session can't be used. The dwsecuretoken cookie must have been used for at least one previous HTTPS request with the same dwsid cookie. Does not touch profile attributes for the registered customer (for example, "last-visited"), since this is not a real login. Returns different tokens for multiple requests with the same session id. Means, there should be only one call per session. About JWT The token contains 3 sections: the header section (specifies token type and algorithm used) the payload section (contains customer information, client id, issue and expiration time) finally the signature section records the token signature. A token is created and returned to the client whenever a registered customer logs in (type "credentials") or a guest customer requests it (type "guest"). The token is returned in the response header as Authorization: Bearer --token-- The client has to include the token in the request header as Authorization: Bearer --token-- in any follow up request. The server declines any follow up requests without a token or which cannot be verified based on the token signature or expiration time. A token nearing its expiration time should be exchanged for a new one (type "refresh"). See "API Usage > JWT" for more details on using JWT as an authentication mechanism.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
body |
module:models/AuthRequest | |||||||
opts |
Object | Optional parameters Properties
|
- Source:
Returns:
a Promise, with an object containing data of type module:models/Customer and HTTP response
- Type
- Promise
postCustomersByIDAddresses(customerId, body) → {Promise}
Creates a new address with the given name for the given customer.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to create the address for |
body |
module:models/CustomerAddress |
- Source:
Returns:
a Promise, with data of type module:models/CustomerAddress
- Type
- Promise
postCustomersByIDAddressesWithHttpInfo(customerId, body) → {Promise}
Creates a new address with the given name for the given customer.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer to create the address for |
body |
module:models/CustomerAddress |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerAddress and HTTP response
- Type
- Promise
postCustomersByIDAuth(customerId) → {Promise}
Obtains a new agent on behalf token for a registered customer. Token is returned as a HTTP Authorization:Bearer response header entry. A token is created and returned to the client whenever an agent with Create_Order_On_Behalf_Of permission calls the resource for a registered customer. The token is returned in the response header as Authorization: Bearer --token--. The client has to include the token in the request header as Authorization: Bearer --token-- in any follow up request, the agent will do on behalf of the customer. About the order on behalf token The token contains 3 sections: the header section (specifies token type and algorithm used) the payload section (contains customer information, client id, issue and expiration time) finally the signature section records the token signature. A token nearing its expiration time should be exchanged for a new one by calling this resource once more.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | specifies the customer to act on behalf of |
- Source:
Returns:
a Promise, with data of type module:models/Customer
- Type
- Promise
postCustomersByIDAuthWithHttpInfo(customerId) → {Promise}
Obtains a new agent on behalf token for a registered customer. Token is returned as a HTTP Authorization:Bearer response header entry. A token is created and returned to the client whenever an agent with Create_Order_On_Behalf_Of permission calls the resource for a registered customer. The token is returned in the response header as Authorization: Bearer --token--. The client has to include the token in the request header as Authorization: Bearer --token-- in any follow up request, the agent will do on behalf of the customer. About the order on behalf token The token contains 3 sections: the header section (specifies token type and algorithm used) the payload section (contains customer information, client id, issue and expiration time) finally the signature section records the token signature. A token nearing its expiration time should be exchanged for a new one by calling this resource once more.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | specifies the customer to act on behalf of |
- Source:
Returns:
a Promise, with an object containing data of type module:models/Customer and HTTP response
- Type
- Promise
postCustomersByIDPasswordReset(customerId) → {Promise}
Starts a password reset process. A password reset token is generated and passed together with the customer resolved by the id provided as path parameter to a afterPOST hook. The hook dw.ocapi.shop.customer.password_reset.afterPOST can utilize the provided reset token, for example to send a reset email.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer |
- Source:
Returns:
a Promise
- Type
- Promise
postCustomersByIDPasswordResetWithHttpInfo(customerId) → {Promise}
Starts a password reset process. A password reset token is generated and passed together with the customer resolved by the id provided as path parameter to a afterPOST hook. The hook dw.ocapi.shop.customer.password_reset.afterPOST can utilize the provided reset token, for example to send a reset email.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
postCustomersByIDPaymentInstruments(customerId, body) → {Promise}
Adds a payment instrument to a customer information.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer |
body |
module:models/CustomerPaymentInstrumentRequest |
- Source:
Returns:
a Promise, with data of type module:models/CustomerPaymentInstrument
- Type
- Promise
postCustomersByIDPaymentInstrumentsWithHttpInfo(customerId, body) → {Promise}
Adds a payment instrument to a customer information.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the id of the customer |
body |
module:models/CustomerPaymentInstrumentRequest |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerPaymentInstrument and HTTP response
- Type
- Promise
postCustomersByIDProductLists(body, customerId) → {Promise}
Creates a customer product list.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/CustomerProductList | |
customerId |
String | The customer id. |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductList
- Type
- Promise
postCustomersByIDProductListsByIDItems(customerId, listId, body) → {Promise}
Adds an item to the customer's product list. Considered values from the request body are: type: a valid type, mandatory. This is the type of the item to be added to the customer's product list. priority: This is the priority of the item to be added to the customer's product list. public: This is the flag whether the item to be added to the customer's product list is public. product_id: a valid product id, used for product item type only. This is the id (sku) of the product related to the item to be added to the customer's product list. It is mandatory for product item type and it must be a valid product id, otherwise ProductListProductIdMissingException or ProductListProductNotFoundException will be thrown. quantity: used for product item type only. This is the quantity of the item to be added to the customer's product list. 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.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer - owner of the product list. |
listId |
String | The id of the product list |
body |
module:models/CustomerProductListItem |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItem
- Type
- Promise
postCustomersByIDProductListsByIDItemsByIDPurchases(customerId, listId, itemId, body) → {Promise}
Adds a purchase to an item in the customer's product list. Considered values from the request body are: purchaser_name: name of the purchaser, mandatory. This is the full name of the purchaser of this product list item. quantity: amount purchased, mandatory. This is the quantity of the items purchased from the product list. custom properties in the form c_<CUSTOM_NAME>: the custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductListItemPurchase. The value of this property must be valid for the type of custom attribute defined for ProductListItemPurchase.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer - owner of the product list. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item where to add the purchase. |
body |
module:models/CustomerProductListItemPurchase |
- Source:
Returns:
a Promise, with data of type module:models/CustomerProductListItemPurchase
- Type
- Promise
postCustomersByIDProductListsByIDItemsByIDPurchasesWithHttpInfo(customerId, listId, itemId, body) → {Promise}
Adds a purchase to an item in the customer's product list. Considered values from the request body are: purchaser_name: name of the purchaser, mandatory. This is the full name of the purchaser of this product list item. quantity: amount purchased, mandatory. This is the quantity of the items purchased from the product list. custom properties in the form c_<CUSTOM_NAME>: the custom property must correspond to a custom attribute (<CUSTOM_NAME>) defined for ProductListItemPurchase. The value of this property must be valid for the type of custom attribute defined for ProductListItemPurchase.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer - owner of the product list. |
listId |
String | The id of the product list. |
itemId |
String | The id of the product list item where to add the purchase. |
body |
module:models/CustomerProductListItemPurchase |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItemPurchase and HTTP response
- Type
- Promise
postCustomersByIDProductListsByIDItemsWithHttpInfo(customerId, listId, body) → {Promise}
Adds an item to the customer's product list. Considered values from the request body are: type: a valid type, mandatory. This is the type of the item to be added to the customer's product list. priority: This is the priority of the item to be added to the customer's product list. public: This is the flag whether the item to be added to the customer's product list is public. product_id: a valid product id, used for product item type only. This is the id (sku) of the product related to the item to be added to the customer's product list. It is mandatory for product item type and it must be a valid product id, otherwise ProductListProductIdMissingException or ProductListProductNotFoundException will be thrown. quantity: used for product item type only. This is the quantity of the item to be added to the customer's product list. 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.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | The id of the customer - owner of the product list. |
listId |
String | The id of the product list |
body |
module:models/CustomerProductListItem |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductListItem and HTTP response
- Type
- Promise
postCustomersByIDProductListsWithHttpInfo(body, customerId) → {Promise}
Creates a customer product list.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/CustomerProductList | |
customerId |
String | The customer id. |
- Source:
Returns:
a Promise, with an object containing data of type module:models/CustomerProductList and HTTP response
- Type
- Promise
postCustomersPasswordActionsCreateResetToken(body) → {Promise}
Returns a reset password token for the passed in customer's login that will be used with the customers/reset_password endpoint to change the customer's password. This differs from the customers/password_reset endpoint as it does not require or allow before or after hook processing.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/ResetPasswordTokenRequest |
- Source:
Returns:
a Promise, with data of type module:models/ResetPasswordTokenResult
- Type
- Promise
postCustomersPasswordActionsCreateResetTokenWithHttpInfo(body) → {Promise}
Returns a reset password token for the passed in customer's login that will be used with the customers/reset_password endpoint to change the customer's password. This differs from the customers/password_reset endpoint as it does not require or allow before or after hook processing.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/ResetPasswordTokenRequest |
- Source:
Returns:
a Promise, with an object containing data of type module:models/ResetPasswordTokenResult and HTTP response
- Type
- Promise
postCustomersPasswordActionsReset(body) → {Promise}
Changes the customer's password to the new password value in the call using the reset password token that was returned from the customers/reset_password_token endpoint. This differs from the customers/password_reset endpoint as it does not require or allow before or after hook processing.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/ResetPasswordRequest |
- Source:
Returns:
a Promise
- Type
- Promise
postCustomersPasswordActionsResetWithHttpInfo(body) → {Promise}
Changes the customer's password to the new password value in the call using the reset password token that was returned from the customers/reset_password_token endpoint. This differs from the customers/password_reset endpoint as it does not require or allow before or after hook processing.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/ResetPasswordRequest |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
postCustomersPasswordReset(body) → {Promise}
First the beforePOST hook is called. After that the validation of the customer information provided in the the password reset document is performed. Then a password reset token is generated and together with the resolved customer is passed to a afterPOST hook. The customer resolution is based on the password reset request type. Both hooks are performed in a single transaction. Currently the resolution can be done by email or login. In case of an email the password reset hook is only executed if one and only one customer has been identified for that email. In the case that more than one customers have been identified for the provided email the resource does nothing.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/PasswordReset |
- Source:
Returns:
a Promise
- Type
- Promise
postCustomersPasswordResetWithHttpInfo(body) → {Promise}
First the beforePOST hook is called. After that the validation of the customer information provided in the the password reset document is performed. Then a password reset token is generated and together with the resolved customer is passed to a afterPOST hook. The customer resolution is based on the password reset request type. Both hooks are performed in a single transaction. Currently the resolution can be done by email or login. In case of an email the password reset hook is only executed if one and only one customer has been identified for that email. In the case that more than one customers have been identified for the provided email the resource does nothing.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/PasswordReset |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise
postCustomersWithHttpInfo(body) → {Promise}
Registers a customer. The mandatory data are the credentials and profile last name and email. When using OAuth the password in the request must not be set, otherwise an InvalidPasswordException will be thrown. When using JWT the password is required.
Parameters:
Name | Type | Description |
---|---|---|
body |
module:models/CustomerRegistration |
- Source:
Returns:
a Promise, with an object containing data of type module:models/Customer and HTTP response
- Type
- Promise
putCustomersByIDPassword(customerId, body) → {Promise}
Updates the customer's password.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the customer id |
body |
module:models/PasswordChangeRequest |
- Source:
Returns:
a Promise
- Type
- Promise
putCustomersByIDPasswordWithHttpInfo(customerId, body) → {Promise}
Updates the customer's password.
Parameters:
Name | Type | Description |
---|---|---|
customerId |
String | the customer id |
body |
module:models/PasswordChangeRequest |
- Source:
Returns:
a Promise, with an object containing HTTP response
- Type
- Promise