Approve or Reject Leave Request
Approves or rejects one pending leave request of a staff member. Shared rules: see Writing data. No Payroll plan is needed.
- Find the request with List Leave Requests (
GET /requests/leave). Send itsfrom_date. - Only pending requests can be decided. Revoke is not available.
actionisAPPROVEorREJECT.reasonis optional, at max 500 characters, trimmed.statusin the response isapproved,declined, orpendingwhen a multi-level approval flow still needs a later level. An Admin’s approval finishes all levels. A reject ends the request.- Approving overwrites attendance on those dates, uses leave balance, recalculates payroll for them, and notifies the staff member.
- If no pending request matches
from_date, the response is404“Leave request not found.” If more than one pending request starts that day, the response is400onfrom_date(“Decide them in the SalaryBox app.”). Approving after salary is finalised gives400“Cannot modify leave request after finalizing salary.” You cannot decide your own request (400onsalarybox_id). A request that is not pending at your approval level gives403. - Repeating the request after it succeeded returns
404, which is harmless.
Authentication
AuthorizationApi-Key
Format: “Api-Key {api-key}”
Path parameters
salarybox_id
SalaryBox ID of the staff member who raised the request.
Request
This endpoint expects an object.
from_date
YYYY-MM-DD. The from_date of the pending request.
action
Allowed values:
reason
Response
The decision was saved.
message
status
data
Errors
400
Bad Request Error
403
Forbidden Error
404
Not Found Error
