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.
-
defaultBillToAddressIdByOrg:
string
The comma-separated values for default bill-to address IDs corresponding to organizations for the profile. These addresses belong to one of the bill-to addresses of the profile's organizations. This is applicable for B2B profiles.
-
defaultShipToAddressIdByOrg:
string
The comma-separated values for default ship-to address IDs corresponding to organizations for the profile. These addresses belong to one of the ship-to addresses of the profile's organizations. This is applicable for B2B profiles.
-
email:
string
The email address of the profile.
-
firstName:
string
The first name of the profile.
-
GDPRProfileP13nConsentGranted:
boolean
If user has given consent for his/her profile information to be used for personalization purposes.
-
gender:
string
The gender of the profile user.
-
lastName:
string
The last name of the profile.
-
newConfirmPassword:
string
Confirmation of the new password. This should match the new password value.
-
newPassword:
string
The new password.
-
oldPassword:
string
The current password.
-
receiveEmail:
string
This is email marketing flag. can be yes or no.
-
shippingAddress:
object shippingAddress
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
-
shippingAddresses:
array shippingAddresses
List of shipping addresses associated with profile.
Example:
{
"firstName":"Jack",
"lastName":"Black",
"GDPRProfileP13nConsentGranted":false,
"defaultBillToAddressIdByOrg":"org1:110028,org2:110029",
"gender":"male",
"receiveEmail":"yes",
"dateOfBirth":"null",
"locale":"en",
"email":"jack@example.com",
"shippingAddresses":[
{
"lastName":"Black",
"country":"United States",
"types":[
{
"id":"ss-100002"
}
],
"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",
"types":[
{
"id":"ss-100002"
}
],
"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"
}
],
"defaultShipToAddressIdByOrg":"org1:130012,org2:130013"
}Nested Schema : shippingAddress
Type:
objectDefault shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Show Source
-
address1(required):
string
The address line 1 of the shipping address.
-
address2:
string
The address line 2 of the shipping address.
-
address3:
string
The address line 3 of the shipping address.
-
alias:
string
The alias of the shipping address.
-
companyName:
string
The company name of the shipping address.
-
country(required):
string
The country code of the shipping address.
-
county:
string
The county of the shipping address.
-
firstName(required):
string
The first name of the shipping address.
-
lastName(required):
string
The last name of the shipping address.
-
phoneNumber:
string
The phone Number of the shipping address.
-
postalCode(required):
string
The postal Code of the shipping address.
-
prefix:
string
The prefix of the shipping address.
-
repositoryId:
string
The repository ID of the shipping address.
-
selectedCountry:
string
The country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country.
-
selectedState:
string
The state ISO alpha-2 code of the shipping address. If selectedState is sent in the request then it takes precedence over state.
-
state(required):
string
The state code of the shipping address.
-
state_ISOCode:
string
The state ISO alpha-4 code of the shipping address.
-
types:
array types
The types tagged to the address
Nested Schema : shippingAddresses
Type:
arrayList of shipping addresses associated with profile.
Show Source
Nested Schema : items
Type:
Show Source
object-
address1(required):
string
The address line 1 of the shipping address.
-
address2:
string
The address line 2 of the shipping address.
-
address3:
string
The address line 3 of the shipping address.
-
alias:
string
The alias of the shipping address.
-
city(required):
string
The city of the shipping address.
-
companyName:
string
The company name of the shipping address.
-
country(required):
string
The country of the shipping address.
-
county:
string
The county code of the shipping address.
-
firstName(required):
string
The first name of the shipping address.
-
isDefaultAddress:
boolean
Whether to store this address in the default shipping address slot.
-
lastName(required):
string
The last name of the shipping address.
-
phoneNumber:
string
The phone Number of the shipping address.
-
postalCode(required):
string
The postal Code of the shipping address.
-
prefix:
string
The prefix of the shipping address.
-
repositoryId:
string
The repository ID of the shipping address.
-
selectedCountry:
string
The country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country.
-
selectedState:
string
The state ISO alpha-2 code of the shipping address. If selectedState is sent in the request then it takes precedence over state.
-
state(required):
string
The state code of the shipping address.
-
state_ISOCode:
string
The state ISO alpha-4 code of the shipping address.
-
types:
array types
The types tagged to the 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.
-
contactBillingAddress:
object contactBillingAddress
The default billing address for B2B contact.
-
contactShippingAddress:
object contactShippingAddress
The default shipping address for B2B contact
-
currentOrganization:
object currentOrganization
The current Organization
-
customerContactId:
string
The external customer contact id.
-
dateOfBirth:
string
The date of birth of the profile user.
-
daytimeTelephoneNumber:
string
The phone Number of the profile.
-
derivedApprovalRequired:
boolean
Approval required
-
derivedOrderPriceLimit:
number
Order limit
-
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.
-
firstVisitDate:
string
First Visit Date on the profile
-
GDPRProfileP13nConsentDate:
string
The date on which GDPR personalization consent was granted by the user.
-
GDPRProfileP13nConsentGranted:
boolean
If user has given consent for his/her profile information to be used for personalization purposes.
-
gender:
string
The gender of the profile user.
-
id:
string
The ID of the profile to retrieve.
-
lastName:
string
The last name of the profile.
-
lastPurchaseAmount:
number
Last purchased amount on the profile
-
lastPurchaseDate:
string
The last time the shopper made a purchase.
-
lastVisitDate:
string
The last time the shopper visited.
-
lifetimeAOV:
number
Lifetime Average Order Value
-
lifetimeCurrencyCode:
string
Life time currency Code
-
lifetimeSpend:
number
Lifetime spend of the profile
-
locale:
string
Current Locale
-
login:
string
Login id to be used.
-
loyaltyPrograms:
array loyaltyPrograms
Loyalty Programs Information
-
numberOfOrders:
integer
Total number of orders for the customer profile.
-
numberOfVisits:
integer
Number of Visits on the profile
-
parentOrganization:
object parentOrganization
The parent Organization associated with the B2B customer profile.
-
previousVisitDate:
string
Previous Visit Date on the profile
-
priceListGroup:
object priceListGroup
Price list group properties
-
receiveEmail:
string
This is email marketing flag. Can be yes or no.
-
receiveEmailDate:
string
The date on which email marketing consent was granted by the user.
-
registrationDate:
string(date-time)
Registration date
-
repositoryId:
string
The repository id of the customer profile record.
-
roles:
array roles
List of roles assigned to the profile.
-
secondaryAddresses:
object secondaryAddresses
Secondary addresses for B2B contact.
-
secondaryOrganizations:
array secondaryOrganizations
List of secondary organizations that need to associate with the user.
-
shippingAddress:
object shippingAddress
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
-
shippingAddresses:
array shippingAddresses
List of shipping addresses associated with profile.
-
taxExempt:
boolean
If tax is exempted
Nested Schema : catalog
Type:
objectThe catalog associated with this profile.
Show Source
-
repositoryId:
string
RepositoryId of the catalog associated with this profile.
Nested Schema : contactBillingAddress
Type:
objectThe 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.
-
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:
objectThe 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.
-
address3:
string
The address line 3 in the shipping address.
-
city:
string
The city in the shipping address record.
-
companyName:
string
Company name for this address.
-
country:
string
The country in the shipping address record.
-
county:
string
The county in the shipping address.
-
faxNumber:
string
Fax number for shipping address.
-
firstName:
string
The first name in the shipping address.
-
jobTitle:
string
Job title for shipping address.
-
lastName:
string
The last name in the shipping address.
-
middleName:
string
Middle name for 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.
-
suffix:
string
Suffix for shipping address.
Nested Schema : currentOrganization
Type:
objectThe current Organization
Show Source
-
id:
string
The current Organization Id
Nested Schema : dynamicProperties
Type:
arrayRead-only list of dynamic properties associated with profile along with meta-data.
Show Source
Nested Schema : parentOrganization
Type:
objectThe parent Organization associated with the B2B customer profile.
Show Source
-
id:
string
The id of the organization.
-
name:
string
The name of of the organization.
-
punchoutUserId:
string
Punchout user Id of organization, read only property.
-
repositoryId:
string
The repository id of the comment record.
Nested Schema : priceListGroup
Type:
objectPrice list group properties
Show Source
-
active:
boolean
Whether the price list group is active or not
-
currency:
object currency
Currency of the price list group
-
deleted:
boolean
Whether the price list group is deleted or not
-
displayName:
string
Display name of the price list group
-
endDate:
string
End date of the price list group
-
id:
string
ID of the price list group
-
listPriceList:
object listPriceList
-
locale:
string
Locale of the price list group
-
salePriceList:
object salePriceList
Sale price list properties
-
shippingSurchargePriceList:
object shippingSurchargePriceList
Shipping surcharge price list properties
-
startDate:
string
Start date of the price list group
Nested Schema : secondaryAddresses
Type:
objectSecondary 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.
-
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:
arrayList of secondary organizations that need to associate with the user.
Show Source
Nested Schema : shippingAddress
Type:
objectDefault shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Show Source
-
address1:
string
The address line 1 of the shipping address.
-
address2:
string
The address line 2 of the shipping address.
-
address3:
string
The address line 3 of the shipping address.
-
alias:
string
The alias of the shipping address.
-
city:
string
the city of the shipping address.
-
companyName:
string
The company name of the shipping address.
-
country:
string
the country code of the shipping address.
-
county:
string
The county of the shipping address.
-
faxNumber:
string
The fax Number of the shipping address.
-
firstName:
string
The first name of the shipping address.
-
jobTitle:
string
The job Title of the shipping address.
-
lastName:
string
The last name of the shipping address.
-
middleName:
string
The Middle Name of the shipping address.
-
phoneNumber:
string
The phone Number of the shipping address.
-
postalCode:
string
The postal Code of the shipping address.
-
prefix:
string
The prefix of the shipping address.
-
repositoryId:
string
The repository ID of the shipping address.
-
state:
string
The state code of the shipping address.
-
suffix:
string
The suffix of the shipping address.
-
types:
array types
The types tagged to the address
Nested Schema : shippingAddresses
Type:
arrayList of shipping addresses associated with profile.
Show Source
Nested Schema : items
Type:
Show Source
object-
default:
string
The default value of the dynamic property.
-
id:
string
The ID of the dynamic property.
-
label:
string
The label of the dynamic property.
-
length:
number
The length attribute of the dynamic property.
-
required:
boolean
The required attribute of the dynamic property.
-
type:
string
The type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string.
-
uiEditorType:
string
The uiEditorType attribute of the dynamic 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 : currency
Type:
objectCurrency of the price list group
Show Source
-
currencyCode:
string
Currency Code
-
displayName:
string
Display name of the currency
-
fractionalDigits:
integer
Fractional digits
-
numericCode:
string
Numeric code of the currency
-
symbol:
string
Symbol of the currency
Nested Schema : listPriceList
Type:
Show Source
object-
basePriceList:
string
Base list price
-
creationDate:
string
Creation date of the list price
-
description:
string
Description of the list price
-
displayName:
string
Display name of the list price
-
endDate:
string
End date of the list price
-
id:
string
ID of the list price
-
item-id:
string
Item id of the list price
-
itemAcl:
string
Setting for access control for the list price
-
lastModifiedDate:
string
Last modified date of the list price
-
locale:
string
Locale of the list price
-
startDate:
string
Start date of the list price
-
version:
integer
Version of the list price
Nested Schema : salePriceList
Type:
objectSale price list properties
Show Source
-
basePriceList:
string
Base price list
-
creationDate:
string
Creation date of the sale price
-
description:
string
Description of the sale price
-
displayName:
string
Display name of the sale price
-
endDate:
string
End date of the sale price
-
id:
string
ID of the sale price
-
item-id:
string
Item id of the sale price
-
itemAcl:
string
Setting for access control for the sale price
-
lastModifiedDate:
string
Last modified date of the sale price
-
locale:
string
Locale of the sale price
-
startDate:
string
Start date of the sale price
-
version:
integer
Version of the sale price
Nested Schema : shippingSurchargePriceList
Type:
objectShipping surcharge price list properties
Show Source
-
basePriceList:
string
Base list price
-
creationDate:
string
Creation date of the shipping surcharge price
-
description:
string
Description of the shipping surcharge price
-
displayName:
string
Display name of the shipping surcharge price
-
endDate:
string
End date of the shipping surcharge price
-
id:
string
ID of the shipping surcharge price
-
item-id:
string
Item id of the shipping surcharge price
-
itemAcl:
string
Setting for access control for the shipping surcharge price
-
lastModifiedDate:
string
Last modified date of the shipping surcharge price
-
locale:
string
Locale of the shipping surcharge price
-
startDate:
string
Start Date of the shipping surcharge price
-
version:
integer
Version of the shipping surcharge price
Nested Schema : items
Type:
Show Source
object-
function:
string
Name of the role.
-
repositoryId:
string
Repository Id of the role.
Nested Schema : items
Type:
Show Source
object-
displayName:
string
The name of the address type
-
id:
string
repository Id of the address type
-
repositoryId:
string
repository Id of the address type
Nested Schema : items
Type:
Show Source
object-
address1:
string
The address line 1 of the shipping address.
-
address2:
string
The address line 2 of the shipping address.
-
address3:
string
The address line 3 of the shipping address.
-
alias:
string
The alias of the shipping address.
-
city:
string
The city of the shipping address.
-
companyName:
string
The company name of the shipping address.
-
country:
string
The country code of the shipping address.
-
countryName:
string
The display name for the country of the shipping address
-
county:
string
The county of the shipping address.
-
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.
-
prefix:
string
The prefix of the shipping address.
-
regionName:
string
The display name for the state of the shipping address
-
repositoryId:
string
The repository ID of the shipping address.
-
state:
string
The state code of the shipping address.
-
types:
array types
The types tagged to the address
Nested Schema : items
Type:
Show Source
object-
displayName:
string
The name of the address type
-
id:
string
repository Id of the address type
-
repositoryId:
string
repository Id of the address type
Example Response (application/json)
{
"lastPurchaseDate":null,
"lastName":"Anderson",
"GDPRProfileP13nConsentDate":null,
"GDPRProfileP13nConsentGranted":false,
"gender":"female",
"numberOfOrders":0,
"locale":"en",
"receiveEmailDate":null,
"firstPurchaseDate":null,
"defaultShipToAddressIdByOrg":"org1:130012,org2:130013",
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/profiles/current"
}
],
"id":"se-570031",
"email":"kim@example.com",
"daytimeTelephoneNumber":"212-555-1977",
"numberOfVisits":1,
"receiveEmail":"yes",
"dateOfBirth":"null",
"lastVisitDate":null,
"previousVisitDate":null,
"firstName":"Kim",
"defaultBillToAddressIdByOrg":"org1:110028,org2:110029",
"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"
},
"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:
arrayAn 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