createProfile
post
/ccstore/v1/profiles
Create Profile. 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
-
Type:
stringThe asset language of the request
Body Parameter
Root Schema : createProfile_request
{
"dynamicPropertyMaritalStatus":"Single",
"firstName":"Pratiksha",
"lastName":"Oracle123",
"receiveEmail":"no",
"email":"abc@ora.com"
}
-
Type:
stringRequired:trueSpecifies email id of a customer. - firstName
-
Type:
stringRequired:trueSpecifies first name of a customer. - lastName
-
Type:
stringRequired:trueSpecifies last name of a customer. - login
-
Type:
stringLogin id to be used.Defaults for email if not passed. - receiveEmail
-
Type:
stringRequired:trueIndicates whether the customer should receive marketing emails on the current site. Can be yes or no.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createProfile_response
- id
-
Type:
stringThe customer profile id.
Example application/json
{
"id":"110026"
}
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|
|------------------|------------------|
|22003|If the email passed is null or empty|
|22004|If there was any internal error while creating the profile|
|22005|If the password passed is null or empty|
|22024|{0}({1}) must be a String|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAn optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"dynamicPropertyMaritalStatus": "Married",
"firstName": "kim",
"lastName": "anderson",
"password": "kim1234",
"gender": "female",
"receiveEmail": "yes",
"dateOfBirth": "",
"email": "kim@gmail.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:
{"id": "110026"}