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
- hasIncompleteOrder
-
Type:
boolean
Indicates whether the profile has an incomplete order on the current site. - profileComments
-
Type:
array
profileCommentsAdditional Properties Allowed:The list of all logged comments for the customer profile. - profileDetail
-
Type:
object
profileDetailAdditional Properties Allowed:The details of the customer profile. - receiveEmail
-
Type:
string
Indicates whether the customer should receive marketing emails on the current site.
Nested Schema : profileComments
Nested Schema : profileDetail
Type:
object
The details of the customer profile.
- catalog
-
Type:
object
catalogAdditional Properties Allowed:The catalog associated with this profile. - contactBillingAddress
-
Type:
object
contactBillingAddressRequired:true
Additional Properties Allowed:The default billing address for B2B contact. - contactShippingAddress
-
Type:
object
contactShippingAddressAdditional Properties Allowed:The default shipping address for B2B contact - daytimeTelephoneNumber
-
Type:
string
The day time telephone number of the customer profile. - dynamicProperties
-
Type:
array
dynamicPropertiesAdditional Properties Allowed:Read-only list of dynamic properties associated with profile along with meta-data. -
Type:
string
Email of the customer profile. - firstName
-
Type:
string
The first name of the customer profile. - id
-
Type:
string
The customer profile id. - lastName
-
Type:
string
Last name of the customer profile. - parentOrganization
-
Type:
object
parentOrganizationAdditional Properties Allowed:The parent Organization associated with the B2B customer profile. - profileType
-
Type:
string
The type of the user. Possible values are b2b_user and b2c_user. - receiveEmail
-
Type:
string
Flag indicating whether the customer opted for receiving emails. - repositoryId
-
Type:
string
The repository id of the customer profile record. - secondaryAddresses
-
Type:
object
secondaryAddressesRequired:true
Additional Properties Allowed:Secondary addresses for B2B contact. - shippingAddress
-
Type:
object
shippingAddressAdditional Properties Allowed:The default shipping address for the customer profile - shippingAddresses
-
Type:
array
shippingAddressesAdditional Properties Allowed:The shipping addresses associated with the customer profile.
Nested Schema : items
Type:
object
- comment
-
Type:
string
The comment string. - creationDate
-
Type:
string
The of creation date of the comment. - repositoryId
-
Type:
string
The repository id of the comment record.
Nested Schema : catalog
Type:
object
The catalog associated with this profile.
- repositoryId
-
Type:
string
RepositoryId of the catalog associated with this profile.
Nested Schema : contactBillingAddress
Type:
object
The default billing address for B2B contact.
- address1
-
Type:
string
Address line 1 for this billing address. - address2
-
Type:
string
Address line 2 for this billing address. - address3
-
Type:
string
Address line 3 for this billing address. - city
-
Type:
string
City for this billing address. - companyName
-
Type:
string
Company name for this billing address. - country
-
Type:
string
Country for this billing address. - county
-
Type:
string
County for this billing address. -
Type:
string
Email for this billing address. - faxNumber
-
Type:
string
Fax number for this billing address. - firstName
-
Type:
string
First name for this billing address. - jobTitle
-
Type:
string
Job title for this billing address. - lastName
-
Type:
string
Last name for this billing address. - middleName
-
Type:
string
Middle name for this billing address. - phoneNumber
-
Type:
string
Phone number for this billing address. - postalCode
-
Type:
string
Postal code for this billing address. - prefix
-
Type:
string
Prefix for this billing address. - state
-
Type:
string
State for this billing address. - suffix
-
Type:
string
Suffix for this billing address.
Nested Schema : contactShippingAddress
Type:
object
The default shipping address for B2B contact
- address1
-
Type:
string
The address line 1 in the shipping address. - address2
-
Type:
string
The address line 2 in the shipping address. - city
-
Type:
string
The city in the shipping address record. - country
-
Type:
string
The country in the shipping address record. - county
-
Type:
string
The county in the shipping address. - firstName
-
Type:
string
The first name in the shipping address. - lastName
-
Type:
string
The last name in the shipping address. - phoneNumber
-
Type:
string
The phone number in the shipping address. - postalCode
-
Type:
string
The postal code in the shipping address. - repositoryId
-
Type:
string
The repository id of the shipping address record. - state
-
Type:
string
The state in the shipping address.
Nested Schema : dynamicProperties
Nested Schema : parentOrganization
Type:
object
The parent Organization associated with the B2B customer profile.
- id
-
Type:
string
The id of the organization. - name
-
Type:
string
The name of of the organization. - repositoryId
-
Type:
string
The repository id of the comment record.
Nested Schema : secondaryAddresses
Type:
object
Secondary addresses for B2B contact.
- address1
-
Type:
string
Address line 1 for this address. - address2
-
Type:
string
Address line 2 for this address. - address3
-
Type:
string
Address line 3 for this address. - city
-
Type:
string
City for this address. - companyName
-
Type:
string
Company name for this address. - country
-
Type:
string
Country for this address. - county
-
Type:
string
County for this address. -
Type:
string
Email for this address. - faxNumber
-
Type:
string
Fax number for this address. - firstName
-
Type:
string
First name for this address. - jobTitle
-
Type:
string
Job title for this address. - lastName
-
Type:
string
Last name for this address. - middleName
-
Type:
string
Middle name for this address. - phoneNumber
-
Type:
string
Phone number for this address. - postalCode
-
Type:
string
Postal code for this address. - prefix
-
Type:
string
Prefix for this address. - state
-
Type:
string
State for this address. - suffix
-
Type:
string
Suffix for this address.
Nested Schema : shippingAddress
Type:
object
The default shipping address for the customer profile
- address1
-
Type:
string
The address line 1 in the shipping address. - address2
-
Type:
string
The address line 2 in the shipping address. - city
-
Type:
string
The city in the shipping address record. - country
-
Type:
string
The country in the shipping address record. - county
-
Type:
string
The county in the shipping address. - firstName
-
Type:
string
The first name in the shipping address. - lastName
-
Type:
string
The last name in the shipping address. - phoneNumber
-
Type:
string
The phone number in the shipping address. - postalCode
-
Type:
string
The postal code in the shipping address. - repositoryId
-
Type:
string
The repository id of the shipping address record. - state
-
Type:
string
The state in the shipping address.
Nested Schema : shippingAddresses
Nested Schema : items
Type:
object
- id
-
Type:
string
The ID of the dynamic property. - type
-
Type:
string
The type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string. - value
-
Type:
string
The value of the dynamic property.
Nested Schema : items
Type:
object
- address1
-
Type:
string
The address line 1 in the shipping address. - address2
-
Type:
string
The address line 2 in the shipping address. - city
-
Type:
string
The city in the shipping address record. - companyName
-
Type:
string
The company name of the person in the shipping address. - country
-
Type:
string
The country in the shipping address record. - county
-
Type:
string
The county in the shipping address. - faxNumber
-
Type:
string
The fax number in the shipping address. - firstName
-
Type:
string
The first name in the shipping address. - isDefaultAddress
-
Type:
boolean
Indicates if its the default shipping address. - jobTitle
-
Type:
string
The job title of the person in the shipping address. - lastName
-
Type:
string
The last name in the shipping address. - middleName
-
Type:
string
The middle name in the shipping address. - phoneNumber
-
Type:
string
The phone number in the shipping address. - postalCode
-
Type:
string
The postal code in the shipping address. - repositoryId
-
Type:
string
The repository id of the shipping address record. - selectedCountry
-
Type:
string
The selected country in the shipping address. - selectedState
-
Type:
string
The selected state in the shipping address. - state
-
Type:
string
The state in the shipping address. - state_ISOCode
-
Type:
string
The state ISO code in the shipping address. - suffix
-
Type:
string
The suffix of the person in the shipping address
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
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
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": [] }