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":"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"
}
]
}
- dateOfBirth
-
Type:
string
The date of birth of the profile user. -
Type:
string
Required:true
The email address of the profile. - firstName
-
Type:
string
Required:true
The first name of the profile. - gender
-
Type:
string
The gender of the profile user. - lastName
-
Type:
string
Required:true
The last name of the profile. - password
-
Type:
string
Required:true
The password of the profile. - receiveEmail
-
Type:
string
Required:true
The string representation of whether the user wants to receive email or not. - shippingAddress
-
Type:
object
shippingAddressAdditional Properties Allowed:Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead). - shippingAddresses
-
Type:
array
shippingAddressesAdditional Properties Allowed:List of shipping addresses associated with profile.
Nested Schema : shippingAddress
Type:
object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
- address1
-
Type:
string
Required:true
The address line 1 of the shipping address. - address2
-
Type:
string
The address line 2 of the shipping address. - address3
-
Type:
string
The address line 3 of the shipping address. - alias
-
Type:
string
The alias of the shipping address. - companyName
-
Type:
string
The company name of the shipping address. - country
-
Type:
string
Required:true
The country code of the shipping address. - county
-
Type:
string
The county of the shipping address. - firstName
-
Type:
string
Required:true
The first name of the shipping address. - lastName
-
Type:
string
Required:true
The last name of the shipping address. - phoneNumber
-
Type:
string
The phone Number of the shipping address. - postalCode
-
Type:
string
Required:true
The postal Code of the shipping address. - prefix
-
Type:
string
The prefix of the shipping address. - repositoryId
-
Type:
string
The repository ID of the shipping address. - selectedCountry
-
Type:
string
The country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country. - selectedState
-
Type:
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
-
Type:
string
Required:true
The state code of the shipping address. - state_ISOCode
-
Type:
string
The state ISO alpha-4 code of the shipping address.
Nested Schema : shippingAddresses
Nested Schema : items
Type:
object
- address1
-
Type:
string
Required:true
The address line 1 of the shipping address. - address2
-
Type:
string
The address line 2 of the shipping address. - address3
-
Type:
string
The address line 3 of the shipping address. - alias
-
Type:
string
The alias of the shipping address. - city
-
Type:
string
Required:true
The city of the shipping address. - companyName
-
Type:
string
The company name of the shipping address. - country
-
Type:
string
Required:true
The country code of the shipping address. - county
-
Type:
string
The county of the shipping address. - firstName
-
Type:
string
Required:true
the first name of the shipping address. - isDefaultAddress
-
Type:
boolean
Whether to store this address in the default shipping address slot. - lastName
-
Type:
string
Required:true
The last name of the shipping address. - phoneNumber
-
Type:
string
The phone Number of the shipping address. - postalCode
-
Type:
string
Required:true
The postal Code of the shipping address. - prefix
-
Type:
string
The prefix of the shipping address. - repositoryId
-
Type:
string
The repository ID of the shipping address. - selectedCountry
-
Type:
string
The country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country. - selectedState
-
Type:
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
-
Type:
string
Required:true
The state code of the shipping address. - state_ISOCode
-
Type:
string
The state ISO alpha-4 code of the shipping address.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createProfile_response
- id
-
Type:
string
The ID of the profile to retrieve.
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
errorsAdditional Properties Allowed:An 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" }