Skip to navigation

List Leave Requests

Returns leave requests, newest first. By default only requests waiting for a decision; use status for decided ones too. With salarybox_ids and status=all you get one staff member’s full leave history.

Each item has:

  • status: pending, approved, partially_approved, declined, cancelled or revoked.
  • action_by, action_on, action_reason: who decided the request, when and why. null while pending; action_by is also null when SalaryBox approved it automatically. On a multi-level flow, action_by is whoever acted last.
  • approval_flow: null if the staff member was never on a multi-level flow. Otherwise the flow name and its levels, each with approvers, the action taken (APPROVED, REJECTED, SKIPPED, AUTO_APPROVED or null), action_by, action_on, action_reason, and is_current (the level a pending request waits on). approvers shows who can act today, which can differ from when the request was made.

Authentication

AuthorizationApi-Key

Format: “Api-Key {api-key}”

Query parameters

statusenumOptionalDefaults to current

Which requests to return. Defaults to current.

  • current: waiting for a decision.
  • approved: fully approved.
  • partially_approved: approved with day-by-day changes, for example only some of the requested days.
  • declined: rejected by an approver before it was approved.
  • cancelled: withdrawn by the staff member while pending.
  • revoked: approved, then reversed by an admin.
  • all: every status.
salarybox_idslist of stringsOptional

Repeatable. Limits the result to these staff members, for example salarybox_ids=SBK7Q2M9TX&salarybox_ids=SBK3H8D1LP.

pageintegerOptional
Page number, starting at 1.
page_sizeintegerOptional
Results per page. Default and maximum 500.

Response

datalist of objects
messagestring
statusboolean
countinteger
prevstring or null
nextstring or null

Errors

400
Bad Request Error