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
-
Type:
string
the site id corresponding to which site specific properties should be set
Body Parameter
Root Schema : createProfile_request
{
"dynamicPropertyMaritalStatus":"Single",
"firstName":"Pratiksha",
"lastName":"Oracle123",
"receiveEmail":"no",
"email":"abc@ora.com"
}
-
Type:
string
Required:true
Specifies email id of a customer. - firstName
-
Type:
string
Required:true
Specifies first name of a customer. - lastName
-
Type:
string
Required:true
Specifies last name of a customer. - login
-
Type:
string
Login id to be used.Defaults for email if not passed. - receiveEmail
-
Type:
string
Required:true
Indicates 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:
string
The customer profile id.
Example 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|An account already exists for this email address. Please enter a different email address.|
|22004|An internal error occurred while processing input request.|
|23006|Invalid email address specified|
|22024|{0}({1}) must be a String|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAn optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{ "dynamicPropertyMaritalStatus": "Single", "firstName": "Pratiksha", "lastName": "Oracle123", "receiveEmail": "no", "email": "abc@ora.com" }
Sample Response Payload returned by endpoint:
{ "links": [{ "rel": "self", "href": "http://localhost:9080/ccagent/v1/profiles" }], "id": "428738" }