Get record By ID from Zoho Invoice
Table of ContentsUp
Note:
- Each time the zoho.invoice.getRecordById integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.invoice.getRecordById integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
This task is used to fetch a record from Zoho Invoice using the record ID.
Syntax
<variable> = zoho.invoice.getRecordById(<module_name>,<org_ID>,<record_ID>);
where,
| Params | Data Type | Description | ||||||||
| <variable> | KEY-VALUE | specifies the response returned by Zoho Invoice. | ||||||||
| <module_name> | TEXT | specifies the Zoho Invoice's module from which the record will be fetched. Following are the applicable modules.
| ||||||||
| <org_ID> | TEXT | specifies the org ID of the organization from which the record will be fetched. | ||||||||
| <record_ID> | BIGINT | specifies the ID of the record which will be fetched. Learn how to fetch the record ID after creating or fetching records. | ||||||||
<connection>* (optional) | TEXT | specifies the name of the connection. *Note: This param is not supported when used in Zoho Creator. |
Example
The following script fetches a record from the Zoho Invoice module - Items with record ID - 13144XXXXXXXXXXXX.
response = zoho.invoice.getRecordById("Items", "5368XXXX", "13144XXXXXXXXXXXX");
where,
"Items"
"5368XXXX"
"13144XXXXXXXXXXXX"
Sample Response
The following is a sample success response:
{
"item":{
"created_time":"2017-11-27T13:16:39+0530",
"last_modified_time":"2017-11-27T13:16:39+0530",
"item_id":"13144XXXXXXXXXXXX",
"custom_fields":[],
"tax_name":"",
"is_linked_with_zohocrm":false,
"description":"",
"source":"api",
"zcrm_product_id":"",
"tax_id":"",
"image_name":"",
"unit":"",
"product_type":"",
"rate":500.0,
"tax_type":"",
"name":"pendrive",
"tax_percentage":0,
"custom_field_hash":{},
"pricebook_rate":500.0,
"sku":"",
"image_id":"",
"crm_owner_id":"",
"status":"active"
},
"code":0,
"instrumentation":{
"response_write_time":2,
"query_execution_time":20,
"page_context_write_time":0,
"request_handling_time":125
},
"message":"success"
}The failure response returned due to incorrect org id is of the following format:
{
"code":6041,
"message": "This user is not associated with the CompanyID/CompanyName:537XX."
}