Skip to content

Zoho: Remove territories from a record

Zoho territories.removeTerritoriesFromRecord: arguments, response, policy and SDK examples.

← Territories operations · Get started

Operation zoho.removeterritoriesfromrecord

Provider route: POST /crm/v8/{module}/{record}/actions/remove_territories. Alter supplies the connection’s credentials and routing.

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"]["removeTerritoriesFromRecord"]>[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.removeTerritoriesFromRecord(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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_record(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.recordstringRequired within parentThe unique ID of the record, of type string. Use the [Get Records API](record.yaml#$.paths./{module}.get) to get the valid values.
Format: int64
path.modulestringRequired within parentThe 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
bodyobjectRequired within parentSpecify the territories and the record from which they are to be removed.
Additional keys: not allowed
body.dataarrayRequired within parentSpecify the list of records and their associated territories to remove from the record.
Maximum items: 1
Minimum items: 1
body.data[]objectEach itemSpecify the record and its associated territories to remove.
Additional keys: not allowed
body.data[].TerritoriesarrayRequired within parentSpecify the list of territories to remove from the record.
Maximum items: 100
Minimum items: 1
body.data[].Territories[]objectEach itemSpecify a territory object containing the unique territory ID to remove from the record.
Additional keys: not allowed
body.data[].Territories[].idstringRequired within parentSpecify the unique ID of the territory to remove from the record.
Format: int64
body.data[].idstringOptionalSpecify the unique ID of the record from which to remove territories.
Format: int64

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Remove territories from a record — response body — data
$ (anyOf 2)JSONAlternativeReturns a scheduled or synchronous response when territories are removed from a record.
$ (anyOf 2) (anyOf 1)ModelAlternativeExpand Remove territories from a record — response body — value data
$ (anyOf 2) (anyOf 2)ModelAlternativeExpand Remove territories from a record — response body — data

Referenced models: Remove territories from a record — response body — value data, Remove territories from a record — response body — data

Remove territories from a record — response body — value data
FieldTypePresenceDescription and constraints
$objectRootRepresents the response returned when a single-record territory removal job has been scheduled.
Additional keys: not allowed
dataarrayRequired within parentRepresents the list of scheduled territory removal results.
Maximum items: 1
Minimum items: 1
data[]ModelEach itemExpand 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 a record — response body — data
FieldTypePresenceDescription and constraints
$objectRootRepresents the response returned when territories are successfully removed from a record.
Additional keys: not allowed
dataarrayRequired within parentRepresents the list of territory removal results for the records.
Maximum items: 1
Minimum items: 1
data[]ModelEach itemExpand 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
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details for a single scheduled territory removal operation.
Additional keys: not allowed
codestringRequired within parentRepresents the result code for the scheduled territory removal. Possible values: **SCHEDULED**.
Known values: SCHEDULED
detailsModelRequired within parentExpand Remove territories from a record — response body — value data data item details
messagestringRequired within parentRepresents the success message returned when the territory removal is scheduled. Possible values: **Territory removal process scheduled successfully**.
Known values: Territory removal process scheduled successfully
statusstringRequired within parentRepresents 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
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details for a single territory removal operation.
Additional keys: not allowed
codestringRequired within parentRepresents the result code for the territory removal. Possible values: **SUCCESS**.
Known values: SUCCESS
detailsobjectRequired within parentRepresents additional details about the territory removal, including the record identifier.
Additional keys: not allowed
details.idstringRequired within parentRepresents the unique identifier of the record from which territories were removed.
Format: int64
messagestringRequired within parentRepresents the success message returned for the territory removal. Possible values: **the territories data removed successfully**.
Known values: the territories data removed successfully
statusstringRequired within parentRepresents 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
FieldTypePresenceDescription and constraints
$objectRootRepresents additional details about the scheduled territory removal, including the record and job identifiers.
Additional keys: not allowed
idstringRequired within parentRepresents the unique identifier of the record for which territory removal was scheduled.
Format: int64
job_idstringRequired within parentRepresents the unique identifier of the scheduled territory removal job.
Format: int64

SDK function policy ID: zoho.removeterritoriesfromrecord. Catalog operation: removeTerritoriesFromRecord. 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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.