Get Leave Types API

Can be used to get leave types of a specific employee.

Request URL:

https://people.zoho.com/people/api/leave/getLeaveTypeDetails?userId=<userId>

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Request Parameter

userIdEmployee Id/Employee MailId/Record Id of the Employee

Example URLs:

https://people.zoho.com/people/api/leave/getLeaveTypeDetails?authtoken=9c69640f94ebb37f50ca148734b2c5e4&userId=1

https://people.zoho.com/people/api/leave/getLeaveTypeDetails?authtoken=9c69640f94ebb37f50ca148734b2c5e4&userId=charless@zohocorp.com

https://people.zoho.com/people/api/leave/getLeaveTypeDetails?authtoken=9c69640f94ebb37f50ca148734b2c5e4&userId=3000000020481

 Threshold Limit:  30 requests | Lock period: 5 minutes

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

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Response

Copied<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/leave/getLeaveTypeDetails">
<status>0</status>
<message>Data fetched successfully</message>
<result>
<LeaveType>
<Name>DayBased</Name>
<PermittedCount>90.0</PermittedCount>
<AvailedCount>0.0</AvailedCount>
<Id>3000000030001</Id>
<Unit>Days</Unit>
<BalanceCount>90.0</BalanceCount>
</LeaveType>
<LeaveType>
<Name>Emp based</Name>
<PermittedCount>60.0</PermittedCount>
<AvailedCount>0.0</AvailedCount>
<Id>3000000099013</Id>
<Unit>Days</Unit>
<BalanceCount>60.0</BalanceCount>
</LeaveType>
<LeaveType>
<Name>HalfDayBased</Name>
<PermittedCount>70.0</PermittedCount>
<AvailedCount>0.0</AvailedCount>
<Id>3000000046003</Id>
<Unit>Days</Unit>
<BalanceCount>70.0</BalanceCount>
</LeaveType>
<LeaveType>
<Name>Hour based</Name>
<PermittedCount>20.0</PermittedCount>
<AvailedCount>0.0</AvailedCount>
<Id>3000000046007</Id>
<Unit>Hours</Unit>
<BalanceCount>20.0</BalanceCount>
</LeaveType>
</result>
</response>
Copied{ "response":
"message": "Data fetched successfully",
"result": [
{ "Name": "DayBased",
"PermittedCount": 90,
"AvailedCount": 0,
"Id": 3000000030001,
"Unit": "Days",
"BalanceCount": 90
}, { "Name": "Emp based",
"PermittedCount": 60,
"AvailedCount": 0,
"Id": 3000000099013,
"Unit": "Days",
"BalanceCount": 60
}, { "Name": "HalfDayBased",
"PermittedCount": 70,
"AvailedCount": 0,
"Id": 3000000046003,
"Unit": "Days",
"BalanceCount": 70
}, { "Name": "Hour based",
"PermittedCount": 20,
"AvailedCount": 0,
"Id": 3000000046007,
"Unit": "Hours",
"BalanceCount": 20
} ], "status": 0,
"uri": "/api/leave/getLeaveTypeDetails"
} }