createProfile
post
/ccagent/v1/profiles
Create Profile. Creates new user and generates password , if user does not exists for a given email id. Dynamic Properties of profile can be added to the request using the key value pair structure ("dynamicPropertyKey":"dynamicPropertyValue"). These property values can take the type from any of boolean, date, float, string, timestamp, enumerated, big string. Takes additonal header parameter x-ccsite corresponding to which site specific properties should be set. If x-ccsite value is not provided, it indicates default site.
Request
Supported Media Types
- application/json
Header Parameters
-
x-ccsite(optional): string
the site id corresponding to which site specific properties should be set
Root Schema : createProfile_request
Type:
Show Source
object
-
dateOfBirth(optional):
string
The date of birth of the profile user.
-
email:
string
The email address of the profile.
-
firstName:
string
The first name of the profile.
-
GDPRProfileP13nConsentGranted(optional):
boolean
If user has given consent for his/her profile information to be used for personalization purposes.
-
gender(optional):
string
The gender of the profile user.
-
lastName:
string
The last name of the profile.
-
password(optional):
string
The password of the profile. When enableProfileRegistrationEmailCheck site setting is enabled then password is optional otherwise it is required property.
-
receiveEmail:
string
The string representation of whether the user wants to receive email or not.
-
shippingAddress(optional):
object shippingAddress
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
-
shippingAddresses(optional):
array shippingAddresses
List of shipping addresses associated with profile.
Example:
{
"dynamicPropertyMaritalStatus":"Married",
"firstName":"kim",
"lastName":"anderson",
"password":"kim1234",
"GDPRProfileP13nConsentGranted":false,
"gender":"female",
"receiveEmail":"yes",
"dateOfBirth":"",
"email":"kim@example.com",
"shippingAddresses":[
{
"lastName":"Black",
"country":"United States",
"types":[
{
"id":"ss-100001"
}
],
"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-100001"
}
],
"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"
}
]
}
Nested Schema : shippingAddress
Type:
object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Show Source
-
address1:
string
The address line 1 of the shipping address.
-
address2(optional):
string
The address line 2 of the shipping address.
-
address3(optional):
string
The address line 3 of the shipping address.
-
alias(optional):
string
The alias of the shipping address.
-
companyName(optional):
string
The company name of the shipping address.
-
country:
string
The country code of the shipping address.
-
county(optional):
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(optional):
string
The phone Number of the shipping address.
-
postalCode:
string
The postal Code of the shipping address.
-
prefix(optional):
string
The prefix of the shipping address.
-
repositoryId(optional):
string
The repository ID of the shipping address.
-
selectedCountry(optional):
string
The country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country.
-
selectedState(optional):
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:
string
The state code of the shipping address.
-
state_ISOCode(optional):
string
The state ISO alpha-4 code of the shipping address.
-
types(optional):
array types
The types tagged to the address
Nested Schema : shippingAddresses
Type:
array
List of shipping addresses associated with profile.
Show Source
Nested Schema : items
Type:
Show Source
object
-
id(optional):
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(optional):
string
The address line 2 of the shipping address.
-
address3(optional):
string
The address line 3 of the shipping address.
-
alias(optional):
string
The alias of the shipping address.
-
city:
string
The city of the shipping address.
-
companyName(optional):
string
The company name of the shipping address.
-
country:
string
The country code of the shipping address.
-
county(optional):
string
The county of the shipping address.
-
firstName:
string
the first name of the shipping address.
-
isDefaultAddress(optional):
boolean
Whether to store this address in the default shipping address slot.
-
lastName:
string
The last name of the shipping address.
-
phoneNumber(optional):
string
The phone Number of the shipping address.
-
postalCode:
string
The postal Code of the shipping address.
-
prefix(optional):
string
The prefix of the shipping address.
-
repositoryId(optional):
string
The repository ID of the shipping address.
-
selectedCountry(optional):
string
The country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country.
-
selectedState(optional):
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:
string
The state code of the shipping address.
-
state_ISOCode(optional):
string
The state ISO alpha-4 code of the shipping address.
-
types(optional):
array types
The types tagged to the address
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
repository Id of the address type
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createProfile_response
Type:
Show Source
object
-
id(optional):
string
The ID of the profile to retrieve. This will be removed when enableProfileRegistrationEmailCheck site setting is enabled.
-
message(optional):
string
A descriptive message indicating profile creation will be displayed when enableProfileRegistrationEmailCheck site setting is enabled.
Example Response (application/json)
{
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagent/v1/profiles"
}
],
"id":"428738"
}
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|
|------------------|------------------|
|23012|No last name specified|
|23013|No first name specified|
|22003|Email Id passed in is null or empty|
|200019|There was a problem creating your account. Please try again.|
|22004|An internal error occurred while processing input request.|
|23006|Invalid email address specified|
|22024|{0}({1}) must be a String|
|13036|One of the dynamic properties is not writable by the Agent user|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
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(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code