Zoho: Inventory Template
Zoho inventoryTemplates.getInventoryTemplateById: arguments, response, policy and SDK examples.
← Inventory templates operations · Get started
Operation zoho.getinventorytemplatebyid
Provider route: GET /crm/v8/settings/inventory_templates/{templateId}. 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["inventoryTemplates"]["getInventoryTemplateById"]>[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.inventoryTemplates.getInventoryTemplateById(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.inventory_templates.get_inventory_template_by_id(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.templateId | string | Required within parent | Maximum length: 64 |
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 Inventory Template — response body — inventory templates |
$ (anyOf 2) | null | Alternative |
Referenced models: Inventory Template — response body — inventory templates
Schemas
Section titled “Schemas”Inventory Template — response body — inventory templates
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Successful response for single inventory template retrieval Additional keys: allowed |
inventory_templates | array | Required within parent | Represents an array containing the details of a single inventory template. Maximum items: 1 |
inventory_templates[] | Model | Each item | Expand Inventory Template — response body — inventory templates inventory templates item |
Referenced models: Inventory Template — response body — inventory templates inventory templates item
Inventory Template — response body — inventory templates inventory templates item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Complete inventory template object with all detailed information including content Additional keys: not allowed |
category | string | Required within parent | Represents the category of the inventory template. Possible values: **normal** - A regular, published inventory template. **draft** - A template that is saved as a draft and not yet published. Known values: normal, draft |
content | string | Required within parent | Represents the full HTML content of the inventory template. Maximum length: 300000 |
created_by | Model | Required within parent | Expand Inventory Template — response body — inventory templates inventory templates item created by User who created the template |
created_time | string | Required within parent | Represents the creation timestamp of the inventory template. Format: date-time |
editor_mode | string | Required within parent | Represents the editor mode used to create the inventory template. Possible values: **plain_text** - The template was built from scratch using plain text. **rich_text** - The template is a pre-designed custom template. **gallery** - The template was chosen from the template gallery and customized. Known values: plain_text, rich_text, gallery |
favorite | boolean | Required within parent | Indicates whether the inventory template is marked as a favorite. Possible values: **true** - The template is marked as a favorite. **false** - The template is not marked as a favorite. |
folder | Model | Required within parent | Expand Inventory Template — response body — inventory templates inventory templates item folder Folder containing this template |
id | string | Required within parent | Unique template identifier Maximum length: 50 |
last_usage_time | JSON | Required within parent | Represents the date and time at which the inventory template was last used, or null if the template has never been used. |
last_usage_time (anyOf 1) | string | Alternative | Represents the date and time at which the template was last used. Format: date-time |
last_usage_time (anyOf 2) | null | Alternative | Indicates that the template has never been used. |
modified_by | Model | Required within parent | Expand Inventory Template — response body — inventory templates inventory templates item created by User who last modified the template |
modified_time | string | Required within parent | Represents the date and time at which the inventory template was last modified. Format: date-time |
module | Model | Required within parent | Expand Inventory Template — response body — inventory templates inventory templates item module Module this template belongs to |
name | string | Required within parent | Represents the name of the inventory template. Maximum length: 75 |
Referenced models: Inventory Template — response body — inventory templates inventory templates item folder, Inventory Template — response body — inventory templates inventory templates item module, Inventory Template — response body — inventory templates inventory templates item created by
Inventory Template — response body — inventory templates inventory templates item folder
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a folder reference containing the folder ID and name, used to identify the folder associated with an inventory template. Additional keys: not allowed |
id | string | Required within parent | Represents the unique ID of the folder. Maximum length: 50 |
name | string | Required within parent | Represents the name of the folder. Maximum length: 255 |
Inventory Template — response body — inventory templates inventory templates item module
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a module reference containing the module **API name** and **ID**, used to identify the CRM module associated with an inventory template. Additional keys: not allowed |
api_name | string | Required within parent | Represents the API name of the CRM module associated with the inventory template. Maximum length: 50 |
id | string | Required within parent | Represents the unique ID of the CRM module associated with the inventory template. Maximum length: 50 |
Inventory Template — response body — inventory templates inventory templates item created by
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a user reference containing the user ID and display name, used to identify the user associated with an inventory template operation. Additional keys: not allowed |
id | string | Required within parent | Represents the unique ID of the CRM user. Maximum length: 50 |
name | string | Required within parent | Represents the display name of the CRM user. Maximum length: 255 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getinventorytemplatebyid. Catalog operation: getInventoryTemplateById. 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.
No-content response statuses: [204]