Get Records API (V2)
Purpose:
This API is used to fetch leave records.
Request URL:
https://people.zoho.com/api/v2/leavetracker/leaves/records
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Request Method:
GET
Request Parameters:
Parameter Name | Values Allowed | Default Value | Description |
portalID | String | - | ZSOID of People Org |
from* | String | - | date filter from date |
to* | String | - | date filter to date |
dateFormat | String | {Zoho People date format} | Date format of the date in the request parameters, Same format will be maintained in the response If the date format is different for Zoho People date format, then this parameter is mandatory |
startIndex | integer | 0 | Specify from which Index the records has to be fetched |
limit | integer(0-200) | 200 | Specify the number of records to be fetched |
employee | JSONArray | - | erecnos of the employee |
leavetype | JSONArray | - | ids of leavetypes |
approvalStatus | JSONArray | - | Array of Strings Allowed Values: APPROVED, |
dataSelect | String | MINE | MINE SUB. DIRSUBS, MINE,SUBS ALL |
Note:
- A maximum of 200 records per request can 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/api/v2/leavetracker/leaves/records
Header
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Sample Response:
Copied{
"records": {
"140333000000564013": {
"Zoho.ID": 140333000000564013,
"From": "08-May-2024",
"Leavetype.ID": 140333000000511001,
"Unit": "Days",
"ApprovalStatus": "Approved",
"Reason": "Family medical",
"Type": "PAID",
"Employee": "Steve Paul",
"Leavetype": "Family and Medical Leave (FMLA)",
"Days": {
"08-May-2024": {
"LeaveCount": "1.0",
}
},
"DateOfRequest”:”10-May-2024",
"TeamEmailID": "people-noreply@zohocorp.com",
"To": "08-May-2024",
"ZUID": 79330419,
"Employee.ID": 140333000000326003
},
"140333000000564043": {
"Type": "PAID",
"Employee": "Steve Paul",
"Leavetype": "Casual Leave",
"Days": {
"06-May-2024": {
"LeaveCount": "0.5",
"EndTime": "04:00",
"StartTime": "00:00",
"Session": 1
},
"07-May-2024": {
"LeaveCount": "0.25",
"EndTime": "04:00",
"StartTime": "02:00",
"Session": 2
}
},
"DateOfRequest”:”10-May-2024”,
"TeamEmailID": "people-noreply@zohocorp.com",
"Zoho.ID": 140333000000564043,
"From": "06-May-2024",
"To": "07-May-2024",
"Leavetype.ID": 140333000000326070,
"ZUID": 79330419,
"Unit": "Days",
"ApprovalStatus": "Approved",
"Employee.ID": 140333000000326003
},
"140333000000564065": {
"Zoho.ID": 140333000000564065,
"From": "09-May-2024",
"Leavetype.ID": 140333000000515001,
"Unit": "Hours",
"ApprovalStatus": "Approved",
"Reason": "Permission",
"Type": "PAID",
"Employee": "Steve Paul",
"Leavetype": "Hours",
"Days": {
"09-May-2024": {
"LeaveCount": "240.0",
"EndTime": "15:00",
"StartTime": "11:00",
"Session": 4
}
},
"DateOfRequest”:”10-May-2024”,
"TeamEmailID": "people-noreply@zohocorp.com",
"To": "09-May-2024",
"ZUID": 79330419,
"Employee.ID": 140333000000326003
}
}
}