Update Account’s Segment
The UpdateAccountSegment
API in OCS.io facilitates the modification of an account’s segment, allowing for customization to address specific operational needs.
Please note that attributes are not versioned, meaning that when you update account information, the new values take effect immediately. This change does not impact previously processed data. |
API Overview
Fields Required for Updating Account’s Segment
The following table lists and describes the fields required to update an account’s segment through the UpdateAccountSegment
API:
Field | Description |
---|---|
account |
ID (Ref ID / External ID) of the Account. |
accountSegment |
New Segment of the Account. Account Segment must be configured. |
Detailed API documentation and endpoint specifics are available here. |
Request Validations
The following validations are performed when updating an account’s segment:
-
Account must be provided in the request, it must be already created in the system and must not be in Deactivated State.
-
Account Segment must be provided in the request, it must be configured in the system.
Update Account’s Segment Example
Use the following request’s body to update an account’s segment:
{
"requestId": "{{$guid}}",
"account": {
"externalId": "account_external_id"
},
"accountSegment": "new_account_segment_code"
}
The outcome of the API call is as follows:
-
The segment of the account with external ID
account_external_id
is updated to configured segment with codenew_account_segment_code
.