Zoho: Remove territories from multiple records
Zoho territories.removeTerritoriesFromRecords: arguments, response, policy and SDK examples.
← Territories operations · Get started
Operation zoho.removeterritoriesfromrecords
Provider route: POST /crm/v8/{module}/actions/remove_territories. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["territories"]["removeTerritoriesFromRecords"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.territories.removeTerritoriesFromRecords(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.territories.remove_territories_from_records(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.module | string | Required within parent | The API name of the CRM module, of type string. use the [Get Modules API](modules.yaml#$.paths/settings/modules.get) to get the valid values. Maximum length: 100 |
body | object | Required within parent | Specify the records and their associated territories to remove. Additional keys: not allowed |
body.data | array | Required within parent | Specify the list of records and their associated territories to remove. Maximum items: 10 Minimum items: 1 |
body.data[] | object | Each item | Specify the record ID and the list of territories to remove from that record. Additional keys: not allowed |
body.data[].Territories | array | Required within parent | Specify the list of territories to remove from the record. Refer to the [Get Territories](territories.yaml#$.paths./settings/territories.get) resource for valid values. Maximum items: 100 Minimum items: 1 |
body.data[].Territories[] | object | Each item | Specify a territory object containing the unique ID of the territory to remove. Additional keys: not allowed |
body.data[].Territories[].id | string | Required within parent | Specify the unique ID of the territory to remove from the record. Refer to the [Get Territories](territories.yaml#$.paths./settings/territories.get) resource for valid values. Format: int64 |
body.data[].id | string | Required within parent | Specify the unique record ID of the record from which to remove the territories. Format: int64 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Remove territories from multiple records — response body — data |
$ (anyOf 2) | JSON | Alternative | Represents the scheduled territory removal response, returned when the removal jobs are queued for processing. |
$ (anyOf 2) (anyOf 1) | Model | Alternative | Expand Remove territories from multiple records — response body — value data |
$ (anyOf 2) (anyOf 2) | Model | Alternative | Expand Remove territories from multiple records — response body — data |
Referenced models: Remove territories from multiple records — response body — value data, Remove territories from multiple records — response body — data
Schemas
Section titled “Schemas”Remove territories from multiple records — response body — value data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the response returned when a territory removal job has been scheduled. Additional keys: not allowed |
data | array | Required within parent | Represents the list of scheduled territory removal results. Maximum items: 10 Minimum items: 1 |
data[] | Model | Each item | Expand Remove territories from a record — response body — value data data item |
Referenced models: Remove territories from a record — response body — value data data item
Remove territories from multiple records — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the response returned when territories are successfully removed from records. Additional keys: not allowed |
data | array | Required within parent | Represents the list of territory removal results. Maximum items: 10 Minimum items: 1 |
data[] | Model | Each item | Expand Remove territories from a record — response body — data data item |
Referenced models: Remove territories from a record — response body — data data item
Remove territories from a record — response body — value data data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the error details for a single scheduled territory removal operation. Additional keys: not allowed |
code | string | Required within parent | Represents the result code for the scheduled territory removal. Possible values: **SCHEDULED**. Known values: SCHEDULED |
details | Model | Required within parent | Expand Remove territories from a record — response body — value data data item details |
message | string | Required within parent | Represents the success message returned when the territory removal is scheduled. Possible values: **Territory removal process scheduled successfully**. Known values: Territory removal process scheduled successfully |
status | string | Required within parent | Represents the status of the scheduled territory removal operation. Possible values: **success**. Known values: success |
Referenced models: Remove territories from a record — response body — value data data item details
Remove territories from a record — response body — data data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the error details for a single territory removal operation. Additional keys: not allowed |
code | string | Required within parent | Represents the result code for the territory removal. Possible values: **SUCCESS**. Known values: SUCCESS |
details | object | Required within parent | Represents additional details about the territory removal, including the record identifier. Additional keys: not allowed |
details.id | string | Required within parent | Represents the unique identifier of the record from which territories were removed. Format: int64 |
message | string | Required within parent | Represents the success message returned for the territory removal. Possible values: **the territories data removed successfully**. Known values: the territories data removed successfully |
status | string | Required within parent | Represents the status of the territory removal operation. Possible values: **success**. Known values: success |
Remove territories from a record — response body — value data data item details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents additional details about the scheduled territory removal, including the record and job identifiers. Additional keys: not allowed |
id | string | Required within parent | Represents the unique identifier of the record for which territory removal was scheduled. Format: int64 |
job_id | string | Required within parent | Represents the unique identifier of the scheduled territory removal job. Format: int64 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.removeterritoriesfromrecords. Catalog operation: removeTerritoriesFromRecords. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.