Fetch Territories of a User
Purpose
To fetch the details of the territories assigned to a user. The user performing this action should have the User Management permission.
Request URL
https://fsm.zoho.com/fsm/v1/users/<user_id>/Territories
user_id - The ID (the value of User in the Service_Resources key present in the List Users API response) of the user.
Request Method
GET
Scope
scope=ZohoFSM.users.READ
Sample Request
Copiedcurl --location --request GET 'https://fsm.zoho.com/fsm/v1/users/6191XXXX7001/Territories' \
--header 'Authorization: Zoho-oauthtoken 1xxx.xxxxxxxxxx'
Sample Response
Copied{
"data": [
{
"Territory": {
"name": "St. Louis",
"id": "6191000000371233"
},
"Owner": {
"name": "Alicia Florrick",
"id": "6191000000227001",
"email": "alicia@noemail.com"
},
"Modified_Time": "2024-01-17T05:16:36-06:00",
"Created_Time": "2024-01-17T05:16:36-06:00",
"$editable": true,
"$permissions": {
"read": true,
"edit": true,
"delete": true
},
"Service_Resource": {
"name": "Alicia Florrick",
"id": "6191000000227293"
},
"End_Date_Time": null,
"Modified_By": {
"name": "Alicia Florrick",
"id": "6191000000227001",
"email": "alicia@noemail.com"
},
"Start_Date_Time": "2023-12-31T23:00:00-06:00",
"$inactive": false,
"id": "6191000000371238",
"Created_By": {
"name": "Alicia Florrick",
"id": "6191000000227001",
"email": "alicia@noemail.com"
}
},
{
"Territory": {
"name": "Zylker",
"id": "6191000000227288"
},
"Owner": {
"name": "Alicia Florrick",
"id": "6191000000227001",
"email": "alicia@noemail.com"
},
"Modified_Time": "2023-10-05T02:34:06-05:00",
"Created_Time": "2023-10-05T02:34:06-05:00",
"$editable": true,
"$permissions": {
"read": true,
"edit": true,
"delete": true
},
"Service_Resource": {
"name": "Alicia Florrick",
"id": "6191000000227293"
},
"End_Date_Time": null,
"Modified_By": {
"name": "Alicia Florrick",
"id": "6191000000227001",
"email": "alicia@noemail.com"
},
"Start_Date_Time": "2023-10-05T02:34:05-05:00",
"$inactive": false,
"id": "6191000000227298",
"Created_By": {
"name": "Alicia Florrick",
"id": "6191000000227001",
"email": "alicia@noemail.com"
}
}
],
"info": {
"per_page": 200,
"count": 2,
"page": 1,
"more_records": false
}
}
Show full
Show less
Sample Error Response
Copied//If the user performing this action does not have the User Management permission.
{
"code": "NO_PERMISSION",
"details": {
"permissions": [
"Crm_Implied_Manage_Users"
]
},
"message": "permission denied",
"status": "error"
}