addMember
put
/ccstore/v1/organizationMembers/{id}/add
Add Member to current organization of the logged in user as well as update customer name, email, role, status of a customer profile and contact dynamic properties. Optionally takes the X-CCOrganization headers to specify current Organization id of logged in user.
Request
Supported Media Types
- application/json
Path Parameters
-
id(required): string
The ID of the shopper profile to be added to current organization of the logged in user.
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
-
X-CCOrganization: string
Current organization context of the logged in user
Root Schema : updateMember_request
Type:
Show Source
object
-
active:
boolean
The status of the profile. Should be true or false
-
dynamicProperty:
object dynamicProperty
Dynamic property name and value.
-
email:
string
The email address of the profile
-
firstName:
string
The first name of the profile
-
GDPRProfileP13nConsentGranted:
boolean
Indicates whether the customer has given consent for his/her profile information to be used for personalization purposes. Can be true or false.
-
lastName:
string
The last name of the profile
-
receiveEmail:
string
Indicates whether the customer should receive marketing emails on the current site. Can be yes or no.
-
roles:
array roles
List of roles need to associate with the user
Example:
{
"firstName":"Leota",
"lastName":"Dilliard",
"GDPRProfileP13nConsentGranted":true,
"profileType":"b2b_user",
"dynamicProperty1":"dynamicPropertyValue",
"roles":[
{
"function":"admin",
"relativeTo":{
"id":"or-100001"
}
},
{
"function":"buyer",
"relativeTo":{
"id":"or-100001"
}
}
],
"active":true,
"receiveEmail":"yes",
"email":"leota@example.com"
}
Nested Schema : dynamicProperty
Type:
object
Dynamic property name and value.
Nested Schema : items
Type:
Show Source
object
-
function(required):
string
The function of the role which can be admin or buyer.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : updateMember_response
Type:
Show Source
object
-
active:
boolean
This is active status of the profile should be true or false.
-
customerContactId:
string
The external customer contact id.
-
dynamicProperties:
array dynamicProperties
List of dynamic properties associated with profile along with meta-data.
-
email:
string
The email address of the profile.
-
firstName:
string
The first name of the profile.
-
GDPRProfileP13nConsentDate:
string
The date on which GDPR personalization consent was granted by the user.
-
GDPRProfileP13nConsentGranted:
boolean
Indicates whether the user has given GDPR Profile P13n consent on the current site. Can be true or false.
-
id:
string
The ID of the shopper profile.
-
lastName:
string
The last name of the profile.
-
locale:
string
The locale of the request/response.
-
orderPriceLimit:
string
The order pricelimit for the organization
-
parentOrganization:
object parentOrganization
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:
string
This attribute is added for account-based commerce, It's value is 'b2b_user'.
-
receiveEmail:
string
Indicates whether the customer has opted for receiving marketing emails on the current site. Can be yes or no.
-
receiveEmailDate:
string
The date on which the customer opted for receiving marketing emails.
-
repositoryId:
string
The repository id of the profile.
-
roles:
array roles
List of user roles
-
secondaryOrganizations:
object secondaryOrganizations
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
Nested Schema : dynamicProperties
Type:
array
List of dynamic properties associated with profile along with meta-data.
Show Source
Nested Schema : parentOrganization
Type:
object
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
Show Source
-
active:
boolean
This is active status of the profile should be true or false.
-
billingAddress:
object billingAddress
Default billing address of the organization
-
description:
string
Description of the Organization
-
externalOrganizationId:
string
External organization id
-
id:
string
The id of the parent organization
-
name:
string
The name of the parent organization
-
punchoutUserId:
string
Punchout user Id of organization, read only property.
-
repositoryId:
string
The id of the parent organization
-
shippingAddress:
object shippingAddress
Default shipping address of the organization
Nested Schema : secondaryOrganizations
Type:
object
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
Show Source
-
active:
boolean
This is active status of the profile should be true or false.
-
approvalRequired:
boolean
The value if approval is needed for that organization
-
billingAddress:
object billingAddress
Default billing address of the organization
-
description:
string
Description of the Organization
-
externalOrganizationId:
string
External organization id
-
id:
string
The id of the parent organization
-
name:
string
The name of the parent organization
-
repositoryId:
string
The id of the parent organization
-
shippingAddress:
object shippingAddress
Default shipping address of the organization
Nested Schema : items
Type:
Show Source
object
-
default:
boolean
default value of the property
-
id:
string
The ID of the dynamic property.
-
label:
string
UI label for the dynamic property.
-
length:
integer
length of type supported.
-
required:
boolean
If this is a required property.
-
type:
string
The type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string.
-
uiEditorType:
string
The UI editor type
-
value:
string
The value of the dynamic property.
Nested Schema : billingAddress
Type:
object
Default billing address of the organization
Show Source
-
repositoryId:
string
The id of the billing address
Nested Schema : shippingAddress
Type:
object
Default shipping address of the organization
Show Source
-
repositoryId:
string
The id of the shipping address
Nested Schema : items
Type:
Show Source
object
-
function:
string
The function of the role which can be admin or buyer.
-
repositoryId:
string
The repository id of the role.
Nested Schema : billingAddress
Type:
object
Default billing address of the organization
Show Source
-
repositoryId:
string
The id of the billing address
Nested Schema : shippingAddress
Type:
object
Default shipping address of the organization
Show Source
-
repositoryId:
string
The id of the shipping address
Example Response (application/json)
{
"lastName":"K",
"customerContactId":"CRMID_1",
"roles":[
{
"function":"buyer",
"relativeTo":{
"id":"or-100003"
},
"repositoryId":"100006"
},
{
"function":"custom",
"relativeTo":{
"id":"or-100003"
},
"repositoryId":"customOrganizationalRole"
}
],
"receiveEmail":"yes",
"active":"true",
"parentOrganization":{
"name":"Oracle",
"repositoryId":"100001",
"description":"Oracle Org",
"active":true,
"shippingAddress":{
},
"secondaryAddresses":{
"Address1":{
"repositoryId":"110033"
}
},
"id":"100001",
"billingAddress":{
},
"externalOrganizationId":"EXT_ORG_1"
},
"locale":"en",
"dynamicProperty":"dynamicProperty value",
"firstName":"bcd",
"profileType":"b2b_user",
"repositoryId":"110006",
"id":"110006",
"email":"abc@abc.com"
}
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|
|------------------|------------------|
|100088|You cannot remove the Approver role from this contact. The account has no other active Approvers. Approvals are still enabled and/or there are orders pending approval.|
|22000|If the profile id passes is null or empty|
|100089|You cannot deactivate this contact. The account has no other active Approvers. Approvals are still enabled and/or there are orders pending approval|
|22001|If there was any internal error while getting the profile|
|22002|If there was no profile found with the given id|
|22007|If the profile id passed dosent associate to the logged in user account|
|180106|One or more address type ID is invalid|
|23041|You cannot activate or inactivate this profile as it is linked to multiple accounts.|
|13001|If role function is given as 'custom' but no repositoryId is given|
|21022|An internal error occurred while processing input request.|
|21023|The user is already a member of the organization: Oracle Org. They cannot be added again.|
|21024|The Input profile 1234 cannot be added to the account: Oracle Org.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code