API Details

ParticularsDescription
API NameLeave Transaction
MethodPOST
URLhttps://portal.zinghr.com/2015/route/LMS/Employeeleavetransactions
Description
This API returns details of the employee’s leave applications and approver details
Input format
JSON
Output format
JSON



Input

Property NameData TypeDescriptionMandatoryRemarks
SubscriptionName
string
Subscription name of the account
Yes
Max length = 10 characters
TokenstringSecurity 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
stringFor shift details till the mentioned date
Date format: dd-mm-yyyy
Optional

Leavetypecode
stringIf 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
Actiontype
string
If specified then API returns details for only those leave types based on the Action value passed.
Possible values: Applied, Approved, Cancelled, Rejected
Optional



Response

Property NameData TypeDescription
MessagestringResponse message from the server
CodeintResponse code from the server
EmployeeLeaveTransactions
array
List of Employee Leave Transactions



Response Code and Message

CodeMessageRemarks
1Success
Successful API call
2
Employee not found
Employee code passed in parameter could not find an employee in the system
3Invalid 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
4Internal Server Error
The API execution faced an unexpected error
5Invalid date format
Use date format as dd-mm-yyyy
6Token expired
The token is expired and needs to be generated again. Token can be generated from the Setup Circle in ZingHR portal



Employee Leave Transactions

Property NameData TypeDescription
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
Applicationfromdate
string
Starting date of the leave as mentioned in leave application
Applicationtodate
string
End date of the leave as mentioned in leave application
Status
string
Leave status on today
Numberofdays
float
Number of days for which leave is applied
Reason
string
Reason for leave application
Remarks
string
Remarks as mentioned in leave application
Approver1code
string
Employee code of the first level approver for leave applications of the employee
Approver2code
string
Employee code of the second level approver for leave applications of the employee
Approver3code
string
Employee code of the third level approver for leave applications of the employee