updateProfile
put
/ccagent/v1/profiles/{id}
Update Profile. Updates customer name, email address, phone number, shipping address and email marketing flag status of the profile depending on the profile ID. Dynamic Properties of profile can also be updated like any other attribute ("dynamicPropertyKey":"dynamicPropertyValue"). Takes additonal header parameter x-ccsite corresponding to which site specific properties should be updated. If x-ccsite value is not provided, it indicates default site.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe customer profile id.
Header Parameters
- x-ccsite
-
Type:
stringthe site id corresponding to which site specific properties should be updated
Body Parameter
Root Schema : updateProfile_request
{
"firstName":"Jack",
"lastName":"Black",
"gender":"male",
"receiveEmail":"yes",
"dateOfBirth":"null",
"locale":"en",
"email":"jack@example.com",
"shippingAddresses":[
{
"lastName":"Black",
"country":"United States",
"address3":"",
"address2":"",
"city":"Wake Forest",
"prefix":"",
"address1":"405 Example Street",
"defaultCountryCode":"US",
"postalCode":"27587",
"jobTitle":"",
"companyName":"",
"county":"",
"isDefaultAddress":true,
"suffix":"",
"selectedCountry":"US",
"firstName":"Jack",
"phoneNumber":"555123456",
"alias":"Address",
"faxNumber":"",
"middleName":"",
"state":"North Carolina",
"selectedState":"NC",
"state_ISOCode":"US-NC"
},
{
"lastName":"Hill",
"country":"United States",
"address3":"",
"address2":"",
"city":"Wake Forest",
"prefix":"",
"address1":"415 Example Road",
"defaultCountryCode":"US",
"postalCode":"27587",
"jobTitle":"",
"companyName":"",
"county":"",
"isDefaultAddress":false,
"suffix":"",
"selectedCountry":"US",
"firstName":"Jill",
"phoneNumber":"55512345",
"alias":"Address##0",
"faxNumber":"",
"middleName":"",
"state":"North Carolina",
"selectedState":"NC",
"state_ISOCode":"US-NC"
}
]
}
- dateOfBirth
-
Type:
stringThe date of birth of the profile user. - daytimeTelephoneNumber
-
Type:
stringThe phone Number of the profile. -
Type:
stringThe email address of the profile. - firstName
-
Type:
stringThe first name of the profile. - gender
-
Type:
stringThe gender of the profile user. - lastName
-
Type:
stringThe last name of the profile. - newConfirmPassword
-
Type:
stringConfirmation of the new password. This should match the new password value. - newPassword
-
Type:
stringThe new password. - oldPassword
-
Type:
stringThe current password. - receiveEmail
-
Type:
stringThis is email marketing flag. can be yes or no. - shippingAddress
-
Type:
objectshippingAddressAdditional Properties Allowed:Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead). - shippingAddresses
-
Type:
arrayshippingAddressesAdditional Properties Allowed:List of shipping addresses associated with profile.
Nested Schema : shippingAddress
Type:
objectDefault shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
- address1
-
Type:
stringRequired:trueThe address line 1 of the shipping address. - address2
-
Type:
stringThe address line 2 of the shipping address. - address3
-
Type:
stringThe address line 3 of the shipping address. - alias
-
Type:
stringThe alias of the shipping address. - companyName
-
Type:
stringThe company name of the shipping address. - country
-
Type:
stringRequired:trueThe country code of the shipping address. - county
-
Type:
stringThe county of the shipping address. - firstName
-
Type:
stringRequired:trueThe first name of the shipping address. - lastName
-
Type:
stringRequired:trueThe last name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringRequired:trueThe postal Code of the shipping address. - prefix
-
Type:
stringThe prefix of the shipping address. - repositoryId
-
Type:
stringThe repository ID of the shipping address. - selectedCountry
-
Type:
stringThe country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country. - selectedState
-
Type:
stringThe state ISO alpha-2 code of the shipping address. If selectedState is sent in the request then it takes precedence over state. - state
-
Type:
stringRequired:trueThe state code of the shipping address. - state_ISOCode
-
Type:
stringThe state ISO alpha-4 code of the shipping address.
Nested Schema : shippingAddresses
Nested Schema : items
Type:
object- address1
-
Type:
stringRequired:trueThe address line 1 of the shipping address. - address2
-
Type:
stringThe address line 2 of the shipping address. - address3
-
Type:
stringThe address line 3 of the shipping address. - alias
-
Type:
stringThe alias of the shipping address. - city
-
Type:
stringRequired:trueThe city of the shipping address. - companyName
-
Type:
stringThe company name of the shipping address. - country
-
Type:
stringRequired:trueThe country of the shipping address. - county
-
Type:
stringThe county code of the shipping address. - firstName
-
Type:
stringRequired:trueThe first name of the shipping address. - isDefaultAddress
-
Type:
booleanWhether to store this address in the default shipping address slot. - lastName
-
Type:
stringRequired:trueThe last name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringRequired:trueThe postal Code of the shipping address. - prefix
-
Type:
stringThe prefix of the shipping address. - repositoryId
-
Type:
stringThe repository ID of the shipping address. - selectedCountry
-
Type:
stringThe country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country. - selectedState
-
Type:
stringThe state ISO alpha-2 code of the shipping address. If selectedState is sent in the request then it takes precedence over state. - state
-
Type:
stringRequired:trueThe state code of the shipping address. - state_ISOCode
-
Type:
stringThe state ISO alpha-4 code of the shipping address.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateProfile_response
- dateOfBirth
-
Type:
stringThe date of birth of the profile user. - daytimeTelephoneNumber
-
Type:
stringThe phone Number of the profile. - dynamicProperties
-
Type:
arraydynamicPropertiesAdditional Properties Allowed:Read-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. - gender
-
Type:
stringThe gender of the profile user. - id
-
Type:
stringThe ID of the profile to retrieve. - lastName
-
Type:
stringThe last name of the profile. - receiveEmail
-
Type:
stringThis is email marketing flag. Can be yes or no. - roles
-
Type:
arrayrolesAdditional Properties Allowed:List of role assigned to the profile. - shippingAddress
-
Type:
objectshippingAddressAdditional Properties Allowed:Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead). - shippingAddresses
-
Type:
arrayshippingAddressesAdditional Properties Allowed:List of shipping addresses associated with profile.
Nested Schema : dynamicProperties
Nested Schema : roles
Nested Schema : shippingAddress
Type:
objectDefault shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
- address1
-
Type:
stringThe address line 1 of the shipping address. - address2
-
Type:
stringThe address line 2 of the shipping address. - address3
-
Type:
stringThe address line 3 of the shipping address. - alias
-
Type:
stringThe alias of the shipping address. - city
-
Type:
stringthe city of the shipping address. - companyName
-
Type:
stringThe company name of the shipping address. - country
-
Type:
stringthe country code of the shipping address. - county
-
Type:
stringThe county of the shipping address. - faxNumber
-
Type:
stringThe fax Number of the shipping address. - firstName
-
Type:
stringThe first name of the shipping address. - jobTitle
-
Type:
stringThe job Title of the shipping address. - lastName
-
Type:
stringThe last name of the shipping address. - middleName
-
Type:
stringThe Middle Name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringThe postal Code of the shipping address. - prefix
-
Type:
stringThe prefix of the shipping address. - repositoryId
-
Type:
stringThe repository ID of the shipping address. - state
-
Type:
stringThe state code of the shipping address. - suffix
-
Type:
stringThe suffix of the shipping address.
Nested Schema : shippingAddresses
Nested Schema : items
Type:
object- default
-
Type:
stringThe default value of the dynamic property. - id
-
Type:
stringThe ID of the dynamic property. - label
-
Type:
stringThe label of the dynamic property. - length
-
Type:
numberThe length attribute of the dynamic property. - required
-
Type:
booleanThe required attribute of the dynamic property. - type
-
Type:
stringThe type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string. - uiEditorType
-
Type:
stringThe uiEditorType attribute of the dynamic property. - value
-
Type:
stringThe value of the dynamic property.
Nested Schema : items
Type:
object- function
-
Type:
stringName of the role. - repositoryId
-
Type:
stringRepository Id of the role.
Nested Schema : items
Type:
object- address1
-
Type:
stringThe address line 1 of the shipping address. - address2
-
Type:
stringThe address line 2 of the shipping address. - address3
-
Type:
stringThe address line 3 of the shipping address. - alias
-
Type:
stringThe alias of the shipping address. - city
-
Type:
stringThe city of the shipping address. - companyName
-
Type:
stringThe company name of the shipping address. - country
-
Type:
stringThe country code of the shipping address. - countryName
-
Type:
stringThe display name for the 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. - prefix
-
Type:
stringThe prefix of the shipping address. - regionName
-
Type:
stringThe display name for the state of the shipping address - repositoryId
-
Type:
stringThe repository ID of the shipping address. - state
-
Type:
stringThe state code of the shipping address.
Example application/json
{
"lastName":"Anderson",
"dynamicProperties":[
{
"id":"dynamicPropertyMaritalStatus",
"label":"Marital Status",
"type":"string",
"value":"Married"
}
],
"contactBillingAddress":{
"lastName":"Anderson",
"firstName":"Kim",
"country":"US",
"phoneNumber":"212-555-2150",
"address2":null,
"city":"Buffalo",
"address1":"451 Brooks Ave",
"postalCode":"14201",
"county":null,
"repositoryId":"se-990031",
"state":"NY"
},
"receiveEmail":"yes",
"secondaryAddresses":{
"Work":{
"lastName":"Anderson",
"firstName":"Kim",
"country":"US",
"phoneNumber":"212-555-2150",
"address2":null,
"city":"Buffalo",
"address1":"451 Brooks Ave",
"postalCode":"14201",
"county":null,
"repositoryId":"se-970031",
"state":"NY"
},
"Mom' s house":{
"lastName":"Anderson",
"firstName":"Dolores",
"country":"US",
"phoneNumber":"212-555-4321",
"address2":null,
"city":"Dewitt",
"address1":"41 Wexford Rd ",
"postalCode":"13214",
"county":null,
"repositoryId":"se-140010",
"state":"NY"
},
"Home":{
"lastName":"dd",
"firstName":"sdf",
"country":"US",
"phoneNumber":"1231231231",
"address2":"f",
"city":"f",
"address1":"dd",
"postalCode":"36123",
"county":null,
"repositoryId":"se-980031",
"state":"AL"
}
},
"contactShippingAddress":{
"lastName":"dd",
"firstName":"sdf",
"country":"US",
"phoneNumber":"1231231231",
"address2":"f",
"city":"f",
"address1":"dd",
"postalCode":"36123",
"county":null,
"repositoryId":"se-980031",
"state":"AL"
},
"firstName":"Kim",
"profileType":"b2b_user",
"repositoryId":"120117",
"shippingAddress":{
"lastName":"Anderson",
"firstName":"Kim",
"country":"US",
"phoneNumber":"212-555-1977",
"address2":"",
"city":"Montgomery",
"address1":"21 Cedar Ave",
"postalCode":"13202",
"county":null,
"repositoryId":"142021",
"state":"NY"
},
"id":"120117",
"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"
}
]
}
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|
|------------------|------------------|
|200012|please provide valid input|
|23010|City not specified in shipping address|
|23011|Address line 1 not specified in shipping address|
|22000|The profile id passes is null or empty.|
|23012|No last name specified in shipping address|
|22001|Internal error while getting the profile.|
|23013|No first name specified in shipping address|
|22002|No profile found with the given id.|
|23015|Phone number not specified in shipping address|
|23005|Invalid phone number in shipping address|
|23007|No country specified in shipping address|
|23008|Postal code not specified in shipping address|
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:
arrayerrorsAdditional Properties Allowed:An 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:
{
"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"
}
]
}
Sample Response Payload returned by endpoint:
{
"lastName": "Anderson",
"dynamicProperties": [{
"id": "dynamicPropertyMaritalStatus",
"label": "Marital Status",
"type": "string",
"value": "Married"
}],
"contactBillingAddress": {
"lastName": "Anderson",
"firstName": "Kim",
"country": "US",
"phoneNumber": "212-555-2150",
"address2": null,
"city": "Buffalo",
"address1": "451 Brooks Ave",
"postalCode": "14201",
"county": null,
"repositoryId": "se-990031",
"state": "NY"
},
"receiveEmail": "yes",
"secondaryAddresses": {
"Work": {
"lastName": "Anderson",
"firstName": "Kim",
"country": "US",
"phoneNumber": "212-555-2150",
"address2": null,
"city": "Buffalo",
"address1": "451 Brooks Ave",
"postalCode": "14201",
"county": null,
"repositoryId": "se-970031",
"state": "NY"
},
"Mom' s house": {
"lastName": "Anderson",
"firstName": "Dolores",
"country": "US",
"phoneNumber": "212-555-4321",
"address2": null,
"city": "Dewitt",
"address1": "41 Wexford Rd ",
"postalCode": "13214",
"county": null,
"repositoryId": "se-140010",
"state": "NY"
},
"Home": {
"lastName": "dd",
"firstName": "sdf",
"country": "US",
"phoneNumber": "1231231231",
"address2": "f",
"city": "f",
"address1": "dd",
"postalCode": "36123",
"county": null,
"repositoryId": "se-980031",
"state": "AL"
}
},
"contactShippingAddress": {
"lastName": "dd",
"firstName": "sdf",
"country": "US",
"phoneNumber": "1231231231",
"address2": "f",
"city": "f",
"address1": "dd",
"postalCode": "36123",
"county": null,
"repositoryId": "se-980031",
"state": "AL"
},
"firstName": "Kim",
"profileType": "b2b_user",
"repositoryId": "120117",
"shippingAddress": {
"lastName": "Anderson",
"firstName": "Kim",
"country": "US",
"phoneNumber": "212-555-1977",
"address2": "",
"city": "Montgomery",
"address1": "21 Cedar Ave",
"postalCode": "13202",
"county": null,
"repositoryId": "142021",
"state": "NY"
},
"id": "120117",
"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"
}
]
}