Inventory Templates
Purpose
To fetch the details of inventory templates.
Request Details
Request URL
{api-domain}/crm/{version}/settings/inventory_templates
To fetch details of a specific template
{api-domain}/crm/{version}/settings/inventory_templates/{id}
Supported modules
Quotes, Invoices, Purchase Orders, and Sales Orders.
All modules whose value for the key "inventory_template_supported" is true in the Modules API are supported here.
Header
Authorization: Zoho-oauthtoken 100xx.92d4xxxxxxxxxxxxx15f52
Scope
scope=ZohoCRM.templates.inventory.READ
Parameters
- modulestring, optional
Specify the API name of the module you want to fetch the inventory templates from. Refer to the Supported modules section above.
- categorystring, optional
To filter the inventory templates based on their type. The possible values are favorite: templates marked as your favorite, created_by_me: templates that you created, shared_with_me: templates that other users shared with you, and draft: templates in your draft.
- sort_bystring, optional
Specify based on what you want to sort your templates. The possible values are modified_time: to sort based on the modified time, last_usage_time: to sort based on the latest time a template was used, and name: to sort based on the template's name. The default value is modified_time.
- sort_orderstring, optional
The order you want to sort the templates in. The possible values are asc: to sort in ascending order and desc: to sort in descending order, this is the default value.
The sort_order parameter applies to given sort_by parameter value.
The content key contains the HTML of the email template and is rendered in the response only when you fetch a specific email template.
Sample Request
Copied
Response JSON Keys
- created_timestring
Represents the date and time at which the inventory template was created.
- modified_timestring
Represents the date and time at which the inventory template was last modified.
- folderJSON object
Represents the name and unique ID of the template folder.
- last_usage_timestring
Represents the date and time at which the inventory template was last used.
- moduleJSON object
Represents the API name and unique ID of the module with which the inventory template is associated.
- namestring
Represents the name of the template.
- modified_byJSON object
Represents the name and ID of the user who last modified the inventory template.
- idstring
Represents the unique ID of the inventory template.
- editor_modestring
Represents the mode in which the inventory template is created. The possible values are gallery: the template is chosen from the template gallery and is customized, rich_text: a pre-designed custom template, plain_text: the template is built from scratch.
- favoriteboolean
Represents if the inventory template is marked as favorite.
- categorystring
Represents the category of the template. The possible values are custom_templates: the templates created by a user, system_templates: the templates present in the system by default, plugin_templates: the templates that are created and installed from the Zoho CRM extension, marketplace_templates: the templates that are created and installed from the published plugins.
- created_byJSON object
Represents the name and ID of the user who created the inventory template.
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to the Endpoints section above. - AUTHORIZATION_FAILEDHTTP 400
User does not have sufficient privilege to read records data
Resolution: The user does not have the permission to retrieve records data. Contact your system administrator. - INVALID_MODULEHTTP 400
The module name specified is invalid.
Resolution: Specify the valid module API name. Refer to the Supported modules section above. - PATTERN_NOT_MATCHEDHTTP 400
You have specified incorrect values for the key specified in "api_name" of the response.
Resolution: Input correct values. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have ZohoCRM.templates.inventory.READ scope. Create a new client with valid scope. Refer to the Scope section above. - NO_PERMISSIONHTTP 403
You do not have permission to view the templates of this module.
Resolution: Contact your administrator. - INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one.
Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to the Request URL section above. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in Server. Contact support team.
Sample Response
Copied