Fetch record from Zoho Billing using the record ID
Table of Contents
Overview
This task is used to fetch a record from Zoho Billing by specifying the record ID. This task is based on Zoho Billing API <ModuleName> -> Receive a <ModuleName>.
Syntax
<variable> = zoho.billing.retrieve(<module_name>, <org_ID>, <record_ID>, <connection>);
where:
Params | Data type | Description |
<variable> | KEY-VALUE | is the response returned by Zoho Billing. |
<module_name> | TEXT | is the name of the module in Zoho Billing from where the record will be fetched. |
<org_id> | TEXT | Org ID of the organization from which the record will be fetched. Note: Learn how to fetch organization ID from the UI and from the response of zoho.billing.getOrganization task. |
<record_ID> | TEXT | ID of the record which will be fetched. Note: Learn how to fetch the record ID after creating or fetching records. |
<connection> | TEXT | specifies the link name of the Zoho Billing connection. Note:
|
Fetch a record from Zoho Billing using the record ID
Let’s take an example of fetching a record from the "Hosted Pages" module in Zoho Billing using the following snippet.
response = zoho.billing.retrieve("hostedpages", "10982991", "1687000000116001", "billing_connection");
where:
response
is the KEY-VALUE variable returned by Zoho Billing
"hosted pages"
is the TEXT that represents the module from which the record that will be fetched
"10982991"
is the TEXT org id of the organization from which the record will be fetched.
"1687000000116001"
is the TEXT that represents the ID of the record that will be fetched
"billing_connection"
is the TEXT that represents Zoho Billing connection link name
Sample Response
The following is a sample success response:
{
"custom_fields":"[]",
"message":"success",
"status":"fresh",
"hostedpage_id":"2-1a76024dc81f1bb6dd4a78d3a5c6f2b16cf56ec5a5b67151097ba494318be79b8a3668c64f1e146cd07b01e06e3e282a",
"action":"new_subscription",
"expiring_time":"2015-03-10T11:53:07+0530",
"code":0,
"created_time":"2015-03-10T10:53:07+0530",
"url":"https://billing.zoho.com/hostedpage/2-1a76024dc81f1bb6dd4a78d3a5c6f2b16cf56ec5a5b67151097ba494318be79b8a3668c64f1e146cd07b01e06e3e282a/checkout"
}
"custom_fields":"[]",
"message":"success",
"status":"fresh",
"hostedpage_id":"2-1a76024dc81f1bb6dd4a78d3a5c6f2b16cf56ec5a5b67151097ba494318be79b8a3668c64f1e146cd07b01e06e3e282a",
"action":"new_subscription",
"expiring_time":"2015-03-10T11:53:07+0530",
"code":0,
"created_time":"2015-03-10T10:53:07+0530",
"url":"https://billing.zoho.com/hostedpage/2-1a76024dc81f1bb6dd4a78d3a5c6f2b16cf56ec5a5b67151097ba494318be79b8a3668c64f1e146cd07b01e06e3e282a/checkout"
}
The following is a sample failure response:
{
"message":"Please specify a valid hosted page.",
"code":107401
}
"message":"Please specify a valid hosted page.",
"code":107401
}