Territories of a User
Purpose
To get the territories related to a user.
Request Details
Request URL
To get all the territories of the user - {api-domain}/crm/{version}/users/{id}/territories
To get a specific territory of the user - {api-domain}/crm/{version}/users/{id}/territories/{territory_id}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.users.{operation_type}
(or)
scope=ZohoCRM.settings.territories.{operation_type}
Possible operation types
ALL - Full access to the record
READ - Get records from the module
Response JSON Keys
Response JSON Keys in the "info" object (only while fetching all the territories related to the user)
- idstring
Represents the unique ID of the territory that the user is associated to.
- ManagerJSON object
Represents the name and ID of the manager of the territory.
- Namestring
Represents the name of the territory.
- Reporting_ToJSON object
Represents the name and ID of the parent territory. For the parent territory, this value is null.
- per_pageinteger
Represents the number of records you can fetch in a single API call. The maximum value is 200.
- countinteger
Represents the number of records fetched in this API call.
- pageinteger
Represents the page number from which the records were fetched. The default value us 1.
- more_recordsboolean
Represents whether or not there are more records in the module to be fetched.
Possible Errors
- INVALID_DATAHTTP 400
You have specified an invalid ID for either the user, territory or both.
Resolution: The resource_path_index in the response gives you the position of the invalid ID in the request. Specify a valid ID.
Sample Response
Copied