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: string
The asset language of the request
Body Parameter
Root Schema : createProfile_request
Nested Schema : shippingAddress
Type: object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Nested Schema : shippingAddresses
Type: array
List of shipping addresses associated with profile.
Nested Schema : items
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createProfile_response
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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"}