Modifying and deleting regions
Modifying regions
Modifying regions is limited to changing a region's name (and localized value, if enabled). For tasks such as associating a region with users or groups, those are done with POST requests. For tasks such as deleting the association of a region with users or groups, those are done with DELETE requests.
Use the following endpoint to modify a region:
- PATCH
/admin/v1/regions/{regionId}
For example, the following request renames the Western Part of
Mid-west region (ID of demo_sample:4) in ClaimCenter
to Western Midwest.
Command
PATCH /admin/v1/regions/demo_sample:4
Request
{
"data": {
"attributes": {
"name": "Western Midwest"
}
}
}
Response
{
"data": {
"attributes": {
"id": "demo_sample:4",
"name": "Western Midwest"
},
...
Deleting regions
Use the following endpoint to remove a region:
- DELETE
/admin/v1/regions/{regionId}
For example, the following request deletes the region with the id of
ab:SIc4T-dETn6wGG-r0d40P in ContactManager.
Command
DELETE /admin/v1/regions/ab:SIc4T-dETn6wGG-r0d40P
<no request body>
- DELETE
/admin/v1/groups/{groupId}/regions/{groupRegionId} - DELETE
/admin/v1/users/{userId}/regions/{userRegionId}