Get organizations from Zoho Books

Note:

  • Each time the zoho.books.getOrganizations integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
  • Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.books.getOrganizations integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script. 

Overview

This task is used to fetch all the organizations that a user is associated with in Zoho Books.

This task is based on Zoho Books API.

Syntax

<variable> = zoho.books.getOrganizations(<connection>);
ParameterData typeDescription
<variable>KEY-VALUEVariable to store the response returned by Zoho Books

<connection>

 

TEXT

is the name of the Zoho Books connection

Note:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory 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 unless the authtoken is manually deleted from accounts.
  • Add relevant scopes as mentioned in Zoho Books API while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

Examples

This task fetches all the organizations that a user is part of.

response = zoho.books.getOrganizations("books_connection");

where:

"books_connection"
The KEY-VALUE name of Zoho Books connection.

Sample Response

  • The following is a sample success response:

    {
     "code": 0,
     "message": "success",
     "organizations": [
      {
      "organization_id": "10234695",
      "name": "Zillum",
      "contact_name": "John Smith",
      "email": "johnsmith@zillum.com",
      "is_default_org": false,
      "language_code": "en",
      "fiscal_year_start_month": 0,
      "account_created_date": "2016-02-18",
      "time_zone": "PST",
      "is_org_active": true,
      "currency_id": "460000000000097",
      "currency_code": "USD",
      "currency_symbol": "$",
      "currency_format": "###,##0.00",
      "price_precision": 2
     },
     {...},
     {...}
     ]
    }

To get the organization ID or organization name from the response:

orgs = response.get("organizations");
 for each org in orgs
 {
 info  org.get("organization_id");
 info  org.get("name");
 }

Related Links