Get Workspaces from Zoho Bookings

Note:

  • Each time the zoho.bookings.getWorkspaces 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.bookings.getWorkspaces 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 workspaces from your Zoho Bookings account.

This integration task is based on the Zoho Bookings API - Fetch Workspaces.

Syntax

<response> = zoho.bookings.getWorkspaces(<connection>);
ParamsData typeDescription
<response> KEY-VALUEThe variable which will hold the returned response.
<connection>TEXT

The name of the 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 while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

Example

The following script fetches all your workspaces:

response =zoho.bookings.getWorkspaces("bookings_oauth_connection");

where:

response
The variable which returns the returned response in KEY-VALUE format.
"bookings_oauth_connection"
The TEXT name of the connection.

Response Format

Success Response

  • The success response returned will be returned in the following format:

     {
     "response": {
     "returnvalue": {
     "data": [
     {
     "name": "Soft skills",
     "id": "3883XXXXXXXXXXX6010"
     },
     {
     "name": "Computer courses",
     "id": "3883XXXXXXXXXXX6106"
     }
     ]
     },
     "status": "success"
     }
     }

To get the IDs of the workspaces, use the following script:

 for each var in <response_variable>
 {
 list_var = var.get("returnvalue").get("data");
 for each var1 in list_var
 {
 info  var1 .get("id");
 }
 }

Related Links