Get Leave Record API
Get leave records using API
Request URL:
Header:
Authorization:Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf
Request Method:
GET
Request Parameters:
Parameter Name | Values Allowed | Default Value | Description |
portalId | String | - | ZSOID of People org This is mandatory for ISC access |
from* | String | - | date filter from date |
to* | String | - | date filter to date |
zuid* | long | - | zuid, Mandatory for isc authorization |
dateFormat | String | - | Date format of the date in the request parametersm Same format will be maintained in the response |
startIndex | integer | 0 | from which index the records has to fetched |
limit | integer(0-200) | 200 | no of records to be fethed |
employee | JSONArray | - | erecnos of the employee |
leavetype | JSONArray | - | ids of leavetypes |
approvalStatus | JSONArray | - | Array of Strings Allowed Values APPROVED, PENDING. CANCELLED, REJECTED |
dataSelect | String | MINE | MINE, SUB, DIRSUBS, MINE, SUBS, ALL |
Points to consider for integration:
- Some rare case scenarios will not have start time and end time for day-based
leave, Add the session details in the text "Casual (1st half)" for the event name. - A maximum of 200 records per request can be fetched.
Threshold Limit: 300 requests | Lock period: 5 minutes
Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.
JSON Request URL:
Copiedhttps://people.zoho.com/people/api/v2/leavetracker/leaves/records
Header:
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Response:
Copied{
"records": {
"100002000000188009": {
"Employee": "Christine Spalding",
"Leavetype": "Casual",
"Days": {
"26-Jan-2023": {
"LeaveCount": "0.25",
"EndTime": "18:00",
"StartTime": "15:00",
"Session": 4
},
"27-Jan-2023": {
"LeaveCount": "0.5",
"EndTime": "13:00",
"StartTime": "09:00",
"Session": 1
},
"25-Jan-2023": {
"LeaveCount": "0.5",
"EndTime": "18:00",
"StartTime": "13:00",
"Session": 2
}
},
"Zoho.ID": 100002000000188009,
"ZUID": 4338264,
"From": "25-Jan-2023",
"To": "27-Jan-2023",
"Unit": "Days",
"ApprovalStatus": "Approved",
"Employee.ID": 100002000000031745
},
"100002000000195029": {
"Employee": "keerthana.nagarajan+usertami6 N",
"Leavetype": "M Accrual",
"Days": {
"08-Feb-2023": {
"LeaveCount": "1.0",
"EndTime": "18:00",
"StartTime": "09:00"
}
},
"Zoho.ID": 100002000000195029,
"ZUID": 4338264,
"From": "08-Feb-2023",
"To": "08-Feb-2023",
"Unit": "Days",
"ApprovalStatus": "Approved",
"Employee.ID": 100002000000031745
},
"100002000000198001": {
"Employee": "keerthana.nagarajan+usertami6 N",
"Leavetype": "Casual",
"Days": {
"10-Feb-2023": {
"LeaveCount": "0.5",
"EndTime": "13:00",
"StartTime": "09:00",
"Session": 1
}
},
"Zoho.ID": 100002000000198001,
"ZUID": 4338264,
"From": "10-Feb-2023",
"To": "10-Feb-2023",
"Unit": "Days",
"ApprovalStatus": "Approved",
"Employee.ID": 100002000000031745
},
"100002000000195001": {
"Employee": "keerthana.nagarajan+usertami6 N",
"Leavetype": "Casual",
"Days": {
"06-Feb-2023": {
"LeaveCount": "1.0",
"EndTime": "18:00",
"StartTime": "09:00"
}
},
"Zoho.ID": 100002000000195001,
"ZUID": 4338264,
"From": "06-Feb-2023",
"To": "06-Feb-2023",
"Unit": "Days",
"ApprovalStatus": "Approved",
"Employee.ID": 100002000000031745
},
"100002000000198027": {
"Employee": "keerthana.nagarajan+usertami6 N",
"Leavetype": "Sick",
"Days": {
"15-Feb-2023": {
"LeaveCount": "0.5",
"EndTime": "18:00",
"StartTime": "13:00",
"Session": 2
}
},
"Zoho.ID": 100002000000198027,
"ZUID": 4338264,
"From": "15-Feb-2023",
"To": "15-Feb-2023",
"Unit": "Days",
"ApprovalStatus": "Approved",
"Employee.ID": 100002000000031745
}
}
}