API Details
Particulars | Description |
API Name | Leave Details |
Method | POST |
URL | https://portal.zinghr.com/2015/route/LMS/Employeeleavedetails |
Description | This API returns every employee’s leave summary on opening & closing balance of different leave types |
Input format | JSON |
Output format | JSON |
Input
Property Name | Data Type | Description | Mandatory | Remarks |
SubscriptionName | string | Subscription name of the account | Yes | Max length = 10 characters |
Token | string | Security check. To verify the account and request | Yes | |
Actionfromdate | string | For shift details starting from the mentioned date Date format: dd-mm-yyyy | Optional | |
Actiontodate | string | For shift details till the mentioned date Date format: dd-mm-yyyy | Optional | |
Leavetypecode | string | If specified then API returns details for the leave type that is passed. | Optional | |
EmployeeCode | string | Returns leave summary for the specific employee. Only one employee code can be passed at a time | Optional |
Response
Property Name | Data Type | Description |
Message | string | Response message from the server |
Code | int | Response code from the server |
EmployeeLeaveDetails | array | List of Employee Leave Details |
Response Code and Message
Code | Message | Remarks |
1 | Success | Successful API call |
2 | Employee not found | Employee code passed in parameter could not find an employee in the system |
3 | Invalid Token | The token passed in the API did not match the token in the system. Validate the token from the Setup Circle in ZingHR portal |
4 | Internal Server Error | The API execution faced an unexpected error |
5 | Invalid date format | Use date format as dd-mm-yyyy |
6 | Token expired | The token is expired and needs to be generated again. Token can be generated from the Setup Circle in ZingHR portal |
Employee Leave Details
Property Name | Data Type | Description |
EmployeeCode | string | Employee code of the employee as in the system |
LeaveTypeCode | string | Leave type code of the leave in the system |
LeaveTypeDesc | string | Leave type description as mentioned in the system |
LeaveOpening | string | Opening leave balance of the particular leave type for the employee |
LeaveClosing | string | Closing leave balance of the particular leave type for the employee |
LeaveTaken | string | Total leaves of this leave type availed by the employee |