Get record By ID from Zoho Invoice
Table of ContentsUp
Overview
The zoho.invoice.getRecordById task is used to fetch the required record from the specified module of Zoho Invoice using its ID.
Syntax
<response>=zoho.invoice.getRecordById(<module_name>,<org_ID>,<record_ID>);
where,
Params | Data Type | Description |
<response> | KEY-VALUE | specifies the response returned by Zoho Invoice. It represents the values of the record fetched. |
<module_name> | TEXT | specifies the Zoho Invoice's module from which the record needs to be fetched. The following are the supported modules:
|
<org_ID> | TEXT | specifies the organization ID |
<record_id> | TEXT | specifies the ID of the record that needs to be fetched |
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"
Response
- The success response returned is of the following format:
{
"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."
}