Zoho: Inventory templates
Zoho inventoryTemplates.getInventoryTemplates: arguments, response, policy and SDK examples.
← Inventory templates operations · Get started
Operation zoho.getinventorytemplates
Provider route: GET /crm/v8/settings/inventory_templates. 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"]["getInventoryTemplates"]>[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.getInventoryTemplates(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_templates(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.module | string | Optional | Maximum length: 128 |
query.per_page | integer | Optional | Default: 200 Format: int32 Maximum: 200 |
query.page | integer | Optional | Default: 1 Format: int32 Minimum: 1 |
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 templates — response body — info, inventory templates |
$ (anyOf 2) | null | Alternative |
Referenced models: Inventory templates — response body — info, inventory templates
Schemas
Section titled “Schemas”Inventory templates — response body — info, inventory templates
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Successful response containing inventory_templates array and pagination info. Additional keys: not allowed |
info | Model | Required within parent | Expand Inventory templates — response body — info, inventory templates info Pagination information |
inventory_templates | array | Required within parent | Represents the list of inventory templates returned for the current page. Maximum items: 2000 |
inventory_templates[] | Model | Each item | Expand Inventory templates — response body — info, inventory templates inventory templates item |
Referenced models: Inventory templates — response body — info, inventory templates inventory templates item, Inventory templates — response body — info, inventory templates info
Inventory templates — response body — info, inventory templates inventory templates item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a summary object for an inventory template as returned in paginated list responses. 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 |
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 | Represents the unique ID of the inventory template. 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 Pattern: ^[A-Za-z0-9]{5}$ |
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 templates — response body — info, inventory templates info
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the pagination metadata for list responses, including page number, items per page, total count, and whether more records are available. Additional keys: not allowed |
count | JSON | Required within parent | |
count (anyOf 1) | integer | Alternative | Represents the number of inventory template records returned in the current page. Format: int32 |
count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
more_records | boolean | Required within parent | Indicates whether additional pages of inventory template records are available beyond the current page. Possible values: **true** - More records are available on subsequent pages. **false** - The current page is the last page. |
page | JSON | Required within parent | |
page (anyOf 1) | integer | Alternative | Represents the current page number in the paginated response. Format: int32 |
page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
per_page | JSON | Required within parent | |
per_page (anyOf 1) | integer | Alternative | Represents the number of inventory template records returned per page. Format: int32 |
per_page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
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.getinventorytemplates. Catalog operation: getInventoryTemplates. 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]