createProfile
post
/ccappagent/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: string
the site id corresponding to which site specific properties should be set
Root Schema : createProfile_request
Type:
Show Source
object
-
dynamicProperty:
object dynamicProperty
Dynamic property name and value.
-
email(required):
string
Specifies email id of a customer.
-
firstName(required):
string
Specifies first name of a customer.
-
GDPRProfileP13nConsentGranted:
boolean
Indicates whether the customer has given consent for his/her profile information to be used for personalization purposes. Can be true or false.
-
lastName(required):
string
Specifies last name of a customer.
-
login:
string
Login id to be used.Defaults for email if not passed.
-
receiveEmail(required):
string
Indicates whether the customer should receive marketing emails on the current site. Can be yes or no.
-
shippingAddresses:
object shippingAddresses
Shipping address of the profile.
Example:
{
"dynamicPropertyMaritalStatus":"Single",
"firstName":"Pratiksha",
"lastName":"Oracle123",
"GDPRProfileP13nConsentGranted":true,
"receiveEmail":"yes",
"email":"abc@example.com"
}
Nested Schema : dynamicProperty
Type:
object
Dynamic property name and value.
Nested Schema : shippingAddresses
Type:
object
Shipping address of the profile.
Show Source
-
address1:
string
The address1 of the shipping address.
-
address2:
string
The address2 of the shipping address.
-
address3:
string
The address line 3 in the shipping address.
-
city:
string
The city of the shipping address.
-
country:
string
The country of the shipping address.
-
county:
string
The county of the shipping address.
-
firstName:
string
The first name of the shipping address.
-
isDefaultAddress:
boolean
Indicates if its the default 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.
-
state:
string
The state of the shipping address.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
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:
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