updateProfile
put
/ccstore/v1/profiles/current
Update Profile. Updates customer profile attributes. Optionally takes the x-ccasset-language header to get translated content in another language. Dynamic Properties of profile can also be updated like any other attribute ("dynamicPropertyKey":"dynamicPropertyValue").
Request
Supported Media Types
- application/json
Header Parameters
- X-CCAsset-Language
-
Type:
string
The 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:
string
The phone Number of the profile. -
Type:
string
The email address of the profile. - firstName
-
Type:
string
The first name of the profile. - lastName
-
Type:
string
The last name of the profile. - login
-
Type:
string
Login id to be used. - receiveEmail
-
Type:
string
Indicates whether the customer should receive marketing emails on the current site. Can be yes or no. - shippingAddresses
-
Type:
object
shippingAddressesshipping address of the profile.
Nested Schema : shippingAddresses
Type:
object
shipping address of the profile.
- address1
-
Type:
string
The address1 of the shipping address. - address2
-
Type:
string
The address2 of the shipping address. - city
-
Type:
string
The city of the shipping address. - country
-
Type:
string
The country of the shipping address. - county
-
Type:
string
The county of the shipping address. - firstName
-
Type:
string
The first name of the shipping address. - lastName
-
Type:
string
The last name of the shipping address. - phoneNumber
-
Type:
string
The phone Number of the shipping address. - postalCode
-
Type:
string
The postal Code of the shipping address. - state
-
Type:
string
The 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:
object
contactBillingAddressRequired:true
The default billing address for B2B contact. - contactShippingAddress
-
Type:
object
contactShippingAddressThe default shipping address for B2B contact - daytimeTelephoneNumber
-
Type:
string
The phone Number of the profile. - dynamicProperties
-
Type:
array
dynamicPropertiesRead-only list of dynamic properties associated with profile along with meta-data. -
Type:
string
The email address of the profile. - firstName
-
Type:
string
The first name of the profile. - id
-
Type:
string
The id of the profile to retrieve. - lastName
-
Type:
string
The last name of the profile. - profileType
-
Type:
string
The type of the user. Possible values are b2b_user and b2c_user. - receiveEmail
-
Type:
string
Indicates whether the customer should receive marketing emails on the current site. - secondaryAddresses
-
Type:
object
secondaryAddressesRequired:true
Secondary addresses for B2B contact. - shippingAddress
-
Type:
object
shippingAddressDefault shipping address of the profile - shippingAddresses
-
Type:
array
shippingAddressesThe shipping addresses associated with the customer 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 : 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
Default shipping address of the profile
- address1
-
Type:
string
The address1 of the shipping address. - address2
-
Type:
string
The address2 of the shipping address. - city
-
Type:
string
The city of the shipping address. - country
-
Type:
string
The country of the shipping address. - county
-
Type:
string
The county of the shipping address. - firstName
-
Type:
string
The first name of the shipping address. - lastName
-
Type:
string
The last name of the shipping address. - phoneNumber
-
Type:
string
The phone Number of the shipping address. - postalCode
-
Type:
string
The postal Code of the shipping address. - repositoryId
-
Type:
string
The id of the shipping address. - state
-
Type:
string
The state of 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
{
"lastName":"Anderson",
"gender":"female",
"receiveEmail":"yes",
"dateOfBirth":"null",
"locale":"en",
"firstName":"Kim",
"repositoryId":"110033",
"shippingAddress":{
"lastName":"Black",
"country":"US",
"address3":"",
"address2":"",
"city":"Wake Forest",
"address1":"405 Kilmarnock",
"postalCode":"27587",
"county":"",
"firstName":"Jack",
"phoneNumber":"555123456",
"repositoryId":"110053",
"alias":"Address",
"state":"NC"
},
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/profiles/current"
}
],
"id":"se-570031",
"email":"kim@gmail.com",
"daytimeTelephoneNumber":"212-555-1977",
"shippingAddresses":[
{
"lastName":"Anderson",
"country":"US",
"address3":"",
"address2":"Broadway",
"address1":"326",
"prefix":"",
"postalCode":"30005",
"regionName":"Georgia",
"companyName":"",
"county":null,
"firstName":"Kim",
"phoneNumber":"9898989898",
"repositoryId":"se-980032",
"alias":"Address",
"state":"GA",
"countryName":"United States"
},
{
"lastName":"anderson",
"country":"US",
"address3":"",
"address2":"",
"address1":"anderson",
"prefix":"",
"postalCode":"13202",
"regionName":"Georgia",
"companyName":"",
"county":null,
"firstName":"kim",
"phoneNumber":"",
"repositoryId":"se-980031",
"alias":"Address##0",
"state":"GA",
"countryName":"United States"
}
]
}
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|
|22024|{0}({1}) must be a String|
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
errorsAn 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 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" } ] }
Sample Response Payload returned by endpoint:
{ "lastName": "Anderson", "gender": "female", "receiveEmail": "yes", "dateOfBirth": "null", "locale": "en", "firstName": "Kim", "repositoryId": "110033", "shippingAddress": { "lastName": "Black", "country": "US", "address3": "", "address2": "", "city": "Wake Forest", "address1": "405 Kilmarnock", "postalCode": "27587", "county": "", "firstName": "Jack", "phoneNumber": "555123456", "repositoryId": "110053", "alias": "Address", "state": "NC" }, "links": [{ "rel": "self", "href": "http://localhost:8080/ccstoreui/v1/profiles/current" }], "id": "se-570031", "email": "kim@gmail.com", "daytimeTelephoneNumber": "212-555-1977", "shippingAddresses": [ { "lastName": "Anderson", "country": "US", "address3": "", "address2": "Broadway", "address1": "326", "prefix": "", "postalCode": "30005", "regionName": "Georgia", "companyName": "", "county": null, "firstName": "Kim", "phoneNumber": "9898989898", "repositoryId": "se-980032", "alias": "Address", "state": "GA", "countryName": "United States" }, { "lastName": "anderson", "country": "US", "address3": "", "address2": "", "address1": "anderson", "prefix": "", "postalCode": "13202", "regionName": "Georgia", "companyName": "", "county": null, "firstName": "kim", "phoneNumber": "", "repositoryId": "se-980031", "alias": "Address##0", "state": "GA", "countryName": "United States" } ] }