API Leave
The get_leave action returns the leave requests that overlap a date range, with each request's type, dates and status. Use it to show approved leave in your rostering software, or to plan around pending requests.
| Action | get_leave |
|---|---|
| Business key access | Payroll: Read Only |
Before you start, make your keys and test your connection: see Microkeeper API.
Get leave requests
Send a date range. Every request that starts, ends or runs through the range is returned. For a current view, go back a month and forward six:
| Field | Value |
|---|---|
mk_action | get_leave |
mk_data | {"start_date":"2026-09-21","end_date":"2027-04-21"} |
Response
{
"success": "1",
"authenticated": "1",
"message": "Leave data",
"data": {
"leave": [
{
"LRID": "105195",
"eusername": "ava_patel",
"EID": "53613",
"EmployeeID": null,
"firstname": "Ava",
"lastname": "Patel",
"type": "off",
"start_time": "00:00:00",
"start_date": "2026-11-17",
"end_time": "23:59:00",
"end_date": "2026-11-17",
"status": "8",
"dr_cert": "0",
"who": "mia_chen",
"file_count": 0
},
{
"LRID": "105196",
"eusername": "amelia_brown",
"EID": "53529",
"EmployeeID": "MEL-F-012",
"firstname": "Amelia",
"lastname": "Brown",
"type": "sick",
"start_time": "00:00:00",
"start_date": "2026-10-19",
"end_time": "23:59:00",
"end_date": "2026-10-19",
"status": "7",
"dr_cert": "1",
"who": "",
"file_count": 1
}
]
}
}Requests are listed by start date, latest first:
| Field | What it is |
|---|---|
LRID | The leave request's ID in Microkeeper |
eusername, EID, EmployeeID | The employee: their username, Microkeeper ID, and your software's ID for them (null or blank if not set) |
firstname, lastname | The employee's name |
type | The leave type. See below |
start_date, start_time, end_date, end_time | When the leave starts and ends. A full day runs from 00:00:00 to 23:59:00 |
status | Where the request is up to. See below |
dr_cert | "1" if the employee said they'll provide a medical certificate |
who | The username of whoever last approved or declined the request |
file_count | The number of files attached, such as a medical certificate |
Status
status | Meaning |
|---|---|
7 | Pending approval |
8 | Approved |
9 | Approved and paid in a pay run |
6 | The employee asked to cancel it, pending approval |
5 | Declined |
4 | Removed by the employee |
Every status is returned. To show only leave that's going ahead, keep 8 and 9; add 7 to include pending requests.
Leave types
type | Leave |
|---|---|
al | Annual Leave |
sick | Personal Leave |
lsl | Long Service Leave |
rdo | Rostered Day Off |
toil | Time Off In Lieu |
off | Unpaid Leave |
com | Compassionate Leave |
stud | Study Leave |
wfh | Working From Home |
upl | Unpaid Parental Leave |
ppl | Paid Parental Leave |
jury | Jury Duty Leave |
An account can add its own leave types, with their own codes of up to 4 characters.
Messages
No leave data found for date range supplied: there are no requests in the range. The response has"success":"1"and nodata.Leave API - missing field - both start_date and end_date fields are requiredstart_date must be before or equal to end_date
Add or change leave
Staff request leave in Microkeeper, from the app or Employee Console, and managers approve it there: see Requesting Leave. Read requests again with get_leave to pick up changes.