Delete Territories
Purpose
To delete territories from your Zoho CRM organization.
Endpoints
- DELETE /settings/territories
- DELETE /settings/territories/{territory_ID}
Request Details
Request URL
To delete territories using the parameter ids:
{api-domain}/crm/{version}/settings/territories
To delete a specific territory:
{api-domain}/crm/{version}/settings/territories/{territory_ID}
Header
Authorization: Zoho-oauthtokend92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.territories.{operation_type}
Possible operation types
ALL - Full access to territories
DELETE - Delete territories
Parameters
- idsstring, mandatorySpecify the unique ID of the territories that you want to delete.
 Possible values: Territory IDs separated by commas or a single territory ID.
 For example: 431581000000272796, 431581000000272786. Use the Get Territories API to get the ID of the territory.
- delete_previous_forecastsBoolean, mandatoryDelete previous forecasts made by the territory
Note
Maximum number of territories that can be deleted in one API call is 10
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/territories?ids=431581000000734147"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Possible Errors
- INVALID_DATAHTTP 400The territory given is invalid Resolution: Give valid territory ID 
- NOT_ALLOWEDHTTP 400- This territory has a child territory associated with it. It can't be deleted directly as transfer of child territory is required.
 Resolution: Use transfer and delete api to delete the parent territory
- The territory you are trying to delete is the Org Territory
 
- This territory has a child territory associated with it. It can't be deleted directly as transfer of child territory is required.
- PERMISSION_DENIEDHTTP 401You don't have a permission to delete the Territory Resolution:The user does not have permission to delete the territory. Contact your system administrator. 
Sample Response
Copied{
    "territories": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "431581000000734147"
            },
            "message": "Given Territory Removed Successfully",
            "status": "success"
        }
    ]
}