Fetch record by ID

Get record By ID from Zoho Invoice

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,

ParamsData TypeDescription

<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.

ContactsInvoicesCustomer PaymentsItems
EstimatesExpensesExpenseCategory

Projects

(applicable to all Zoho services except Zoho Creator)

<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"
is the TEXT that represents the module from which the record will be fetched
"5368XXXX"
is the TEXT that represents the organization ID of the Zoho Invoice account from which the record needs to be fetched
"13144XXXXXXXXXXXX"
represents the ID the record which will be fetched.

Sample Response

  • The following is a sample successresponse:

    {  
       "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."
             }

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com