^Login

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.

Actionget_leave
Business key accessPayroll: 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:

FieldValue
mk_actionget_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:

FieldWhat it is
LRIDThe leave request's ID in Microkeeper
eusername, EID, EmployeeIDThe employee: their username, Microkeeper ID, and your software's ID for them (null or blank if not set)
firstname, lastnameThe employee's name
typeThe leave type. See below
start_date, start_time, end_date, end_timeWhen the leave starts and ends. A full day runs from 00:00:00 to 23:59:00
statusWhere the request is up to. See below
dr_cert"1" if the employee said they'll provide a medical certificate
whoThe username of whoever last approved or declined the request
file_countThe number of files attached, such as a medical certificate

Status

statusMeaning
7Pending approval
8Approved
9Approved and paid in a pay run
6The employee asked to cancel it, pending approval
5Declined
4Removed 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

typeLeave
alAnnual Leave
sickPersonal Leave
lslLong Service Leave
rdoRostered Day Off
toilTime Off In Lieu
offUnpaid Leave
comCompassionate Leave
studStudy Leave
wfhWorking From Home
uplUnpaid Parental Leave
pplPaid Parental Leave
juryJury 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 no data.
  • Leave API - missing field - both start_date and end_date fields are required
  • start_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.