SCV Customer API Specification
Overview
The Customer API allows retrieving and updating customer profile attributes in the Single Customer View (SCV).
Use Case
In a DXP portal solution, this API enables authenticated portal users to view and update their profile data stored in the Single Customer View (SCV).
This supports self-service profile management and real-time data updates, improving user experience for portals and data accuracy across the Squiz DXP.
- GET Request
-
Fetches customer attributes.
- PATCH Request
-
Updates specific customer attributes.
GET Customer Profile
Retrieves a customer’s profile data from SCV.
Parameter |
Type |
Description |
Example |
|
boolean |
(Optional) Set to 1 to retrieve all attributes. |
|
|
string |
(Optional) Comma-separated list of specific attributes to retrieve. |
|
Example Requests
- Retrieve all attributes
-
GET https://{portaldomain}/__dxp/{region}/scv/{tenantId}/customer?retAllProps=1
- Retrieve only specific attributes
-
GET https://{portaldomain}/__dxp/{region}/scv/{tenantId}/customer?retProps=firstName,lastName
{
"username": "mike_chan",
"firstName": "Mike",
"lastName": "Chan",
"email": "mike.chan@example.com",
"phoneNo": "0123451516"
}
PATCH Update Customer Profile
Updates customer attributes in the Single Customer View (SCV).
- Endpoint
-
PATCH https://{portaldomain}/__dxp/{region}/scv/{tenantId}/customer
- Request Body
-
-
The request body should include Attributes that need to be updated.
-
Only allowed attributes can be updated (for example,
firstName
,email
,phoneNo
).
-
{
"firstName": "Mike",
"username": "m_chan",
"phoneNo": "0123451518"
}
{
"message": "Customer profile updated successfully.",
"updatedFields": ["firstName", "username", "phoneNo"]
}
{
"message": "Invalid attribute: invalidAttribute",
"error": "Bad Request"
}