Child Territories of a Territory
Purpose
To retrieve the details of child territories of your territory.
Request Details
Request URL
{api-domain}/crm/{version}/settings/territories/{territoryid}/__child_territories
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.settings.territories.{operation_type}
Possible operation types
ALL - Full access to territories data
READ - Read territories data
Parameters
filters
Filters parameter can be used to retrieve the details of the child territory that you are searching for.
eg:?filters={"field": {"api_name" : "manager.id"},"value":"431581000000278001" ,"comparator": "equal"}
This can be used to find the territories whose manager is J Smith (whose user id is 431581000000278001 )
Keys and comparators- Keys reporting_to.id, manager.id, id, permission_type, created_by, modified_by
Comparators equal, not_equal - Key name
Comparators equal, not_equal, ends_with, starts_with, contains, not_contains - Keys created_time, modified_time
Comparators less_equal, between, greater_than, less_than, equal
- Keys reporting_to.id, manager.id, id, permission_type, created_by, modified_by
- pageinteger, optional
To get the list of records from the respective pages. Default value for page is 1.
Possible values: Positive Integer values only. - per_pageinteger, optional
To get the list of records available per page. The default and the maximum possible value is 200.
Possible values: Positive Integer values only.
Sample Request
Copied
Response JSON Keys
- created_timestring
Represents the date and time at which the current territory was created.
- managerJSON object
Represents the name and ID of the current territory's manager.
- account_rule_criteria JSON Object
Represents the criteria for account module territory rules(comparator,field and value)
- descriptionstring
Represents the description of the territory, if any.
- lead_rule_criteria JSON Object
Represents the criteria for lead module territory rules(comparator,field and value)
- reporting_tostring
Represents the unique ID of the parent territory.
- deal_rule_criteria JSON Object
Represents the criteria for deal module territory rules(comparator,field and value)
- permission_type string
Represents the type of permission for the territory. Possible values are read_only and read_write_delete.
- modified_timestring
Represents the date and time at which the current territory was last modified.
- namestring
Represents the name of the territory.
- modified_byJSON object
Represents the name and ID of the user who last modified the current territory.
- idstring
Represents the unique ID of the territory.
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above. - AUTHORIZATION_FAILEDHTTP 400
User does not have sufficient privilege to read territories
Resolution: The user does not have the permission to retrieve territories data. Contact your system administrator. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have ZohoCRM.settings.territories.READ scope. Create a new client with valid scope. Refer to scope section above. - NO_PERMISSIONHTTP 403
Permission denied to read
Resolution: The user does not have permission to read territories data. Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one
Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team.
Sample Response
Copied