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: string
The asset language of the request
Root Schema : updateProfile_request
Type:
Show Source
object
-
dateOfBirth:
string
The date of birth of the profile user.
-
daytimeTelephoneNumber:
string
The phone Number of the profile.
-
dynamicProperty:
object dynamicProperty
Dynamic property name and value.
-
email:
string
The email address of the profile.
-
firstName:
string
The first name of the profile.
-
GDPRProfileP13nConsentGranted:
boolean
Indicates whether the customer has given consent for his/her profile information to be used for personalization purposes. Can be true or false.
-
lastName:
string
The last name of the profile.
-
login:
string
Login id to be used.
-
receiveEmail:
string
Indicates whether the customer should receive marketing emails on the current site. Can be yes or no.
-
shippingAddresses:
object shippingAddresses
shipping address of the profile.
Example:
{
"dynamicPropertyMaritalStatus":"Married",
"lastName":"Anderson",
"firstName":"Kim",
"GDPRProfileP13nConsentGranted":true,
"receiveEmail":"yes",
"dateOfBirth":"2017-11-14T00:00:00.000Z",
"email":"kim@example.com",
"daytimeTelephoneNumber":"212-555-1977",
"shippingAddresses":[
{
"lastName":"Anderson",
"country":"United States",
"types":[
{
"id":"SHIPPING"
}
],
"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"
}
]
}
Nested Schema : dynamicProperty
Type:
object
Dynamic property name and value.
Nested Schema : shippingAddresses
Type:
object
shipping address of the profile.
Show Source
-
address1:
string
The address1 of the shipping address.
-
address2:
string
The address2 of the shipping address.
-
city:
string
The city of the shipping address.
-
country:
string
The country of the shipping address.
-
county:
string
The county of the shipping address.
-
firstName:
string
The first name of the shipping address.
-
isDefaultAddress:
boolean
Indicates if its the default shipping address
-
lastName:
string
The last name of the shipping address.
-
phoneNumber:
string
The phone Number of the shipping address.
-
postalCode:
string
The postal Code of the shipping address.
-
state:
string
The state of the shipping address.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : updateProfile_response
Type:
Show Source
object
-
active:
boolean
Indicates whether the organization is active
-
catalog:
object catalog
The catalog associated with this profile.
-
comments:
array comments
the notes on the customer.
-
contactBillingAddress(required):
object contactBillingAddress
The default billing address for B2B contact.
-
contactShippingAddress:
object contactShippingAddress
The default shipping address for B2B contact
-
customerContactId:
string
The external customer contact id.
-
dateOfBirth:
string
Date of birth
-
daytimeTelephoneNumber:
string
The phone Number of the profile.
-
dynamicProperties:
array dynamicProperties
Read-only list of dynamic properties associated with profile along with meta-data.
-
email:
string
The email address of the profile.
-
firstName:
string
The first name of the profile.
-
firstPurchaseDate:
string
The first time the shopper made a purchase.
-
GDPRProfileP13nConsentDate:
string
The date on which GDPR personalization consent was granted by the user.
-
GDPRProfileP13nConsentGranted:
boolean
Indicates whether the user has given GDPR Profile P13n consent on the current site. Can be true or false.
-
id:
string
The id of the profile to retrieve.
-
lastName:
string
The last name of the profile.
-
lastPurchaseDate:
string
The last time the shopper made a purchase.
-
lastVisitDate:
string
The last time the shopper visited.
-
lifetimeSpend:
number
Lifetime spend of the profile
-
locale:
string
Current Locale
-
login:
string
Login id to be used.Defaults for email if not passed.
-
loyaltyPrograms:
array loyaltyPrograms
Loyalty Programs Information
-
numberOfOrders:
integer
Total number of orders for the customer profile.
-
previousVisitDate:
string
Previous Visit Date on the profile
-
priceListGroup:
object priceListGroup
The associated price list group for this user
-
profileType:
string
The type of the user. Possible values are b2b_user and b2c_user.
-
receiveEmail:
string
Indicates whether the customer has opted for receiving marketing emails on the current site. Can be yes or no.
-
receiveEmailDate:
string
The date on which the customer opted for receiving marketing emails.
-
repositoryId:
string
The id of the billing address
-
roles:
array roles
List of user roles.
-
secondaryAddresses(required):
object secondaryAddresses
Secondary addresses for B2B contact.
-
secondaryOrganizations:
array secondaryOrganizations
The secondary organizations associated with the B2B customer profile.
-
shippingAddress:
object shippingAddress
Default shipping address of the profile (Deprecated, please use ???shippingAddresses??? instead).
-
shippingAddresses:
array shippingAddresses
The shipping addresses associated with the customer profile
-
taxExempt:
boolean
If tax is exempted
Nested Schema : catalog
Type:
object
The catalog associated with this profile.
Show Source
-
repositoryId:
string
RepositoryId of the catalog associated with this profile.
Nested Schema : comments
Type:
array
the notes on the customer.
Show Source
-
Array of:
object items
The info of the customer
Nested Schema : contactBillingAddress
Type:
object
The default billing address for B2B contact.
Show Source
-
address1:
string
Address line 1 for this billing address.
-
address2:
string
Address line 2 for this billing address.
-
address3:
string
Address line 3 for this billing address.
-
city:
string
City for this billing address.
-
companyName:
string
Company name for this billing address.
-
country:
string
Country for this billing address.
-
county:
string
County for this billing address.
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
email:
string
Email for this billing address.
-
externalAddressId:
string
External address id
-
faxNumber:
string
Fax number for this billing address.
-
firstName:
string
First name for this billing address.
-
jobTitle:
string
Job title for this billing address.
-
lastName:
string
Last name for this billing address.
-
middleName:
string
Middle name for this billing address.
-
phoneNumber:
string
Phone number for this billing address.
-
postalCode:
string
Postal code for this billing address.
-
prefix:
string
Prefix for this billing address.
-
repositoryId:
string
The repository id of the billing address record.
-
state:
string
State for this billing address.
-
suffix:
string
Suffix for this billing address.
Nested Schema : contactShippingAddress
Type:
object
The default shipping address for B2B contact
Show Source
-
address1:
string
The address line 1 in the shipping address.
-
address2:
string
The address line 2 in the shipping address.
-
city:
string
The city in the shipping address record.
-
country:
string
The country in the shipping address record.
-
county:
string
The county in the shipping address.
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
externalAddressId:
string
External address id
-
firstName:
string
The first name in the shipping address.
-
lastName:
string
The last name in the shipping address.
-
phoneNumber:
string
The phone number in the shipping address.
-
postalCode:
string
The postal code in the shipping address.
-
repositoryId:
string
The repository id of the shipping address record.
-
state:
string
The state in the shipping address.
Nested Schema : dynamicProperties
Type:
array
Read-only list of dynamic properties associated with profile along with meta-data.
Show Source
Nested Schema : priceListGroup
Type:
object
The associated price list group for this user
Show Source
-
repositoryId:
string
Repository ID
Nested Schema : secondaryAddresses
Type:
object
Secondary addresses for B2B contact.
Show Source
-
address1:
string
Address line 1 for this address.
-
address2:
string
Address line 2 for this address.
-
address3:
string
Address line 3 for this address.
-
city:
string
City for this address.
-
companyName:
string
Company name for this address.
-
country:
string
Country for this address.
-
county:
string
County for this address.
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
email:
string
Email for this address.
-
externalAddressId:
string
External address id
-
faxNumber:
string
Fax number for this address.
-
firstName:
string
First name for this address.
-
jobTitle:
string
Job title for this address.
-
lastName:
string
Last name for this address.
-
middleName:
string
Middle name for this address.
-
phoneNumber:
string
Phone number for this address.
-
postalCode:
string
Postal code for this address.
-
prefix:
string
Prefix for this address.
-
repositoryId:
string
The id of this address.
-
state:
string
State for this address.
-
suffix:
string
Suffix for this address.
Nested Schema : secondaryOrganizations
Type:
array
The secondary organizations associated with the B2B customer profile.
Show Source
Nested Schema : shippingAddress
Type:
object
Default shipping address of the profile (Deprecated, please use ???shippingAddresses??? instead).
Show Source
-
address1:
string
The address1 of the shipping address.
-
address2:
string
The address2 of the shipping address.
-
city:
string
The city of the shipping address.
-
country:
string
The country of the shipping address.
-
county:
string
The county of the shipping address.
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
externalAddressId:
string
External address id
-
firstName:
string
The first name of the shipping address.
-
lastName:
string
The last name of the shipping address.
-
phoneNumber:
string
The phone Number of the shipping address.
-
postalCode:
string
The postal Code of the shipping address.
-
repositoryId:
string
The id of the shipping address.
-
state:
string
The state of the shipping address.
Nested Schema : shippingAddresses
Type:
array
The shipping addresses associated with the customer profile
Show Source
Nested Schema : items
Type:
object
The info of the customer
Show Source
-
agent:
string
The user id of the Agent.
-
comment:
string
The description of comment.
-
creationDate:
string
The creation date of the note.
-
id:
string
The id of the comment.
-
item-id:
string
The item-id of the comment
-
owner:
string
The owner of the note.
-
version:
integer
The version of the note.
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Nested Schema : items
Type:
Show Source
object
-
default:
string
Default value of the dynamic property.
-
id:
string
The ID of the dynamic property.
-
label:
string
Displayed text used to describe the dynamic property
-
length:
number
Length of the dynamic property.
-
required:
boolean
Whether a value is required
-
type:
string
The type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string.
-
uiEditorType:
string
Allowed Values:
[ "shortText", "richText", "date", "number", "checkbox", "list" ]
The user interface type used to display / edit the property. -
value:
string
The value of the dynamic property.
Nested Schema : items
Type:
Show Source
object
-
membershipId:
string
membershipId of the profile.
-
programId:
string
programId of Loyalty Program
-
programName:
string
programName of Loyalty Program
-
repositoryId:
string
repository Id
-
status:
string
status of Enrollment
Nested Schema : items
Type:
Show Source
object
-
function:
string
Function of the role which can be admin or buyer.
-
repositoryId:
string
Repository id of the role.
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Nested Schema : items
Type:
Show Source
object
-
active:
boolean
Indicates whether the organization is active
-
name:
string
The name of the organization.
-
repositoryId:
string
The repository id of the comment record.
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Nested Schema : items
Type:
Show Source
object
-
address1:
string
The address line 1 in the shipping address.
-
address2:
string
The address line 2 in the shipping address.
-
city:
string
The city in the shipping address record.
-
companyName:
string
The company name of the person in the shipping address
-
country:
string
The country in the shipping address record.
-
county:
string
The county in the shipping address.
-
dynamicProperty:
object dynamicProperty
The value of the dynamic Property
-
externalAddressId:
string
External address id
-
faxNumber:
string
The fax number in the shipping address
-
firstName:
string
The first name in the shipping address.
-
isDefaultAddress:
boolean
Indicates if its the default shipping address
-
jobTitle:
string
The job title of the person in the shipping address
-
lastName:
string
The last name in the shipping address.
-
middleName:
string
The middle name in the shipping address.
-
phoneNumber:
string
The phone number in the shipping address.
-
postalCode:
string
The postal code in the shipping address.
-
repositoryId:
string
The repository id of the shipping address record.
-
selectedCountry:
string
The selected country in the shipping address
-
selectedState:
string
The selected state in the shipping address
-
state:
string
The state in the shipping address.
-
state_ISOCode:
string
The state ISO code in the shipping address
-
suffix:
string
The suffix of the person in the shipping address.
Nested Schema : dynamicProperty
Type:
object
The value of the dynamic Property
Example Response (application/json)
{
"lastPurchaseDate":null,
"numberOfVisits":1,
"lastName":"Anderson",
"GDPRProfileP13nConsentDate":null,
"GDPRProfileP13nConsentGranted":false,
"gender":"female",
"receiveEmail":"yes",
"dateOfBirth":"null",
"numberOfOrders":0,
"lastVisitDate":null,
"previousVisitDate":null,
"locale":"en",
"receiveEmailDate":null,
"firstPurchaseDate":null,
"firstName":"Kim",
"repositoryId":"110033",
"firstVisitDate":null,
"shippingAddress":{
"lastName":"Black",
"country":"US",
"types":[
{
"displayName":"Billing",
"repositoryId":"ss-10002",
"id":"ss-10002"
}
],
"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@example.com",
"daytimeTelephoneNumber":"212-555-1977",
"shippingAddresses":[
{
"lastName":"Anderson",
"country":"US",
"types":[
{
"displayName":"Billing",
"repositoryId":"ss-10002",
"id":"ss-10002"
}
],
"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",
"types":[
{
"displayName":"Billing",
"repositoryId":"ss-10002",
"id":"ss-10002"
}
],
"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|
|180106|One or more address type ID is invalid|
|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code