Get record by ID from Zoho Bookings
Table of Contents
Note:
- Each time the zoho.bookings.getRecordById 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.getRecordById 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 a record from the specified module using its ID.
This task is based on Zoho Bookings API.
Syntax
<response> = zoho.bookings.getRecordById(<module>, <record_id>, <connection>);
where:
| Params | Data type | Description |
<response> | KEY-VALUE | Variable which will hold the returned response. |
<module> | TEXT | The name of the module from which the record will to be fetched. The applicable modules are:
|
<record_id> | NUMBER | The ID of the record that will be fetched. Note:
|
| <connection> | TEXT | The name of the connection. Note:
|
Example
The following script fetches the record with ID - 3883XXXXXXXXXXX7032 from the module - services:
response = zoho.bookings.getRecordById("services", 3883XXXXXXXXXXX7032, "bookings_oauth_connection");
where:
response
The variable which holds the response in KEY-VALUE format.
"services"
The TEXT that represents the name of the module.
3883XXXXXXXXXXX7032
The NUMBER that represents the ID of the record that needs to be fetched.
"bookings_oauth_connection"
The TEXT that represents the name of the connection.
Response Format
Success Response
- The success response returned will be returned in the following format:{
"response": {
"returnvalue": {
"data": [
{
"duration": "60 mins",
"buffertime": "10 mins",
"price": "1500",
"name": "Technical counseling",
"currency": "INR",
"id": "3883XXXXXXXXXXX7032"
}
]
},
"status": "success"
}
}
Failure Response
- The failure response for an invalid or non-existent record ID will be returned in the following format:{
"response": {
"returnvalue": {
"mesage": "There is no active service for the criteria",
"status": "failure"
},
"status": "success"
}
}