createMember
post
/ccagent/v1/organizationMembers
Create Member. This operation is used to create a profile in Oracle Commerce Cloud for a customer. Takes X-CCAgentContext header which is a JSON object with 'shopperProfileId' as a property. If 'shopperProfileId' is not provided, it is considered as an anonymous profile. Also it takes X-CCOrganization header which is a JSON field with organization ID as value. If this header is not provided, then the endPoint will consider first active organization as the current organization. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Header Parameters
- X-CCAgentContext
-
Type:
string
Required:true
The Agent Context is a JSON object with shopperProfileId as a property.- X-CCAsset-Language
Type:string
The asset language of the request- X-CCOrganization
Type:string
The organization Id associated with the shopper profile- X-CCSite
Type:string
The site Id to update the site specific shopper profile propertiesBody ParameterRoot Schema : createMember_request{ "dynamicProperty":"dynamicProperty value", "firstName":"bcd", "lastName":"K", "roles":[ { "function":"buyer" } ], "receiveEmail":"yes", "active":true, "email":"bcd@abc.com" }
- active
-
Type:
boolean
Required:true
This is active status of the profile should be true or false. -
Type:
string
Required:true
the email address of the profile - firstName
-
Type:
string
Required:true
the first name of the profile - lastName
-
Type:
string
Required:true
the last name of the profile - receiveEmail
-
Type:
string
Required:true
the string representation of whether the user wants to recieve email or not, it should be 'yes' or 'no' - roles
-
Type:
object
rolesAdditional Properties Allowed:List of role's function that need to associate with the user
Nested Schema : rolesType:object
List of role's function that need to associate with the userResponse
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : createMember_response- id
-
Type:
string
Repository id of the profile
Example application/json
{ "links":[ { "rel":"self", "href":"ccagent/v1/organizationMembers" } ], "id":"250012" }
Default ResponseThe 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| |------------------|------------------| |22010|If the profile id passed is not associated to the account of the profileId passed in the AgentContext header.| |23012|If no last name is specified| |23013|If no first name is specified| |82005000|If there is an error while processing the AgentContext header. Possible reasons include invalid profileId, incorrect JSON format or other errors| |22003|If the email passed is null or empty| |200019|If an account already exists for the given email address| |22004|If there was any internal error while creating the profile| |89103|If no shopperProfileId is passed in the AgentContext header| |23006|If invalid email address is specified| |89102|If the shopperProfile passed in the AgentContext header or the associated account is inactive| |89101|If the shopperProfile passed in the AgentContext header is not an administrator for the account|BodyRoot Schema : errorModelType: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 : errorsNested Schema : itemsType: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:
{ "firstName": "Leota", "lastName": "Dilliard", "roles": [ {"function": "admin"}, {"function": "buyer"} ], "active": true, "receiveEmail": "yes", "email": "leota@example.com", "Age": 30, "Nickname": "Leota" }
Sample Response Payload returned by endpoint:
{ "links": [{ "rel": "self", "href": "ccagent/v1/organizationMembers" }], "id": "250012" }