---
schema_version: "1"
id: 2af51c76c5f7b61c7e8f306f5f6acd2117e23452f7736d7ed0bbffb0b95bd7ce
title: Salesforce Commerce My Profile API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/salesforce-commerce/guides/d2c-commerce/b2b-d2c-comm-myprofile-apis.md
canonical_url: https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-d2c-comm-myprofile-apis.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 849a599b66cafb4f45343fb3e220e9e4f3210fbe04f0185eea9cfc83a584c227
products:
  - B2B Commerce Developer Guide
  - Salesforce APIs
---
# Salesforce Commerce My Profile API

The Salesforce Commerce My Profile API allows you to retrieve and update buyer account details. This API works by identifying the buyer's user ID within the logged-in context to either fetch or modify their account information.

The My Profile API supports both GET and PATCH requests. Use the GET request to view buyer profile details, such as phone number, email address, first name, last name, or username.

To update profile information, such as phone number, email address, first name, or last name, make a PATCH request. When you update your email address, a verification process starts. The API sends a confirmation email to your old address. Until you verify the new email, the Profile page GET API still shows the old one. Once confirmed, the GET API displays the updated email.

## Use Case

Let's explore a basic scenario for utilizing the My Profile API's supported methods.

![Diagram of the My Profile APIs workflow for managing customer profile data in B2B and D2C Commerce](https://developer.salesforce.com/media/d2c-commerce/myprofile_apis_workflow.png '{"class": "image-lg", "title": "Checkout Workflow"}')

First, let’s consider a scenario where a buyer wants to view their profile details, including phone number, email address, first name, last name, or user name. In this case, a GET request to the [Commerce Webstore My Profile API](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_myprofile.htm) can be used to retrieve these details.

Second, if the buyer decides to update their profile information—such as phone number, email address, first name, and last name—a PATCH request to the [Commerce Webstore My Profile API](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_myprofile.htm) can be used.

## Resources

Here’s a list of Commerce My Profile resources:

| Resource                                                                                                                                                                                                | Supported HTTP Methods | Description                                                                                                                                                                         | Available Version |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| [`/commerce/webstores/{webstoreId}/myprofile`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_myprofile.htm)                          | GET, PATCH             | Retrieve or update the buyer’s account details. This API works by identifying the buyer's user ID within the logged-in context to either fetch or modify their account information. | 52.0              |
| [`/commerce/webstores/{webstoreId}/myprofile/actions/initOTP`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_myprofile_initotp.htm)  | POST                   | Initiate the one-time password (OTP) via the specified method, such as SMS or Email.                                                                                                | 64.0              |
| [`/commerce/webstores/{webstoreId}/myprofile/actions/verify`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_myprofile_verifyotp.htm) | POST                   | Validate the one-time-password (OTP) provided by the buyer.                                                                                                                         | 64.0              |
