Get Territories of a Record

Purpose

To get the details of the territories assigned to a record in your Zoho CRM organization.

Endpoints

  • GET /settings/territories/{territory_ID}/__child_territories

Request Details

Request URL

{api-domain}/crm/{version}/{module_api_name}/{record_id}

Supported modules

Leads, Accounts, Contacts, and Deals

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.modules.ALL
(or)
ZohoCRM.modules.{module_name}.{operation_type}

Possible module names

leads, accounts, contacts, and deals

Possible operation types

ALL - Full access to the record
READ - Read records in the module

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/Deals/554023000000497035"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GET

Response JSON

  • Namestring

    Represents the name of the territory.

  • idstring

    Represents the unique ID of the territory.

  • $assigned_byJSON object

    Represents the name and ID of the user who assigned the territory to the record.

  • $assigned_timestring

    Represents the date and time at which the territory was assigned to the record.

  • $assignedstring

    Represents the how the territory was assigned to the record.
    Possible values:
    manually: the user has assigned the territory through the API or the UI, manually.
    automatically: the system has assigned the territories.

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 access records
    Resolution: The user does not have the permission to access records. Contact your system administrator.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The access token you have used to make this API call does not have the required scope.
    Resolution: Generate a new access token with the required scopes for this API. Refer to Scope section at the beginning of this page for the list of required scopes.

  • NO_PERMISSIONHTTP 403

    Permission denied to read records
    Resolution: The user does not have permission to read records. Contact your system administrator.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in Server. Contact support team.

Sample Response

Copied{
  "data": [
    {
      "Owner": {
        "name": "Patricia Boyle",
        "id": "111111000000043376",
        "email": "p.boyle@abc.com"
      },
      "Territories": [
        {
          "Name": "Texas",
          "id": "111111000000046898",
          "$assigned_by": null,
          "$assigned_time": "2020-03-05T16:07:28+05:30",
          "$assigned": "automatically"
        },
        {
          "Name": "South",
          "id": "111111000000046458",
          "$assigned_by": {
            "name": "Patricia Boyle",
            "id": "111111000000043376"
          },
          "$assigned_time": "2020-03-05T16:07:28+05:30",
          "$assigned": "manually"
        }
      ]
    }
  ]
}