After adding new custom properties to the user shopper type, you can issue a PUT request to the /ccadmin/v1/profiles/{id} endpoint on the administration server to set the values of these properties on an existing shopper profile, or issue a POST request to the /ccadmin/v1/profiles endpoint to set these and other properties when you create a new shopper profile. Custom properties you create on the user shopper type are automatically exposed to these endpoints.
The following example shows a sample request body for setting the two custom properties created in the previous section on an existing shopper profile:
{
"loyaltyProgramMember": true,
"favoriteWebSite": www.oracle.com
}The following shows the response body returned:
{
"receiveEmail": "yes",
"shippingSurchargePriceList": null,
"lastName": "Anderson",
"locale": "en_US",
"priceListGroup": null,
"links": [
{
"rel": "self",
"href": "http://myserver.example.com:9443/ccadmin/v1/profiles/se-570031"
}
],
"repositoryId": "se-570031",
"id": "se-570031",
"loyaltyProgramMember": true,
"email": "kim@example.com",
"shippingAddresses": [
{
"lastName": "Anderson",
"postalCode": "13202",
"phoneNumber": "212-555-1977",
"county": null,
"state": "NY",
"address1": "21 Cedar Ave",
"address2": null,
"firstName": "Kim",
"repositoryId": "se-980031",
"city": "Syracuse",
"country": "US"
}
],
"translations": {},
"daytimeTelephoneNumber": null,
"favoriteWebSite": "www.oracle.com",
"firstName": "Kim",
"shippingAddress": {
"lastName": "Anderson",
"postalCode": "13202",
"phoneNumber": "212-555-1977",
"county": null,
"state": "NY",
"address1": "21 Cedar Ave",
"address2": null,
"firstName": "Kim",
"repositoryId": "se-980031",
"city": "Syracuse",
"country": "US"
}
}
