Choose where you’d like to start

Fetch record from Zoho Billing using the record ID

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.subscriptions.retrieve(<module_name><org_ID>, <record_ID>, <connection>);

where:

Params Data typeDescription

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

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory in order for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter until you manually delete the authtoken from accounts.
  • Add relevant scopes mentioned in Zoho Billing API while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

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.subscriptions.retrieve("hostedpages", "10982991", "1687000000116001", "subscriptions_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 organzation from which the record will be fetched.
"1687000000116001"
is the TEXT that represents the ID of the record that will be fetched
"subscriptions_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://subscriptions.zoho.com/hostedpage/2-1a76024dc81f1bb6dd4a78d3a5c6f2b16cf56ec5a5b67151097ba494318be79b8a3668c64f1e146cd07b01e06e3e282a/checkout"
}

The following is a sample failure response:

{
"message":"Please specify a valid hosted page.",
"code":107401
}

Related Links

Get Started Now

Execute