createProfile
post
/ccadmin/v1/profiles
Create Profile. This operation is used to create a profile in Oracle Commerce Cloud for a customer. Optionally takes the x-ccasset-language header to get translated content in another language.
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":"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:
stringThe date of birth of the profile user. -
Type:
stringRequired:trueThe email address of the profile. - firstName
-
Type:
stringRequired:trueThe first name of the profile. - gender
-
Type:
stringThe gender of the profile user. - lastName
-
Type:
stringRequired:trueThe last name of the profile. - password
-
Type:
stringRequired:trueThe password of the profile. - receiveEmail
-
Type:
stringRequired:trueThe string representation of whether the user wants to receive email or not. - shippingAddress
-
Type:
objectshippingAddressAdditional Properties Allowed:Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead). - shippingAddresses
-
Type:
arrayshippingAddressesAdditional Properties Allowed:List of shipping addresses associated with profile.
Nested Schema : shippingAddress
Type:
objectDefault shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
- address1
-
Type:
stringRequired:trueThe address line 1 of the shipping address. - address2
-
Type:
stringThe address line 2 of the shipping address. - address3
-
Type:
stringThe address line 3 of the shipping address. - alias
-
Type:
stringThe alias of the shipping address. - companyName
-
Type:
stringThe company name of the shipping address. - country
-
Type:
stringRequired:trueThe country code of the shipping address. - county
-
Type:
stringThe county of the shipping address. - firstName
-
Type:
stringRequired:trueThe first name of the shipping address. - lastName
-
Type:
stringRequired:trueThe last name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringRequired:trueThe postal Code of the shipping address. - prefix
-
Type:
stringThe prefix of the shipping address. - repositoryId
-
Type:
stringThe repository ID of the shipping address. - selectedCountry
-
Type:
stringThe country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country. - selectedState
-
Type:
stringThe state ISO alpha-2 code of the shipping address. If selectedState is sent in the request then it takes precedence over state. - state
-
Type:
stringRequired:trueThe state code of the shipping address. - state_ISOCode
-
Type:
stringThe state ISO alpha-4 code of the shipping address.
Nested Schema : shippingAddresses
Nested Schema : items
Type:
object- address1
-
Type:
stringRequired:trueThe address line 1 of the shipping address. - address2
-
Type:
stringThe address line 2 of the shipping address. - address3
-
Type:
stringThe address line 3 of the shipping address. - alias
-
Type:
stringThe alias of the shipping address. - city
-
Type:
stringRequired:trueThe city of the shipping address. - companyName
-
Type:
stringThe company name of the shipping address. - country
-
Type:
stringRequired:trueThe country code of the shipping address. - county
-
Type:
stringThe county of the shipping address. - firstName
-
Type:
stringRequired:truethe first name of the shipping address. - isDefaultAddress
-
Type:
booleanWhether to store this address in the default shipping address slot. - lastName
-
Type:
stringRequired:trueThe last name of the shipping address. - phoneNumber
-
Type:
stringThe phone Number of the shipping address. - postalCode
-
Type:
stringRequired:trueThe postal Code of the shipping address. - prefix
-
Type:
stringThe prefix of the shipping address. - repositoryId
-
Type:
stringThe repository ID of the shipping address. - selectedCountry
-
Type:
stringThe country code of the shipping address. If selectedCountry is sent in the request then it takes precedence over country. - selectedState
-
Type:
stringThe state ISO alpha-2 code of the shipping address. If selectedState is sent in the request then it takes precedence over state. - state
-
Type:
stringRequired:trueThe state code of the shipping address. - state_ISOCode
-
Type:
stringThe 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:
stringThe ID of the profile to retrieve.
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|
|22007|If invalid input is provided|
|89001|If invalid roles are provided|
|22024|{0}({1}) must be a String|
|22025|Format for loyaltyPrograms is incorrect. Please refer to API doc for more information|
|22026|{0} is either missing or incorrect.|
|22027|Invalid state is provided.
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:
arrayerrorsAdditional Properties Allowed:An 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:
{
"firstName": "bcd",
"lastName": "K",
"profileType": "b2b_user",
"gender": "female",
"loyaltyPrograms": [
{
"programName": "XTRAREWARDS",
"membershipId": "abc123",
"programId": "prog1",
"status": "Enrolled"
},
{
"programName": "XTRAREWARDS",
"membershipId": "xyz123",
"programId": "prog2",
"status": "RequestForEnrollment"
}
],
"roles": [{
"function": "buyer",
"relativeTo": {"id": "900004"}
}],
"receiveEmail": "yes",
"active": true,
"dateOfBirth": null,
"parentOrganization": "900004",
"email": "bcd@abc.com",
"daytimeTelephoneNumber": "212-555-1977"
}
Sample Response Payload returned by endpoint:
{"id": "110026"}