registerProfile
post
/ccstore/v1/profiles/register
Register Profile. Creates a profile and tries to auto-logs in. See endpoints 'createProfile' and 'login'. If email does not exist in the repository create a new profile with email and password and return the id else return an error message. Optionally takes the x-ccasset-language header to get translated content in another language. Dynamic Properties can also be passed 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 : registerProfile_request
Type:
Show Source
object
-
dateOfBirth:
string
The date of birth of the profile user.
-
email(required):
string
The email address of the profile.
-
firstName(required):
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(required):
string
The last name of the profile.
-
login:
string
The login of the profile.
-
password(required):
string
The password of the profile.
-
receiveEmail(required):
string
The string representation of whether the user wants to receive email or not.
-
shippingAddresses:
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 : shippingAddresses
Type:
array
List 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 code of the shipping address.
-
county:
string
The county 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
The following model is returned when operation succeeds.
Root Schema : registerProfile_response
Type:
Show Source
object
-
access_token:
string
Refreshable OAuth token.
-
expires_in:
integer
Time in seconds until token expires.
-
id:
string
The ID of the new profile.
-
token_type:
string
OAuth token type.
Example Response (application/json)
{
"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0MTQxNDk5NTYsInN1YiI6IjExMDU1OCIsImlzcyI6InN0b3JlZnJvbnRVSSIsImlhdCI6MTQxNDE0OTAyNn0=.B9qM0/VKpCNKvjCmOnUPv4RS7mkIDgKcP8RJPaVQGYU=",
"id":"110026",
"token_type":"bearer",
"expires_in":930
}
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|
|------------------|------------------|
|23013|If the firstName passed is null or empty|
|23012|If the lastName passed is null or empty|
|60001000|If the email passed is null or empty|
|22005|If the password passed is null or empty|
|23016|If the receiveEmail passed is null or empty|
|23006|If the email passed is invalid|
|13036|If the receiveEmail passed is invalid|
|92103|If the password passed 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