Get record by ID from Zoho Bookings
Table of Contents
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"
}
}