Salesforce Commerce Address Management API
Salesforce's Commerce Address Management APIs facilitate seamless handling of customer addresses within the platform. Integrating these APIs enhances the user experience by allowing customers to effortlessly manage their addresses, which is essential for smooth checkout and delivery processes.
Registered users can quickly manage their addresses on the My Profile page. The Webstore Account Addresses API allows a user to add a new address to their account associated with a webstore. With support for both POST and GET methods, this API enables users to enter new addresses as well as obtain and show their current address information on the account page. You can also update an address that is already in use or remove an address that is no longer needed by using the Webstore Account Address API. Both the PATCH and DELETE methods are also supported by this API.
Let's consider a scenario where a customer wants to manage their shipping addresses within their account.
The authenticated customer logs in and goes to the My Profile page, which displays the user account information, including any saved addresses. A GET request to the Webstore Account Addresses API fetches and displays a list of the customer's saved addresses. When the customer creates a new address, a POST request is made to the Webstore Account Addresses API. If an existing address needs correction, the customer makes the necessary changes and saves them, triggering a PATCH request to the Webstore Account Address API. Finally, the user can remove an address by making a DELETE request to the Webstore Account Address API.
Here’s a list of Commerce Address Management resources:
Resource | Supported HTTP Methods | Description |
---|---|---|
/commerce/webstores/{webstoreId}/accounts/accountId/addresses | GET, POST | Create a Commerce account address for a webstore, or retrieve a collection of addresses for a webstore account. |
/commerce/webstores/{webstoreId}/accounts/accountId/addresses/{addressId} | DELETE, PATCH | Update or delete an address for a Commerce account associated with a webstore. |