Associated User Count
Purpose
To retrieve the count of users under the territories in your Zoho CRM organization.
Endpoints
- GET /territories/actions/associated_users_count
Request Details
Request URL
{api-domain}/crm/{version}/settings/territories/actions/associated_users_count
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.territories.All
(and)
ZohoCRM.users.All
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/territories/actions/associated_users_count"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Response JSON Keys
- countnumber
Represents the number of users associated to the territory.
- territoryJSON Object
Represents the name and ID of the territory.
Possible Errors
- OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have required scope. Create a new client with valid scope. Scope at the beginning of this page - INVALID_URL_PATTERNHTTP 404
The request URL is incorrect.
Resolution: Specify a valid request URL. Refer to request URL section at the beginning of this page for more details. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team.
Sample Response
Copied{
"associated_users_count": [
{
"count": "1",
"territory": {
"name": "Zoho",
"id": "431581000000272796"
}
},
{
"count": "2",
"territory": {
"name": "Chennai",
"id": "431581000000744113"
}
},
{
"count": "1",
"territory": {
"name": "Chennai-South",
"id": "431581000000744125"
}
},
{
"count": "1",
"territory": {
"name": "Chennai North",
"id": "431581000000744137"
}
},
{
"count": "1",
"territory": {
"name": "Parent",
"id": "431581000000744159"
}
},
{
"count": "1",
"territory": {
"name": "Child",
"id": "431581000000744169"
}
},
{
"count": "1",
"territory": {
"name": "Chennai Leads",
"id": "431581000000744183"
}
}
],
"info": {
"per_page": 200,
"count": 7,
"page": 1,
"more_records": false
}
}
Show full
Show less