v1

latestOpenAPI 3.1.02026-08-04821427.6 KB

/timeoff/approvals/:key

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

patch/timeoff/approvals/{key}

Path parameters

keystring required

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

Request body

approver_idstring

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.

member_idstring

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.

statestring required

New approval state. One of: approved, rejected

Response

200

idstring
employee_idstring

SPI key of the employee the request belongs to

from_datestring
to_datestring
formatted_periodstring
statestring
requesting_totalinteger
timeoff_tracking_unit'full_days' | 'half_days' | 'hours'
updated_bystring
category_namestring

Example response

{
  "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",
  "updated_by": "Foo Bar",
  "category_name": "Sick Leave",
  "pending_approvals": [
    {
      "id": "4d4",
      "approver_id": "1839d70f-7caa-4f02-9e3f-c46cced76f5b"
    }
  ]
}