Approvals
Manage approval requests for join requests, salary changes, role transfers, and more.
Get All Approvals
/api/approvalsGet all pending approval requests for the current user.
Requests where you are the assigned approver are always yours. As an HR or admin you additionally see company-wide requests raised by non-HR members — except document-letter, which is region-scoped: you only see letters from your own region, with a user who has no regionLabel resolving to the main office. If your region has nobody holding an approver role, the company-wide list is returned instead rather than leaving you with an empty inbox. quit-company requests are never region-scoped.
As a nominated co-approver you get a separate inbox entry for every document letter whose signatories[] still has a pending row for you. The letter is listed from the moment it is created, not only once HR issues it, so the “you may sign later” notification always links to something. Two fields decorate those entries: signatoryView is always true and tells the client to render signature actions instead of approve/reject, and signatureReady says whether /letter/[id] already renders without ?draft=1. It is not an access gate — signing is open before issuance.
Update Approval
/api/approvals/[id]Approve or reject an approval request, or record an optional co-signature.
status and sign are mutually exclusive. Sending sign takes an early return before any status transition, so a co-approver can never approve, reject or otherwise advance a request — see Documents for the full co-signing flow.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | Request ID (path param) |
status | string | Required | New status (approved/hr-approved/rejected) |
force | boolean | Optional | Force approval (skip workflow) |
reason | string | Optional | Rejection reason |
salaryAmount | number | Optional | Approved salary (for salary requests) |
salaryCurrency | string | Optional | Currency (for salary requests) |
letterContent | string | Optional | Letter content (for letter requests) |
signed | boolean | Optional | Mark as signed |
sign | boolean | Optional | Record an advisory co-signature on a document letter. true signs, false declines |
The sign branch is only valid for kind: "document-letter" (400 otherwise) and requires the caller to hold a pending signatories row on the request, otherwise 403. Signing is open while the letter is pending, hr-approved or approved; any other status is 409, since a rejected letter will never be issued. A signature given before HR approves is retained and appears on the letter once it is issued, and the requester is notified either way — with an extra “All signatures complete” notification when the last outstanding signature resolves. A decline counts as resolved, so a declined co-approver never leaves the letter reading as still waiting. Co-signatures never block, delay or revert issuance: HR is the only gate.