Newer Version Available

This content describes an older version of this product. View Latest

Commerce Webstore My Profile

Retrieve the buyer's account details. Update buyer account details. The API retrieves or updates the registered buyer’s details by identifying the buyer user’s ID within the logged-in context.

The Commerce Webstore My Profile Initiate OTP and Commerce Webstore My Profile Verify OTP APIs integrate with the myprofile API to securely manage updates to a buyer's profile information—specifically their email and phone number. These APIs enforce re-authentication before any changes are made, ensuring that only authorized users can modify contact details and that the new information is verified as belonging to the buyer.

Resource
1/commerce/webstores/${webstoreId}/myprofile
Resource example
1https://yourInstance.salesforce.com/services/data/v66.0/commerce/webstores/0ZExx000000005rGAA/myprofile
Available version
52.0
HTTP methods
GET, PATCH
GET is supported in API version 52.0 and later.
PATCH is supported in API version 59.0 and later.
Request body for PATCH
JSON examples
Here's an example of a request that includes both email and phone number updates when two-factor authentication is disabled:
1{
2  "firstName": "Morton",
3  "lastName": "Strosin",
4  "email": "Ma**********@vi*****.info",
5  "phoneNumber": "********7740",
6  "verificationInput": {}
7}
Here's an example of a request that includes an email update when two-factor authentication is enabled:
1{
2  "firstName": "Morton",
3  "lastName": "Strosin",
4  "email": "Ma**********@vi*****.info",
5  "verificationInput": {
6    "reCaptchaToken": "03AFcWe45uIQZjl6LznRTupQwTySasFVbN7_8Pj9",
7    "stepUpVerificationIdentifier": "hjdfghjdfgj768"
8  }
9}
Here's an example of a request that includes a phone number update when two-factor authentication is enabled:
1{
2  "firstName": "Morton",
3  "lastName": "Strosin",
4  "phoneNumber": "********7740",
5  "verificationInput": {
6    "reCaptchaToken": "03AFcWe45uIQZjl6LznRTupQwTySasFVbN7_8Pj9",
7    "stepUpVerificationIdentifier": "hjdfghjdfgj768"
8  }
9}
Properties
Name Type Description Required or Optional Available Version
email String The email address of the buyer. Optional 59.0
firstName String The first name of the buyer. Optional 59.0
lastName String The last name of the buyer. Optional 59.0
phoneNumber String The phone number of the buyer. Optional 59.0
verification​Input Buyer Profile Verification Input The verification details required to update either the buyer's email or phone number. This update process applies only when two-factor authentication is enabled in your Salesforce org.

When two-factor authentication is disabled in your org, you can update both the buyer's email and phone number within a single API request.

Note

Required 64.0
Response body for PATCH
Buyer Profile Update Details