API Reference
API Reference

/timeoff/approvals/:key

Approves or rejects a pending time off approval. Required scope: w_timeoff.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The :key is the id of a pending approval returned in the pending_approvals array of POST /timeoff/requests or GET /timeoff/requests.

Token behaviour

User token — identifies a specific user. member_id is not required (the user represented by the token is the actor). approver_id is optional; when omitted it defaults to the member represented by the token. Users may only act on their own approval step (i.e. approver_id, if supplied, must correspond to the user represented by the token), unless they have the time off approval override permission. In that case, they may provide any approver_id corresponding to a valid approver for the approval.

Account token — both member_id and approver_id are required. member_id identifies the member performing the action (retrieved from GET /members) and must belong to the account. approver_id identifies the approver whose pending step is being acted upon. When the actor and the approver are the same member, include both fields in the request body with that member's id.

Response

Returns the updated time off request, including the remaining pending_approvals after this action was processed.

{
  "id": "4d3",
  "employee_id": "4d3",
  "from_date": "2026-03-03T00:00:00.000",
  "to_date": "2026-03-03T00:00:00.000",
  "formatted_period": "03 March 2026",
  "state": "pending",
  "requesting_total": 1,
  "timeoff_tracking_unit": "full_days",
  "half_days": [],
  "updated_by": "Foo Bar",
  "category_name": "Sick Leave",
  "pending_approvals": [
    {
      "id": "4d4",
      "approver_id": "1839d70f-7caa-4f02-9e3f-c46cced76f5b"
    }
  ]
}

employee_id is the SPI key of the employee the request belongs to.

pending_approvals will be empty when no further approvals are required (e.g. after the final approval or after a rejection).

Error responses

StatusCondition
400approver_id does not match the user token and the user lacks approval override permission, or request body is invalid
402Account does not have the time off feature enabled
403Missing w_timeoff scope
404Approval not found, or (account token) approver_id is not a member of the account, or approval does not belong to that approver
409Approval is already in a final state (approved or rejected)
422Token account does not match the request's account
Path Params
string
required

SPI key of the approval (id from the pending_approvals array)

Body Params
string

Identifier of the approver whose pending step is being acted upon. Optional for user tokens — when omitted, defaults to the member represented by the token. Required for account tokens.

string

Identifier of the member performing the action, retrieved from GET /members. Required for account tokens; must belong to the account. Not needed for user tokens (the token's member is used as the actor). When the actor and the approver are the same member, supply both member_id and approver_id with that member's id.

string
required

New approval state. One of: approved, rejected

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json