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

NameLocated inDescriptionRequiredType
tenantNamepathName of tenantYesstring
userIdpathUser identifierYesUUID
territories.namebodyRegion nameYesstring
territories.territoriesbodyTerritory namesYes[string]
territories.instanceNamebodyInstance nameYesstring

Responses

CodeDescription
200OK
401Unauthorized
403Forbidden
404Not Found

Request Body

{"userId"=>"41355dbb-e41f-4d89-bfb2-1d1e7067943d", "territories"=>[{"name"=>"anywhere", "territories"=>["everywhere"], "instanceName"=>"welkonnect"}]}