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(optional): string
The asset language of the request
Root Schema : createProfile_request
Type:
Show Source
object
-
active:
boolean
the status of the profile. Should be true or false
-
creditCards(optional):
array creditCards
List of user credit cards.
-
customerContactId(optional):
string
The external customer contact id.
-
dateOfBirth(optional):
string
The date of birth of the profile user.
-
daytimeTelephoneNumber(optional):
string
the phone Number of the profile
-
dynamicInternalOnlyProperty(optional):
object dynamicInternalOnlyProperty
the value of the internal only dynamic property
-
dynamicProperty(optional):
object dynamicProperty
the value of the dynamic property
-
email:
string
the email address of the profile
-
firstName:
string
the first name of the profile
-
GDPRProfileP13nConsentGranted:
boolean
If user has given consent for his/her profile information to be used for personalization purposes.
-
gender(optional):
string
The gender of the profile user.
-
lastName:
string
the last name of the profile
-
login(optional):
string
Login id to be used.Defaults for email if not passed.
-
loyaltyPrograms(optional):
array loyaltyPrograms
Loyalty Programs Information
-
parentOrganization(optional):
string
This attribute is added for 'Account Based Commerce', this is required only in case of 'Account Based Commerce', this is the id of organization to which user is associated
-
profileType(optional):
string
This attribute is added for account based commerce. It's value is 'b2b_user'
-
receiveEmail:
string
the string representation of whether the user wants to receive site specific email or not, it should be 'yes' or 'no'
-
roles(optional):
array roles
List of roles to associate with the user.
-
shippingAddress(optional):
object profile_shippingAddress
Default shipping address of the profile (Deprecated, please use ???shippingAddresses??? instead).
-
shippingAddresses(optional):
array shippingAddresses
List of shipping addresses associated with profile.
Example:
{
"lastName":"K",
"GDPRProfileP13nConsentGranted":false,
"customerContactId":"CRMID_12345",
"gender":"female",
"roles":[
{
"function":"buyer",
"relativeTo":{
"id":"900004"
},
"repositoryId":"1000002",
"type":"organizationalRole"
},
{
"function":"custom",
"relativeTo":{
"id":"900004"
},
"repositoryId":"customOrganizationalRole",
"type":"organizationalRole"
}
],
"receiveEmail":"no",
"active":true,
"dateOfBirth":null,
"parentOrganization":"900004",
"firstName":"bcd",
"profileType":"b2b_user",
"loyaltyPrograms":[
{
"programName":"XTRAREWARDS",
"membershipId":"abc123",
"programId":"prog1",
"status":"Enrolled"
},
{
"programName":"XTRAREWARDS",
"membershipId":"xyz123",
"programId":"prog2",
"status":"RequestForEnrollment"
}
],
"shippingAddress":{
},
"email":"bcd@example.com",
"daytimeTelephoneNumber":"212-555-1977",
"shippingAddresses":[
]
}
Nested Schema : dynamicInternalOnlyProperty
Type:
object
the value of the internal only dynamic property
Nested Schema : dynamicProperty
Type:
object
the value of the dynamic property
Nested Schema : profile_shippingAddress
Type:
object
Default shipping address of the profile (Deprecated, please use ???shippingAddresses??? instead).
Show Source
-
address1(optional):
string
The address1 of the shipping address
-
address2(optional):
string
The address2 of the shipping address
-
address3(optional):
string
The address3 of the shipping address
-
city(optional):
string
The city of the shipping address
-
country(optional):
string
The country of the shipping address
-
county(optional):
string
The county of the shipping address
-
externalAddressId(optional):
string
External address id
-
firstName(optional):
string
The first name of the shipping address
-
lastName(optional):
string
The last name of the shipping address
-
phoneNumber(optional):
string
The phone Number of the shipping address
-
postalCode(optional):
string
The postal Code of the shipping address
-
repositoryId(optional):
string
The id of the shipping address
-
state(optional):
string
The state of the shipping address
-
types(optional):
array types
The types tagged to the address
Nested Schema : shippingAddresses
Type:
array
List of shipping addresses associated with profile.
Show Source
-
Array of:
object profile_shippingAddress_request
Shipping address associated with the profile
Nested Schema : items
Type:
Show Source
object
-
billingAddress(optional):
object billingAddress
Default billing address of the profile
-
cardProps(optional):
object cardProps
-
cardSavedDate(optional):
string
Saved date of the credit card.
-
creditCardNumber(optional):
string
Number of the credit card, required property.
-
creditCardType(optional):
string
Type of the credit card.
-
expirationDayOfMonth(optional):
string
Expiration day of the credit card.
-
expirationMonth(optional):
string
Expiration month of the credit card, required property.
-
expirationYear(optional):
string
Expiration year of the credit card, required property.
-
gatewayConfigId(optional):
string
Gateway configId for the credit card, required property.
-
id(optional):
string
Id of the credit card.
-
iin(optional):
string
iin value of the credit card, required property.
-
nameOnCard(optional):
string
Name on the credit card, required property.
-
nickname(optional):
string
Nick name of the credit card.
-
source(optional):
string
Source information of the credit card.
-
token(optional):
string
Token of the credit card, required property.
-
tokenCreatedDate(optional):
string
Creation date of the token.
-
tokenExpiryDate(optional):
string
Expiry date of the token.
Nested Schema : billingAddress
Type:
object
Default billing address of the profile
Show Source
-
address1(optional):
string
the address1 of the billing address
-
address2(optional):
string
the address2 of the billing address
-
city(optional):
string
the city of the billing address
-
country(optional):
string
the country of the billing address
-
county(optional):
string
the county of the billing address
-
externalAddressId(optional):
string
External address id
-
firstName(optional):
string
the first name of the billing address
-
lastName(optional):
string
the last name of the billing address
-
phoneNumber(optional):
string
the phone Number of the billing address
-
postalCode(optional):
string
the postal Code of the billing address
-
repositoryId(optional):
string
the id of the billing address
-
state(optional):
string
the state of the billing address
-
types(optional):
array types
The types tagged to the address
Nested Schema : cardProps
Type:
object
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
repository Id of the address type
Nested Schema : items
Type:
Show Source
object
-
membershipId(optional):
string
membershipId of the profile for the program. If it is null then it implies profile has unregistered from the program or he is not part of the program because of some other reason.
-
programId:
string
programId of Loyalty Program
-
programName:
string
programName of Loyalty Program
-
status:
string
status of Enrollment. It must be in any of 'RequestForEnrollment', 'Enrolled', 'RequestForUnenrollment', 'Unenrolled', 'Failed' states
Nested Schema : items
Type:
Show Source
object
-
function(optional):
string
For an organizational role, function of the role to be assigned. Not allowed if type is role.
-
relativeTo(optional):
object relativeTo
If not provided, the profile's parent organization will be used. Not allowed if type is role.
-
repositoryId(optional):
string
Repository ID of the role to be assigned. Required for type role and for type organizationalRole if function is custom. Ignored if function is anything other than custom and type is organizationalRole
-
type(optional):
string
Type of the role which can be organizationalRole or role. If omitted, organizationalRole is assumed.
Nested Schema : relativeTo
Type:
object
If not provided, the profile's parent organization will be used. Not allowed if type is role.
Show Source
-
id(optional):
string
Organization ID of the role to be assigned
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
repository Id of the address type
Nested Schema : profile_shippingAddress_request
Type:
object
Shipping address associated with the profile
Show Source
-
address1(optional):
string
The address1 of the shipping address
-
address2(optional):
string
The address2 of the shipping address
-
address3(optional):
string
The address3 of the shipping address
-
city(optional):
string
The city of the shipping address
-
country(optional):
string
The country of the shipping address
-
county(optional):
string
The county of the shipping address
-
externalAddressId(optional):
string
External address id
-
firstName(optional):
string
The first name of the shipping address
-
isDefaultAddress(optional):
boolean
Whether to store this address in the default shipping address slot.
-
lastName(optional):
string
The last name of the shipping address
-
phoneNumber(optional):
string
The phone number of the shipping address
-
postalCode(optional):
string
The postal code of the shipping address
-
repositoryId(optional):
string
The id of the shipping address
-
state(optional):
string
The state of the shipping address
-
types(optional):
array types
The types tagged to the address
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
repository Id of the address type
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : createProfile_response
Type:
Show Source
object
-
id(optional):
string
Repository id of the profile
Example Response (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|
|100200|Invalid profile type passed.|
|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.|
|180106|One or more address type ID is invalid|
|13001|If role function is given as 'custom' but no repositoryId is given|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
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(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code