Fetch Single Record API

This API will fetch the record of leave from indexed using a Record ID

Purpose:

This API will fetch the record of Leave form indexed using a Record ID.

Request URL:

https://people.zoho.com/people/api/forms/leave/getDataByID?recordId=413124000068132003

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Request Parameters:

recordIdSpecifies the record Id of the leave record being fetched. The record Id can be identified using the fetch Records API.

Response field details

Response fieldResponseExplanation
LeaveCount1One day leave
 .50Half day leave
 .25Quarter day leave
 01:00One hour leave
Session ( in .5 day leave)1First half of the day
 2Second half of the day
Session (.25 day leave)1First quarter of the day 
 2Second quarter of the day
 3Third quarter of the day
 4Fourth quarter of the day
StartTime (in hour based leave) Start time of the leave in HH:mm format
EndTime (in hour based leave) End time of the leave in HH:mm format

Note:

  • Daydetails for day based leave includes the date, leaveCount and Session details of all the dates within the applied leave's date range.
  • Daydetails for hour based leave includes the date, leaveCount, StartTime and EndTime of all the hours within the applied leave's date range.

 Threshold Limit:  400 requests | Lock period: 5 minutes

Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.

Sample Request

Copiedhttps://people.zoho.com/people/api/forms/leave/getDataByID?recordId=413124000068132003

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Sample Response

Copied<?xml version="1.0" encoding="UTF-8"?><br>
<response uri="/api/forms/leave/getDataByID">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<field name="Employee_ID">Karan John 1</field>
<DayDetails name="DayDetails">
<date name="07-Mar-2020">
<detail name="LeaveCount">0.5</detail>
<detail name="Session">1</detail>
</date>
<date name="04-Mar-2020">
<detail name="LeaveCount">1</detail>
</date>
<date name="06-Mar-2020">
<detail name="LeaveCount">0.25</detail>
<detail name="Session">1</detail>
</date>
<date name="08-Mar-2020">
<detail name="LeaveCount">0.5</detail>
<detail name="Session">1</detail>
</date>
<date name="09-Mar-2020">
<detail name="LeaveCount">0.5</detail>
<detail name="Session">2</detail>
</date>
<date name="05-Mar-2020">
<detail name="LeaveCount">0.5</detail>
<detail name="Session">1</detail>
</date>
</DayDetails>
<field name="Leavetype.ID">413124000000645719</field>
<field name="From">04-Mar-2020</field>
<field name="Unit">Day</field>
<field name="ApprovalStatus">Pending</field>
<field name="Reasonforleave">Vacation</field>
<field name="Daystaken">2.25</field>
<field name="TeamEmailID">teamemail@gmail.com</field>
<field name="Department">HR</field>
<field name="Leavetype">Annual leave</field>
<field name="To">09-Mar-2020</field>
<field name="Department.ID">413124000000117067</field>
<field name="Employee_ID.ID">413124007800117005</field>
<field name="DateOfRequest">14-Aug-2019</field>
</result>
</response>
Copied{
"response": {
"result": [
{
"Employee_ID": "Karan John 1",
"DayDetails": {
"07-Mar-2020": {
"LeaveCount": "0.5",
"Session": 1
},
"04-Mar-2020": {
"LeaveCount": "1"
},
"06-Mar-2020": {
"LeaveCount": "0.25",
"Session": 1
},
"08-Mar-2020": {
"LeaveCount": "0.5",
"Session": 1
},
"09-Mar-2020": {
"LeaveCount": "0.5",
"Session": 2
},
"05-Mar-2020": {
"LeaveCount": "0.5",
"Session": 1
}
},
"Leavetype.ID": "413124000000645719",
"From": "04-Mar-2020",
"Unit": "Day",
"ApprovalStatus": "Pending",
"Reasonforleave": "Vacation",
"Daystaken": "2.25",
"TeamEmailID": "teamemail@gmail.com",
"Department": "HR",
"Leavetype": "Annual leave",
"To": "09-Mar-2020",
"Department.ID": "413124680000117005",
"Employee_ID.ID": "413124000780117005",
"DateOfRequest": "14-Aug-2019",
}
],
"message": "Data fetched successfully",
"uri": "/api/forms/leave/getDataByID",
"status": 0
}
}