Get All Holidays API

This API is used to fetch the holidays of a location, shift or for an employee.

Request URL:

https://people.zoho.com/people/api/leave/v2/holidays/get?location=Chennai&shift=General&employee=1&upcoming=true&from=01-Jan-2019&to=31-Dec-2019&dateFormat=dd-MMM-yyyy

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Scope:

ZOHOPEOPLE.leave.ALL

Request Parameters: (Optional)

locationLocation name 
shift Shift name
employeeEmp ID or Email ID or Erecno of the employee
upcoming Boolean : 'true' or 'false'
To get the holidays for the next 365 days
fromFrom date
to To date
dateFormatdate format used to specify From and To as String 

Note: If optional parameters are not provided, login user's current leave year holidays will be fetched.

 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.

Sample Request

Copiedhttps://people.zoho.com/people/api/leave/v2/holidays/get?location=Chennai&shift=General&employee=1&upcoming=true&from=01-Jan-2019&to=31-Dec-2019&dateFormat=dd-MMM-yyyy

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Sample Response

Copied{
    "data": [
        {
            "isRestrictedHoliday": false,
            "ShiftName": "General",
            "Remarks": "New year holiday",
            "LocationId": "4131240008700117006,",
            "ShiftId": "413124000000456081",
            "Id": "413124000003341001",
            "Date": "01-Jan-2019",
            "isHalfday": false,
            "Name": "New year ",
            "LocationName": "Chennai",
            "Session": 0
        },
        {
            "isRestrictedHoliday": false,
            "ShiftName": "General",
            "Remarks": "Pongal holiday",
            "LocationId": "4131240000001170579",
            "ShiftId": "413124000000117062,",
            "Id": "413124000002501423",
            "Date": "12-Jan-2019",
            "isHalfday": true,`
            "Name": "Pongal",
            "LocationName": "Chennai",
            "Session": 1
        }
    ],
    "message": "Data fetched successfully!",
    "uri": "/api/leave/v2/holidays/get",
    "status": 1
}