updateMember
put
/ccstore/v1/organizationMembers/{id}
Update Member. This operation is used to 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
-
Type:
stringRequired:trueThe ID of the shopper profile to be updated.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request- X-CCOrganization
Type:stringCurrent organization context of the logged in user
Body Parameter
Root Schema : updateMember_request
{
"dynamicProperty":"dynamicProperty value",
"firstName":"kim",
"lastName":"Anderson",
"roles":[
{
"function":"buyer"
}
],
"receiveEmail":"yes",
"active":true,
"email":"kim@example.com",
"daytimeTelephoneNumber":"212-555-1977"
}
- active
-
Type:
booleanthe status of the profile. Should be true or false -
Type:
stringthe email address of the profile - firstName
-
Type:
stringRequired:truethe first name of the profile - lastName
-
Type:
stringthe last name of the profile - receiveEmail
-
Type:
stringthis is email marketing flag. can be yes or no - roles
-
Type:
objectrolesAdditional Properties Allowed:List of role's function that need to associate with the user
Nested Schema : roles
Type:
objectList of role's function that need to associate with the user
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateMember_response
- active
-
Type:
booleanThis is active status of the profile should be true or false. -
Type:
stringthe email address of the profile - firstName
-
Type:
stringthe first name of the profile - id
-
Type:
stringget the shopper profile with id - lastName
-
Type:
stringthe last name of the profile - locale
-
Type:
stringthe locale of the request/response - parentOrganization
-
Type:
objectparentOrganizationAdditional Properties Allowed: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
-
Type:
stringThis attribute is added for account-based commerce, It's value is 'b2b_user' - receiveEmail
-
Type:
stringthis is email marketing flag. can be yes or no - repositoryId
-
Type:
stringthe id of the profile - roles
-
Type:
arrayrolesAdditional Properties Allowed:List of user roles
Nested Schema : parentOrganization
Type:
objectThis 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
- active
-
Type:
booleanthe status of the parent organization. Should be true or false - billingAddress
-
Type:
objectbillingAddressAdditional Properties Allowed:Default billing address of the organization - description
-
Type:
stringDescription of the Organization - id
-
Type:
stringthe id of the parent organization - name
-
Type:
stringthe name of the parent organization - repositoryId
-
Type:
stringthe id of the parent organization - secondaryAddresses
-
Type:
objectsecondaryAddressesAdditional Properties Allowed:List of shipping addresses associated with the profile. - shippingAddress
-
Type:
objectshippingAddressAdditional Properties Allowed:Default shipping address of the organization
Nested Schema : roles
Nested Schema : billingAddress
Type:
objectDefault billing address of the organization
- repositoryId
-
Type:
stringthe id of the billing address
Nested Schema : secondaryAddresses
Type:
objectList of shipping addresses associated with the profile.
- AddressType
-
Type:
objectAddressTypeAdditional Properties Allowed:Address type represents nick-name of address.
Nested Schema : shippingAddress
Type:
objectDefault shipping address of the organization
- repositoryId
-
Type:
stringthe id of the shipping address
Nested Schema : AddressType
Type:
objectAddress type represents nick-name of address.
- repositoryId
-
Type:
stringRepository ID of the shipping address
Nested Schema : items
Type:
object- function
-
Type:
stringthe function of the role - repositoryId
-
Type:
stringthe repository id of the role
Example application/json
{
"lastName":"K",
"roles":[
{
"function":"buyer",
"repositoryId":"100006"
}
],
"receiveEmail":"yes",
"active":"true",
"parentOrganization":{
"name":"Oracle",
"repositoryId":"100001",
"description":"Oracle Org",
"active":true,
"shippingAddress":{
},
"secondaryAddresses":{
"Address1":{
"repositoryId":"110033"
}
},
"id":"100001",
"billingAddress":{
}
},
"locale":"en",
"dynamicProperty":"dynamicProperty value",
"firstName":"bcd",
"profileType":"b2b_user",
"repositoryId":"110006",
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstore/v1/organizationMembers/110006?offset=0&limit=2&sort=firstName%3Adesc"
}
],
"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|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"dynamicProperty": "dynamicProperty value",
"firstName": "kim",
"lastName": "Anderson",
"roles": [{"function": "buyer"}],
"receiveEmail": "yes",
"active": true,
"email": "kim@example.com",
"daytimeTelephoneNumber": "212-555-1977"
}
Sample Response Payload returned by endpoint:
{
"lastName": "K",
"roles": [{
"function": "buyer",
"repositoryId": "100006"
}],
"receiveEmail": "yes",
"active": "true",
"parentOrganization": {
"name": "Oracle",
"repositoryId": "100001",
"description": "Oracle Org",
"active": true,
"shippingAddress": {},
"secondaryAddresses": {"Address1": {"repositoryId": "110033"}},
"id": "100001",
"billingAddress": {}
},
"locale": "en",
"dynamicProperty": "dynamicProperty value",
"firstName": "bcd",
"profileType": "b2b_user",
"repositoryId": "110006",
"links": [{
"rel": "self",
"href": "http://localhost:8080/ccstore/v1/organizationMembers/110006?offset=0&limit=2&sort=firstName%3Adesc"
}],
"id": "110006",
"email": "abc@abc.com"
}