updateProfile
put
/ccadmin/v1/profiles/{id}
Update Profile. This operation is used to update customer name, email address, phone number, shipping address and email marketing flag status of a customer profile. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe ID of the shopper profile to be updated.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Body Parameter
Root Schema : updateProfile_request
{
"dynamicPropertyMaritalStatus":"Married",
"lastName":"Anderson",
"firstName":"Kim",
"receiveEmail":"yes",
"email":"kim@example.com",
"daytimeTelephoneNumber":"212-555-1977",
"shippingAddresses":[
{
"lastName":"Anderson",
"country":"United States",
"address3":"",
"address2":"",
"city":"Syracuse",
"prefix":"",
"address1":"21 Cedar Ave",
"postalCode":"13202",
"jobTitle":"",
"companyName":"",
"county":"",
"isDefaultAddress":false,
"suffix":"",
"selectedCountry":"US",
"firstName":"Kim",
"phoneNumber":"212-555-1977",
"faxNumber":"",
"middleName":"",
"state":"New York",
"selectedState":"NY",
"state_ISOCode":"US-NY"
},
{
"lastName":"Anderson",
"country":"United States",
"address3":"",
"address2":"",
"city":"Montgomery",
"prefix":"",
"address1":"21 Cedar Ave",
"postalCode":"13202",
"jobTitle":"",
"companyName":"",
"county":"",
"isDefaultAddress":true,
"suffix":"",
"selectedCountry":"US",
"firstName":"Kim",
"phoneNumber":"212-555-1977",
"faxNumber":"",
"middleName":"",
"state":"New York",
"selectedState":"NY",
"state_ISOCode":"US-NY"
}
]
}
- daytimeTelephoneNumber
-
Type:
stringThe phone Number of the profile. -
Type:
stringThe email address of the profile. - firstName
-
Type:
stringThe first name of the profile. - lastName
-
Type:
stringThe last name of the profile. - login
-
Type:
stringLogin id to be used. - receiveEmail
-
Type:
stringIndicates whether the customer should receive marketing emails on the current site. Can be yes or no. - shippingAddresses
-
Type:
objectshippingAddressesshipping address of the profile.
Nested Schema : shippingAddresses
Type:
objectshipping address of the profile.
- address1
-
Type:
stringThe address1 of the shipping address. - address2
-
Type:
stringThe address2 of the shipping address. - city
-
Type:
stringThe city of the shipping address. - country
-
Type:
stringThe country of the shipping address. - county
-
Type:
stringThe county of the shipping address. - firstName
-
Type:
stringThe first name of the shipping address. - lastName
-
Type:
stringThe last name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringThe postal Code of the shipping address. - state
-
Type:
stringThe state of the shipping address.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateProfile_response
- contactBillingAddress
-
Type:
objectcontactBillingAddressRequired:trueThe default billing address for B2B contact. - contactShippingAddress
-
Type:
objectcontactShippingAddressThe default shipping address for B2B contact - daytimeTelephoneNumber
-
Type:
stringThe phone Number of the profile. - dynamicProperties
-
Type:
arraydynamicPropertiesRead-only list of dynamic properties associated with profile along with meta-data. -
Type:
stringThe email address of the profile. - firstName
-
Type:
stringThe first name of the profile. - id
-
Type:
stringThe id of the profile to retrieve. - lastName
-
Type:
stringThe last name of the profile. - profileType
-
Type:
stringThe type of the user. Possible values are b2b_user and b2c_user. - receiveEmail
-
Type:
stringIndicates whether the customer should receive marketing emails on the current site. - secondaryAddresses
-
Type:
objectsecondaryAddressesRequired:trueSecondary addresses for B2B contact. - shippingAddress
-
Type:
objectshippingAddressDefault shipping address of the profile - shippingAddresses
-
Type:
arrayshippingAddressesThe shipping addresses associated with the customer profile
Nested Schema : contactBillingAddress
Type:
objectThe default billing address for B2B contact.
- address1
-
Type:
stringAddress line 1 for this billing address. - address2
-
Type:
stringAddress line 2 for this billing address. - address3
-
Type:
stringAddress line 3 for this billing address. - city
-
Type:
stringCity for this billing address. - companyName
-
Type:
stringCompany name for this billing address. - country
-
Type:
stringCountry for this billing address. - county
-
Type:
stringCounty for this billing address. -
Type:
stringEmail for this billing address. - faxNumber
-
Type:
stringFax number for this billing address. - firstName
-
Type:
stringFirst name for this billing address. - jobTitle
-
Type:
stringJob title for this billing address. - lastName
-
Type:
stringLast name for this billing address. - middleName
-
Type:
stringMiddle name for this billing address. - phoneNumber
-
Type:
stringPhone number for this billing address. - postalCode
-
Type:
stringPostal code for this billing address. - prefix
-
Type:
stringPrefix for this billing address. - state
-
Type:
stringState for this billing address. - suffix
-
Type:
stringSuffix for this billing address.
Nested Schema : contactShippingAddress
Type:
objectThe default shipping address for B2B contact
- address1
-
Type:
stringThe address line 1 in the shipping address. - address2
-
Type:
stringThe address line 2 in the shipping address. - city
-
Type:
stringThe city in the shipping address record. - country
-
Type:
stringThe country in the shipping address record. - county
-
Type:
stringThe county in the shipping address. - firstName
-
Type:
stringThe first name in the shipping address. - lastName
-
Type:
stringThe last name in the shipping address. - phoneNumber
-
Type:
stringThe phone number in the shipping address. - postalCode
-
Type:
stringThe postal code in the shipping address. - repositoryId
-
Type:
stringThe repository id of the shipping address record. - state
-
Type:
stringThe state in the shipping address.
Nested Schema : dynamicProperties
Nested Schema : secondaryAddresses
Type:
objectSecondary addresses for B2B contact.
- address1
-
Type:
stringAddress line 1 for this address. - address2
-
Type:
stringAddress line 2 for this address. - address3
-
Type:
stringAddress line 3 for this address. - city
-
Type:
stringCity for this address. - companyName
-
Type:
stringCompany name for this address. - country
-
Type:
stringCountry for this address. - county
-
Type:
stringCounty for this address. -
Type:
stringEmail for this address. - faxNumber
-
Type:
stringFax number for this address. - firstName
-
Type:
stringFirst name for this address. - jobTitle
-
Type:
stringJob title for this address. - lastName
-
Type:
stringLast name for this address. - middleName
-
Type:
stringMiddle name for this address. - phoneNumber
-
Type:
stringPhone number for this address. - postalCode
-
Type:
stringPostal code for this address. - prefix
-
Type:
stringPrefix for this address. - state
-
Type:
stringState for this address. - suffix
-
Type:
stringSuffix for this address.
Nested Schema : shippingAddress
Type:
objectDefault shipping address of the profile
- address1
-
Type:
stringThe address1 of the shipping address. - address2
-
Type:
stringThe address2 of the shipping address. - city
-
Type:
stringThe city of the shipping address. - country
-
Type:
stringThe country of the shipping address. - county
-
Type:
stringThe county of the shipping address. - firstName
-
Type:
stringThe first name of the shipping address. - lastName
-
Type:
stringThe last name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringThe postal Code of the shipping address. - repositoryId
-
Type:
stringThe id of the shipping address. - state
-
Type:
stringThe state of the shipping address.
Nested Schema : shippingAddresses
Nested Schema : items
Type:
object- id
-
Type:
stringThe ID of the dynamic property. - type
-
Type:
stringThe type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string. - value
-
Type:
stringThe value of the dynamic property.
Nested Schema : items
Type:
object- address1
-
Type:
stringThe address line 1 in the shipping address. - address2
-
Type:
stringThe address line 2 in the shipping address. - city
-
Type:
stringThe city in the shipping address record. - companyName
-
Type:
stringThe company name of the person in the shipping address - country
-
Type:
stringThe country in the shipping address record. - county
-
Type:
stringThe county in the shipping address. - faxNumber
-
Type:
stringThe fax number in the shipping address - firstName
-
Type:
stringThe first name in the shipping address. - isDefaultAddress
-
Type:
booleanIndicates if its the default shipping address - jobTitle
-
Type:
stringThe job title of the person in the shipping address - lastName
-
Type:
stringThe last name in the shipping address. - middleName
-
Type:
stringThe middle name in the shipping address. - phoneNumber
-
Type:
stringThe phone number in the shipping address. - postalCode
-
Type:
stringThe postal code in the shipping address. - repositoryId
-
Type:
stringThe repository id of the shipping address record. - selectedCountry
-
Type:
stringThe selected country in the shipping address - selectedState
-
Type:
stringThe selected state in the shipping address - state
-
Type:
stringThe state in the shipping address. - state_ISOCode
-
Type:
stringThe state ISO code in the shipping address - suffix
-
Type:
stringThe suffix of the person in the shipping address.
Example application/json
{
"derivedPriceListGroup":null,
"lastName":"Anderson",
"gender":"female",
"catalog":null,
"roles":[
{
"function":"buyer",
"relativeTo":{
"id":"900004"
},
"repositoryId":"100006"
}
],
"locale":"en",
"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":"900004",
"billingAddress":{
}
},
"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":"RequestForEnrollment"
}
],
"id":"se-570031",
"email":"kim@example.com",
"daytimeTelephoneNumber":"212-555-1977",
"derivedSalePriceList":null,
"taxExempt":false,
"receiveEmail":"yes",
"active":"true",
"priceListGroup":null,
"dateOfBirth":null,
"firstName":"Kim",
"repositoryId":"se-570031",
"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|
|------------------|------------------|
|100088|You cannot remove the Approver role from this contact. The account has no other active Approvers. Approvals are still enabled and/or there are orders pending approval.|
|22000|If the profile id passes is null or empty|
|100089|You cannot deactivate this contact. The account has no other active Approvers. Approvals are still enabled and/or there are orders pending approval|
|22001|If there was any internal error while getting the profile|
|22002|If there was no profile found with the given id|
|89003|If user is removing admin role for himself|
|22007|If invalid input is provided|
|89001|If invalid roles are provided|
|22024|{0}({1}) must be a String|
|22025|Format for loyaltyPrograms is incorrect. Please refer to API doc for more information|
|22026|{0} is either missing or incorrect.|
|22027|Invalid state is provided.
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAn optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"firstName": "kim",
"lastName": "Anderson",
"profileType": "b2b_user",
"gender": "female",
"loyaltyPrograms": [
{
"programName": "XTRAREWARDS",
"membershipId": "abc123",
"programId": "prog1",
"status": "Enrolled"
},
{
"programName": "XTRAMILES",
"membershipId": "xyz123",
"programId": "prog2",
"status": "Enrolled"
}
],
"roles": [{
"funtion": "buyer",
"relativeTo": {"id": "900004"}
}],
"receiveEmail": "yes",
"active": true,
"dateOfBirth": null,
"parentOrganization": "900004",
"email": "kim@example.com",
"daytimeTelephoneNumber": "212-555-1977"
}
Sample Response Payload returned by endpoint:
{
"derivedPriceListGroup": null,
"lastName": "Anderson",
"gender": "female",
"catalog": null,
"roles": [{
"function": "buyer",
"relativeTo": {"id": "900004"},
"repositoryId": "100006"
}],
"locale": "en",
"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": "900004",
"billingAddress": {}
},
"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": "RequestForEnrollment"
}
],
"id": "se-570031",
"email": "kim@example.com",
"daytimeTelephoneNumber": "212-555-1977",
"derivedSalePriceList": null,
"taxExempt": false,
"receiveEmail": "yes",
"active": "true",
"priceListGroup": null,
"dateOfBirth": null,
"firstName": "Kim",
"repositoryId": "se-570031",
"shippingAddress": {},
"billingAddress": {},
"userType": null,
"derivedShippingSurchargePriceList": null,
"secondaryOrganizations": [],
"shippingAddresses": []
}