Create/Update User Territories
PUT {{url}}/{{tenantName}}/admin/user-territories/{{userId}}
Note: Available only if Admin Access -> User Regions is set.
Example overview
From live instance assigned region washington with territories seattle and tacoma and from stage instance assigned region california with territory los-angeles for user 20eb246e-8099-4c7c-854c-5e0f9a366ddb.
HTTP Request
Method: PUT
Endpoint: {{url}}/{{tenantName}}/admin/user-territories/{{userId}}
in our example it would be: https://api.live.welkincloud.io/gh/admin/user-territories/20eb246e-8099-4c7c-854c-5e0f9a366ddb
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| tenantName | path | Name of tenant | Yes | string |
| userId | path | User identifier | Yes | UUID |
| territories.name | body | Region name | Yes | string |
| territories.territories | body | Territory names | Yes | [string] |
| territories.instanceName | body | Instance name | Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | OK |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
Request Body
{"userId"=>"41355dbb-e41f-4d89-bfb2-1d1e7067943d", "territories"=>[{"name"=>"anywhere", "territories"=>["everywhere"], "instanceName"=>"welkonnect"}]}