getProfile

get

/ccadmin/v1/profiles/{id}

Get Profile. This operation is used to get the profile information of a customer from Oracle Commerce Cloud. Optionally takes the x-ccasset-language header to get translated content in another language.

Request

Supported Media Types
  • application/json
Path Parameters
id
Type: string
Required: true
The ID of the requested shopper profile.
Query Parameters
preview
Type: string
If true, then preview profile will be returned.
Header Parameters
X-CCAsset-Language
Type: string
The asset language of the request

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getProfile_response
Nested Schema : profileComments
Type: array
The list of all logged comments for the customer profile.
Nested Schema : profileDetail
Type: object
The details of the customer profile.
Nested Schema : items
Type: object
Nested Schema : catalog
Type: object
The catalog associated with this profile.
Nested Schema : contactBillingAddress
Type: object
The default billing address for B2B contact.
Nested Schema : contactShippingAddress
Type: object
The default shipping address for B2B contact
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties associated with profile along with meta-data.
Nested Schema : parentOrganization
Type: object
The parent Organization associated with the B2B customer profile.
Nested Schema : secondaryAddresses
Type: object
Secondary addresses for B2B contact.
Nested Schema : shippingAddress
Type: object
The default shipping address for the customer profile
Nested Schema : shippingAddresses
Type: array
The shipping addresses associated with the customer profile.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example application/json

{
    "derivedPriceListGroup":null,
    "lastName":"K",
    "gender":"female",
    "catalog":null,
    "roles":[
        {
            "function":"buyer",
            "relativeTo":{
                "id":"100001"
            },
            "repositoryId":"100006"
        }
    ],
    "parentOrganization":{
        "name":"Oracle",
        "repositoryId":"100001",
        "description":"Oracle Org",
        "active":true,
        "shippingAddress":{
        },
        "secondaryAddresses":[
            {
                "firstName":"Harry",
                "lastName":"Potter",
                "country":"United States",
                "phoneNumber":"9088988999",
                "city":"Arcadia",
                "address2":"Suite 400",
                "address1":"Grundy Lane",
                "postalCode":"91006",
                "repositoryId":"110033",
                "state":"CA"
            }
        ],
        "id":"100001",
        "billingAddress":{
        }
    },
    "locale":"en",
    "shippingSurchargePriceList":null,
    "profileType":"b2b_user",
    "translations":{
    },
    "loyaltyPrograms":[
        {
            "programName":"XTRAREWARDS",
            "repositoryId":100001,
            "membershipId":"abc123",
            "programId":"prog1",
            "status":"Enrolled"
        },
        {
            "programName":"XTRAMILES",
            "repositoryId":100002,
            "membershipId":"xyz123",
            "programId":"prog2",
            "status":"Enrolled"
        }
    ],
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadmin/v1/shopperProfiles/110006?offset=0&limit=2&sort=firstName%3Adesc"
        }
    ],
    "id":"110006",
    "email":"abc@abc.com",
    "derivedSalePriceList":null,
    "daytimeTelephoneNumber":"212-555-1977",
    "taxExempt":false,
    "receiveEmail":"yes",
    "priceListGroup":null,
    "active":"true",
    "dateOfBirth":null,
    "firstName":"bcd",
    "repositoryId":"110006",
    "shippingAddress":{
    },
    "billingAddress":{
    },
    "userType":null,
    "derivedShippingSurchargePriceList":null,
    "secondaryOrganizations":[
    ],
    "shippingAddresses":[
    ]
}
Default Response
The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |22000|If the profile id passes is null or empty| |22001|If there was any internal error while getting the profile| |22002|If there was no profile found with the given id|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "derivedPriceListGroup": null,
  "lastName": "K",
  "gender": "female",
  "catalog": null,
  "roles": [{
    "function": "buyer",
    "relativeTo": {"id": "100001"},
    "repositoryId": "100006"
  }],
  "parentOrganization": {
    "name": "Oracle",
    "repositoryId": "100001",
    "description": "Oracle Org",
    "active": true,
    "shippingAddress": {},
    "secondaryAddresses": [{
      "firstName": "Harry",
      "lastName": "Potter",
      "country": "United States",
      "phoneNumber": "9088988999",
      "city": "Arcadia",
      "address2": "Suite 400",
      "address1": "Grundy Lane",
      "postalCode": "91006",
      "repositoryId": "110033",
      "state": "CA"
    }],
    "id": "100001",
    "billingAddress": {}
  },
  "locale": "en",
  "shippingSurchargePriceList": null,
  "profileType": "b2b_user",
  "translations": {},
  "loyaltyPrograms": [
    {
      "programName": "XTRAREWARDS",
      "repositoryId": 100001,
      "membershipId": "abc123",
      "programId": "prog1",
      "status": "Enrolled"
    },
    {
      "programName": "XTRAMILES",
      "repositoryId": 100002,
      "membershipId": "xyz123",
      "programId": "prog2",
      "status": "Enrolled"
    }
  ],
  "links": [{
    "rel": "self",
    "href": "http://localhost:9080/ccadmin/v1/shopperProfiles/110006?offset=0&limit=2&sort=firstName%3Adesc"
  }],
  "id": "110006",
  "email": "abc@abc.com",
  "derivedSalePriceList": null,
  "daytimeTelephoneNumber": "212-555-1977",
  "taxExempt": false,
  "receiveEmail": "yes",
  "priceListGroup": null,
  "active": "true",
  "dateOfBirth": null,
  "firstName": "bcd",
  "repositoryId": "110006",
  "shippingAddress": {},
  "billingAddress": {},
  "userType": null,
  "derivedShippingSurchargePriceList": null,
  "secondaryOrganizations": [],
  "shippingAddresses": []
}