Deluge Tasks

Get record By ID from Zoho Invoice

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,

ParamsData TypeDescription

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

  • Contacts

  • Invoices

  • Customerpayments

  • Items

  • Estimates

  • Expenses

  • Projects

  • Expensecategories

<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"
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"
is the TEXT that represents the ID the record which needs to be fetched.

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

Related Links

Share this post : FacebookTwitter

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

Write to us: support@zohodeluge.com