Customer accounts allow merchants to be able to manage orders, price groups, and more on the behalf of the customer. They also provide the basis that other features are implemented, such as wish lists. This area of the API allows you to manage customer accounts on your store.
The following pre-requisites will be necessary to accomplish the goals of this article:
- General understanding of REST and API’s
If you haven’t already done so, you should probably have a development environment ready to development against, complete with Hotcakes installed and configured.
REST API endpoints for Customer Accounts
There are a handful of REST API endpoints that allow you to display or manage various aspects of customer accounts. Those endpoints are detailed below.
|CustomerAccountsClearAll||Boolean||Deletes all of the customer accounts in the store, provided that this has been allowed in the store admin API page.|
|CustomerAccountsCountOfAll||Long||Allows you to get a count of all of the customer accounts in the store|
|CustomerAccountsCreate||CustomerAccountDTO||Creates a customer account using the information provided|
|CustomerAccountsCreateWithPassword||CustomerAccountDTO||Allows you to create a customer account while also specifying the user's password.|
|CustomerAccountsDelete||Boolean||Allows you to delete a customer account from your store.|
|CustomerAccountsFind||CustomerAccountDTO||Allows you to find a specific customer account using the unique ID (bvin)|
|CustomerAccountsFindAll||List of CustomerAccountDTO||Find all customer accounts in the store|
|CustomerAccountsFindAllByPage||List of CustomerAccountDTO||Allows you to request a listing of customer accounts for use in a paged display|
|CustomerAccountsFindByEmail||CustomerAccountDTO||Allows you to find a specific customer account using their email address|
|CustomerAccountsUpdate||CustomerAccountDTO||Updates a customer account using the information provided by matching the unique customer ID (bvin) to an existing customer.|