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
Header Parameters
Body ()
Root Schema : createProfile_request
Type: object
Show Source
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 : creditCards
Type: array
List of user credit cards.
Show Source
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 : loyaltyPrograms
Type: array
Loyalty Programs Information
Show Source
Nested Schema : roles
Type: array
List of roles to associate with the user.
Show Source
Nested Schema : profile_shippingAddress
Type: object
Default shipping address of the profile (Deprecated, please use ???shippingAddresses??? instead).
Show Source
Nested Schema : shippingAddresses
Type: array
List of shipping addresses associated with profile.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : billingAddress
Type: object
Default billing address of the profile
Show Source
Nested Schema : cardProps
Type: object
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
  • 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 of Loyalty Program
  • programName of Loyalty Program
  • status of Enrollment. It must be in any of 'RequestForEnrollment', 'Enrolled', 'RequestForUnenrollment', 'Unenrolled', 'Failed' states
Nested Schema : items
Type: object
Show Source
  • For an organizational role, function of the role to be assigned. Not allowed if type is role.
  • relativeTo
    If not provided, the profile's parent organization will be used. Not allowed if type is role.
  • 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 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
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : profile_shippingAddress_request
Type: object
Shipping address associated with the profile
Show Source
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createProfile_response
Type: object
Show Source
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|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top