updateMember
put
/ccagent/v1/organizationMembers/{id}
Update Member. This operation is used to update customer name, email, role, status and dynamic properties of a customer profile. 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.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The ID of the shopper profile to be updated.
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 : updateMember_request{ "firstName":"Leota", "lastName":"Dilliard", "roles":[ { "function":"admin" }, { "function":"buyer" } ], "active":true, "receiveEmail":"yes", "email":"leota@example.com", "Age":28, "Nickname":"Leota" }
- active
-
Type:
boolean
The status of the profile. Should be true or false - dynamicProperty
-
Type:
object
dynamicPropertyDynamic property name and value. -
Type:
string
The email address of the profile - firstName
-
Type:
string
The first name of the profile - lastName
-
Type:
string
The last name of the profile - receiveEmail
-
Type:
string
This is email marketing flag. can be yes or no - roles
-
Type:
array
rolesList of roles need to associate with the user
Nested Schema : dynamicPropertyType:object
Dynamic property name and value.Nested Schema : rolesNested Schema : itemsType:object
- function
-
Type:
string
Required:true
The function of the role which can be admin or buyer.
Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : updateMember_response- active
-
Type:
boolean
This is active status of the profile should be true or false. - dynamicProperties
-
Type:
array
dynamicPropertiesList of dynamic properties associated with profile along with meta-data. -
Type:
string
The email address of the profile. - firstName
-
Type:
string
The first name of the profile. - id
-
Type:
string
The ID of the shopper profile. - lastName
-
Type:
string
The last name of the profile. - locale
-
Type:
string
The locale of the request/response. - orderPriceLimit
-
Type:
string
The order pricelimit for the organization - parentOrganization
-
Type:
object
parentOrganizationThis 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:
string
This attribute is added for account-based commerce, It's value is 'b2b_user'. - receiveEmail
-
Type:
string
This is an email marketing flag which indicates to notify user by mail or not, can be yes or no. - repositoryId
-
Type:
string
The repository id of the profile. - roles
-
Type:
array
rolesList of user roles - secondaryOrganizations
-
Type:
object
secondaryOrganizationsThis 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 : dynamicPropertiesNested Schema : parentOrganizationType: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- active
-
Type:
boolean
This is active status of the profile should be true or false. - billingAddress
-
Type:
object
billingAddressDefault billing address of the organization - description
-
Type:
string
Description of the Organization - id
-
Type:
string
The id of the parent organization - name
-
Type:
string
The name of the parent organization - repositoryId
-
Type:
string
The id of the parent organization - shippingAddress
-
Type:
object
shippingAddressDefault shipping address of the organization
Nested Schema : secondaryOrganizationsType: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- active
-
Type:
boolean
This is active status of the profile should be true or false. - approvalRequired
-
Type:
boolean
The value if approval is needed for that organization - billingAddress
-
Type:
object
billingAddressDefault billing address of the organization - description
-
Type:
string
Description of the Organization - id
-
Type:
string
The id of the parent organization - name
-
Type:
string
The name of the parent organization - repositoryId
-
Type:
string
The id of the parent organization - shippingAddress
-
Type:
object
shippingAddressDefault shipping address of the organization
Nested Schema : itemsType:object
- default
-
Type:
boolean
default value of the property - id
-
Type:
string
The ID of the dynamic property. - label
-
Type:
string
UI label for the dynamic property. - length
-
Type:
integer
length of type supported. - required
-
Type:
boolean
If this is a required property. - type
-
Type:
string
The type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string. - uiEditorType
-
Type:
string
The UI editor type - value
-
Type:
string
The value of the dynamic property.
Nested Schema : billingAddressType:object
Default billing address of the organization- repositoryId
-
Type:
string
The id of the billing address
Nested Schema : shippingAddressType:object
Default shipping address of the organization- repositoryId
-
Type:
string
The id of the shipping address
Nested Schema : itemsType:object
- function
-
Type:
string
The function of the role which can be admin or buyer. - repositoryId
-
Type:
string
The repository id of the role.
Nested Schema : billingAddressType:object
Default billing address of the organization- repositoryId
-
Type:
string
The id of the billing address
Nested Schema : shippingAddressType:object
Default shipping address of the organization- repositoryId
-
Type:
string
The id of the shipping address
Example application/json
{ "lastName":"Blooming", "dynamicProperties":[ ], "roles":[ { "function":"admin", "relativeTo":"or-100001", "repositoryId":"100001" }, { "function":"buyer", "relativeTo":"or-100001", "repositoryId":"100002" }, { "function":"buyer", "relativeTo":"or-100002", "repositoryId":"100004" } ], "receiveEmail":"yes", "active":true, "locale":"en", "parentOrganization":{ "approvalRequired":true, "repositoryId":"or-100001", "name":"National Discount Auto Parts", "active":true, "description":null, "shippingAddress":{ "repositoryId":"ci-110024" }, "secondaryAddresses":{ "Address2":{ "repositoryId":"ci-110024" }, "Address1":{ "repositoryId":"ci-110023" } }, "billingAddress":{ "repositoryId":"ci-110024" }, "id":"or-100001", "orderPriceLimit":50 }, "orderPriceLimit":50, "firstName":"Ron", "profileType":"b2b_user", "repositoryId":"bb-110023", "links":[ { "rel":"self", "href":"ccagent/v1/organizationMembers/bb-110023" } ], "id":"bb-110023", "secondaryOrganizations":[ { "approvalRequired":false, "repositoryId":"or-100002", "name":"US Motor Works, Inc.", "active":true, "description":"US Motor Works, Inc.", "shippingAddress":{ "repositoryId":"ci-110029" }, "secondaryAddresses":{ "Address1":{ "repositoryId":"ci-110029" } }, "billingAddress":{ "repositoryId":"ci-110029" }, "id":"or-100002", "orderPriceLimit":null } ], "email":"ron@example.com" }
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| |------------------|------------------| |22000|If the profile id passed is null or empty| |23012|If no last name is specified| |22001|If there was any internal error while getting the profile| |23013|If no first name is specified| |22002|If there was no profile found with the given id| |82005000|If there is an error while processing the AgentContext header. Possible reasons include invalid profileId, incorrect JSON format or other errors| |200019|If an account already exists for the given email address| |23006|If invalid email address is specified| |22007|If the profile id passed is not associated to the account of the profile id passed in the AgentContext header| |22010|If the profile id passed is not associated to the account of the profileId passed in the AgentContext header.| |89103|If no shopperProfileId is passed in the AgentContext header| |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
errorsAn 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": 28, "Nickname": "Leota" }
Sample Response Payload returned by endpoint:
{ "lastName": "Blooming", "dynamicProperties": [], "roles": [ { "function": "admin", "relativeTo": "or-100001", "repositoryId": "100001" }, { "function": "buyer", "relativeTo": "or-100001", "repositoryId": "100002" }, { "function": "buyer", "relativeTo": "or-100002", "repositoryId": "100004" } ], "receiveEmail": "yes", "active": true, "locale": "en", "parentOrganization": { "approvalRequired": true, "repositoryId": "or-100001", "name": "National Discount Auto Parts", "active": true, "description": null, "shippingAddress": {"repositoryId": "ci-110024"}, "secondaryAddresses": { "Address2": {"repositoryId": "ci-110024"}, "Address1": {"repositoryId": "ci-110023"} }, "billingAddress": {"repositoryId": "ci-110024"}, "id": "or-100001", "orderPriceLimit": 50 }, "orderPriceLimit": 50, "firstName": "Ron", "profileType": "b2b_user", "repositoryId": "bb-110023", "links": [{ "rel": "self", "href": "ccagent/v1/organizationMembers/bb-110023" }], "id": "bb-110023", "secondaryOrganizations": [{ "approvalRequired": false, "repositoryId": "or-100002", "name": "US Motor Works, Inc.", "active": true, "description": "US Motor Works, Inc.", "shippingAddress": {"repositoryId": "ci-110029"}, "secondaryAddresses": {"Address1": {"repositoryId": "ci-110029"}}, "billingAddress": {"repositoryId": "ci-110029"}, "id": "or-100002", "orderPriceLimit": null }], "email": "ron@example.com" }