The Leaves API handles the full lifecycle of employee time-off requests — from initial submission by the employee, through manager review and resolution, to optional escalation for HR oversight. Results are automatically scoped by the caller’s role so that employees see only their own requests, managers see their team’s queue, and admins see everything.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Paramount-Intelligence/HR_Monitoring_System/llms.txt
Use this file to discover all available pages before exploring further.
All endpoints are prefixed with
/api/v1/leaves and require an Authorization: Bearer <token> header. Dates are plain YYYY-MM-DD strings; timestamps are ISO-8601 UTC.Enum Reference
Leave Type
| Value | Description |
|---|---|
sick | Medical or health-related absence. |
casual | Short personal leave for everyday matters. |
annual | Pre-planned annual leave entitlement. |
half_day | Either the first or second half of a working day. Set is_half_day: true and supply half_day_period. |
wfh | Work-from-home day tracked through the leave system. |
Leave Status
| Value | Description |
|---|---|
pending | Submitted and awaiting manager action. |
approved | Approved by the authorised approver. |
rejected | Declined; manager_comment contains the reason. |
escalated | Escalated to a senior approver. |
cancelled | Cancelled by the submitting employee. |
needs_clarification | Approver has requested more detail from the employee. |
Half-Day Period
| Value | Description |
|---|---|
first_half | Morning half of the working day. |
second_half | Afternoon half of the working day. |
Approval Action (for resolve)
| Value | Description |
|---|---|
approved | Grant the request. |
rejected | Decline the request. A manager_comment is required. |
escalated | Escalate to the next approver. A manager_comment is required. |
cancelled | Cancel the request (used by the approver to withdraw). |
clarified | Mark that clarification has been provided. |
POST /leaves
Submit a new leave, WFH, or half-day request. The system routes the request to the employee’s direct manager as the initial approver. Auth: Any authenticated user.Request Body
First day of requested leave. Format:
YYYY-MM-DD.Last day of requested leave. Format:
YYYY-MM-DD. Must be equal to or after start_date.Type of request:
sick, casual, annual, half_day, or wfh.Explanation for the request. Required by the approval workflow.
Set to
true when requesting only half a day. Default: false.Required when
is_half_day is true. Must be first_half or second_half.Response Fields
Returns the newly createdLeaveRequestRead object with status: "pending" and current_approver_id pointing to the employee’s manager.
Unique request identifier.
UUID of the employee who submitted the request.
Resolved display name of the requesting employee.
First day of the requested leave (
YYYY-MM-DD).Last day of the requested leave (
YYYY-MM-DD).One of the leave type enum values listed above.
Current request status (see status table above).
true when the request covers only half a working day.Which half:
first_half or second_half. Present only when is_half_day is true.Employee-supplied explanation for the request.
Reviewer’s note attached during resolution; required when rejecting or escalating.
UUID of the user whose action is currently awaited.
UUID of the approver the request was escalated from.
Timestamp of escalation, if applicable.
Number of times this request has been escalated.
ISO-8601 UTC submission timestamp.
ISO-8601 UTC last-update timestamp.
Example — Full-day sick leave
Example — Half-day
GET /leaves/me
Retrieve the authenticated employee’s own leave request history, ordered by submission date descending. Auth: Any authenticated user.Response Fields
Returns an array ofLeaveRequestRead objects. See POST /leaves for the full field list.
Example
GET /leaves/pending
Return the list of leave requests currently awaiting the authenticated user’s approval action. This is the primary data source for a manager’s or HR admin’s approval inbox. Auth: Any authenticated user. Returns only requests wherecurrent_approver_id matches the caller’s UUID.
Response Fields
Returns an array ofLeaveRequestRead objects with status: "pending" or status: "needs_clarification".
Example
PATCH /leaves//resolve
Approve, reject, escalate, or take another action on a pending leave request. The caller must be thecurrent_approver_id on the request, or hold an admin or hr_operations role. Employees cannot approve their own requests.
Auth: Manager, Team Lead, Admin, or HR Operations. Self-approval is explicitly blocked.
Path Parameters
UUID of the leave request to resolve.
Request Body
Resolution decision. One of:
approved, rejected, escalated, cancelled, clarified.Reviewer note. Required when
action is rejected or escalated; optional for other actions.Response Fields
Returns the updatedLeaveRequestRead with the new status and manager_comment.
Example — Approve
Example — Reject with required comment
POST /leaves//cancel
Cancel a pending leave request. Only the employee who submitted the request may cancel it. Auth: Any authenticated user (own requests only).Path Parameters
UUID of the leave request to cancel.
Response Fields
Returns the updatedLeaveRequestRead with status: "cancelled".
Example
GET /leaves//timeline
Retrieve the full approval timeline for a leave request, listing every action taken in chronological order. Auth: Any authenticated user (RBAC-scoped).Path Parameters
UUID of the leave request.
Response Fields
Returns an array ofApprovalTimelineRead objects.
Unique timeline event identifier.
UUID of the user who performed this action.
Display name of the actor.
Action taken:
created, clarified, approved, rejected, escalated, or cancelled.Comment attached to this action.
ISO-8601 UTC timestamp of the action.
Example
Standard Error Response
400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found.