Leave Requests
Manage Leave Request
Approve, reject, or withdraw leave requests
POST
Overview
Managers can approve or reject pending leave requests. Employees can withdraw their own pending requests. These actions update the request status and trigger balance adjustments.Approve leave request
Managers approve pending leave requests, which deducts the days from the employee’s leave balance.Endpoint
POST /leave-requests/{id}/approve
Authentication
Requires authentication with Bearer token. Available to:- SuperAdmin
- HR Manager
- Manager
Path parameters
string
required
UUID of the leave request to approve
Response
boolean
Indicates if the approval was successful
object
Updated leave request with approved status
Reject leave request
Managers can reject pending leave requests with a mandatory rejection reason.Endpoint
POST /leave-requests/{id}/reject
Authentication
Requires authentication with Bearer token. Available to:- SuperAdmin
- HR Manager
- Manager
Path parameters
string
required
UUID of the leave request to reject
Request body
string
required
Explanation for rejecting the leave request. This will be visible to the employee.
Response
boolean
Indicates if the rejection was successful
object
Updated leave request with rejected status and rejection reason
Withdraw leave request
Employees can withdraw their own pending leave requests before manager approval.Endpoint
POST /leave-requests/{id}/withdraw
Authentication
Requires authentication with Bearer token. Available to:- Employee (own requests only)
- Manager (own requests only)
Path parameters
string
required
UUID of the leave request to withdraw
Response
boolean
Indicates if the withdrawal was successful
object
Updated leave request with withdrawn status
Approval workflow
Understand how leave requests move through the approval process:1
Employee submits request
Leave request is created with
pending status. Employee’s leave balance shows the days as “pending.”2
Manager reviews
Manager can approve or reject the request. Employees can withdraw at this stage.
3
Approval
When approved:
- Status changes to
approved - Days are deducted from available balance
approvedByandapprovedAtfields are populated- Employee receives confirmation
4
Rejection
When rejected:
- Status changes to
rejected - Pending days return to available balance
rejectionReasonis recorded- Employee can submit a new request