removeContacts
post
/ccagent/v1/organizations/removeContacts
Remove Contacts. This operation is used to remove a contact from the organization by delegatedAdmin. The delegated Admin cannot remove the contact if the contact is the last approval in the organization.
This endPoint accepts the organization Id in the header. If the organization Id is passed in the header, that organization becomes the current context for delegated Admin. Optionally 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
Header Parameters
- X-CCAgentContext
-
Type:
stringRequired:trueThe Agent Context is a JSON object with shopperProfileId as a property.- X-CCOrganization
Type:stringthe organization Id to which delegated Admin Belongs to
Body Parameter
Root Schema : removeContacts_request
POST{"members":["bb-110014"]}
- members
-
Type:
arraymembersRequired:trueAdditional Properties Allowed:profileId of member to be removed from organization
Nested Schema : members
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : removeContacts_response
Example application/json
{
"links":[
{
"rel":"self",
"href":"/ccagentui/v1/organizations/removeContacts"
}
],
"element":true
}
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|
|------------------|------------------|
|1002019|Due to user type mismatch, cannot unassign user id from Organization|
|23042|You cannot remove yourself from this account|
|100020|Invalid Input|
|89102|If the shopperProfile passed in the AgentContext header or the associated account is inactive|
|22007|please provide valid input|
|100019|Internal Error|
|100000|If input passed is invalid|
|100001|If there was no organization found with the given id|
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:
POST{"members":["bb-110014"]}
Sample Response Payload returned by endpoint:
{
"links": [{
"rel": "self",
"href": "/ccagentui/v1/organizations/removeContacts"
}],
"element": true
}