View a shopper profile

You can view a shopper profile using the REST API.

To view an existing shopper profile, first log into the Admin API on the administration server using an account that has the Administrator role.

For example:

POST /ccadmin/v1/mfalogin HTTP/1.1
Content-Type: application/x-www-form-urlencoded

grant_type=password&username=admin1@example.com&password=A3ddj3w2&totp_code=365214

Then issue a GET request to the /ccadmin/v1/profiles/{id} endpoint, providing the ID of the profile you want to view, and including the access token that was returned by /ccadmin/v1/mfalogin. For example:

GET /ccadmin/v1/profiles/se-570031 HTTP/1.1
Authorization: Bearer <access_token>

The following is an example of the response returned:

{
    "receiveEmail": "yes",
    "shippingSurchargePriceList": null,
    "lastName": "Anderson",
    "locale": "en_US",
    "priceListGroup": null,
    "links": [
        {
          "rel": "self",
          "href": "http://myserver.example.com:7002/ccadmin/v1/profiles/se-570031"
        }
    ],
    "repositoryId": "se-570031",
    "id": "se-570031",
    "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,
    "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"
    }
}

The response shows the predefined profile properties that are exposed by Oracle Commerce. You can set the values of these properties for an existing profile using the PUT /ccadmin/v1/profiles/{id} endpoint on the administration server.