KalHR logo

API reference

Leave

List leave requests, read one request with its documents and relievers, read an employee's balance, and list leave types.

All four endpoints need Leave: View.

Leave statuses

A request's status is a number in leaveStatusId and a name in leaveStatus. To filter, send either: LeaveStatus=Approved or LeaveStatus=2.

leaveStatusIdleaveStatusMeaning
0SubmittedAsked for, no decision yet
1PendingApproved by some approvers, waiting for the rest
2ApprovedApproved
3RejectedRejected
4AbandonedWithdrawn by the employee or HR
5ExpiredNot decided in time

List leave requests

GET/v1/leaverequest/listKey needs Leave: View

Returns your organisation's leave requests, a page at a time, newest first.

Query parameters

ParameterTypeDefaultDescription
PageNumberinteger1The page to return
PageSizeinteger25Requests per page
CompanyIduuidOnly this company's employees. Ids come from Companies.
DepartmentIduuidOnly employees in this department
LeaveTypeIduuidOnly this leave type
LeaveStatusname or integerOnly this status, such as Approved
StartDate, EndDatedateOnly leave starting between these dates, as YYYY-MM-DD. Send both.
SearchTermstringMatches the employee's name or email, or the leave type's name
OrderByinteger10 oldest first, 1 newest first
GET v1/leaverequest/list
curl "https://api.kalhr.com/v1/leaverequest/list?LeaveStatus=Approved&StartDate=2026-11-01&EndDate=2026-11-30" \
  -H "Authorization: Bearer $KALHR_API_KEY"

Response

{
  "isSuccessful": true,
  "code": "00",
  "message": "Success",
  "data": {
    "data": [
      {
        "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
        "employeeId": "4b9d2c1e-7a3f-4e8b-9c21-5d6e7f8a9b0c",
        "employeeName": "Ada Okafor",
        "leaveTypeName": "Annual leave",
        "startDate": "2026-11-02T00:00:00",
        "endDate": "2026-11-06T00:00:00",
        "leaveStatusId": 2,
        "leaveStatus": "Approved",
        "comments": "Family trip",
        "requestedOn": "2026-10-14T08:02:55.381",
        "days": 5
      }
    ],
    "pageNumber": 1,
    "pageSize": 25,
    "totalRecords": 1,
    "totalPages": 1
  }
}
FieldTypeDescription
iduuidThe leave request's id
employeeId, employeeNameuuid, stringWho asked
leaveTypeNamestringThe leave type
startDate, endDatedateFirst and last day off (calendar dates)
daysintegerWorking days requested: weekends, the employee's days off and holidays aren't counted
leaveStatusId, leaveStatusinteger, stringSee the table above
commentsstringThe employee's note
requestedOndatetimeWhen it was asked for (UTC)

Get a leave request

GET/v1/leaverequest/details/{id}Key needs Leave: View

Returns one request with the employee's role and department, supporting documents and relievers.

GET v1/leaverequest/details/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
curl "https://api.kalhr.com/v1/leaverequest/details/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d" \
  -H "Authorization: Bearer $KALHR_API_KEY"

Response

{
  "isSuccessful": true,
  "code": "00",
  "message": "Success",
  "data": {
    "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "employeeId": "4b9d2c1e-7a3f-4e8b-9c21-5d6e7f8a9b0c",
    "firstName": "Ada",
    "lastName": "Okafor",
    "employeeName": "Ada Okafor",
    "workMode": "Hybrid",
    "jobRoles": ["Payroll Officer"],
    "department": ["Finance"],
    "leaveTypeName": "Annual leave",
    "startDate": "2026-11-02T00:00:00",
    "endDate": "2026-11-06T00:00:00",
    "leaveStatusId": 2,
    "leaveStatus": "Approved",
    "comments": "Family trip",
    "requestedOn": "2026-10-14T08:02:55.381",
    "days": 5,
    "documents": [],
    "relievers": [{ "id": "7e21a9c0-…", "fullName": "Tunde Bello", "email": "tunde.bello@acme.ng" }],
    "handoffNote": "Payroll inputs are in the shared drive."
  }
}

Besides the list's fields:

FieldTypeDescription
firstName, lastNamestringThe employee's name
workModestringRemote, Onsite or Hybrid (a name here, not a number)
jobRolesstring arrayJob role titles
departmentstring arrayDepartment names
documentsarraySupporting documents: id, name, mime and document. document is a link when storage is 0; when it is 1 the file is private and opens only in KalHR.
relieversarrayColleagues covering: id, fullName, email
handoffNotestringThe employee's handover note

Get a leave balance

GET/v1/leavebalance/get-leave-balanceKey needs Leave: View

How many days of one leave type an employee has, has taken and has left this year.

ParameterTypeDescription
EmployeeIduuidRequired. The employee's id
LeaveTypeIduuidRequired. The leave type's id, from List leave types
GET v1/leavebalance/get-leave-balance
curl "https://api.kalhr.com/v1/leavebalance/get-leave-balance?EmployeeId=4b9d2c1e-7a3f-4e8b-9c21-5d6e7f8a9b0c&LeaveTypeId=c0ffee00-1234-4abc-9def-0123456789ab" \
  -H "Authorization: Bearer $KALHR_API_KEY"

Response

{
  "isSuccessful": true,
  "code": "00",
  "message": "Success",
  "data": {
    "totalDays": 20,
    "daysTaken": 5,
    "daysRemaining": 15,
    "leavePending": 3,
    "leaveRejected": 0
  }
}
FieldTypeDescription
totalDaysintegerDays allowed this year
daysTakenintegerDays of approved leave deducted
daysRemainingintegerDays left to request
leavePendingintegerWorking days in this year's requests still waiting for a decision
leaveRejectedintegerWorking days in rejected requests this year

An employee who has never had this leave type's balance set up gets the type's full allowance, with nothing taken. An employee or leave type outside your organisation answers isSuccessful: false.

List leave types

GET/v1/leavetype/listKey needs Leave: View

Query parameters

ParameterTypeDefaultDescription
PageNumberinteger1The page to return
PageSizeinteger25Leave types per page
CompanyIduuidOnly this company's
SearchTermstringPart of the name
IsActivebooleanOnly active (true) or inactive (false) types
EligibilityCriteriainteger0 organisation, 1 company, 2 department, 3 unit, 4 named employees
GET v1/leavetype/list
curl "https://api.kalhr.com/v1/leavetype/list?IsActive=true" \
  -H "Authorization: Bearer $KALHR_API_KEY"

Response

{
  "isSuccessful": true,
  "code": "00",
  "message": "Success",
  "data": {
    "data": [
      {
        "id": "c0ffee00-1234-4abc-9def-0123456789ab",
        "name": "Annual leave",
        "description": "Paid annual leave",
        "maxLeaveDays": 20,
        "carryForward": { "maxCarryForwardLimit": 5, "expirationDate": 2 },
        "eligibilityCriteria": 0,
        "requiresDocument": false,
        "requiredDocument": [],
        "isActive": true,
        "created": "2025-01-06T10:00:00"
      }
    ],
    "pageNumber": 1,
    "pageSize": 25,
    "totalRecords": 4,
    "totalPages": 1
  }
}
FieldTypeDescription
id, name, descriptionuuid, string, stringThe leave type
maxLeaveDaysintegerDays a year
carryForwardobjectmaxCarryForwardLimit days, carried days expiring in expirationDate (month: 0 January … 11 December)
eligibilityCriteriaintegerWho it covers (see the parameter above)
requiresDocument, requiredDocumentboolean, arrayWhether a document must be attached, and its templates (id, name, document)
isActivebooleanWhether it can be requested
created, lastModifieddatetimeUTC
  • Event catalogue: leave.requested, leave.approved, leave.rejected, leave.cancelled

Last updated October 19, 2026

Missing an endpoint or an event?

Tell us what you're building. The API grows from what integrators ask for.

See KalHR in action - 30 min demo