Rightwork OG Image
Browse API documentation
API docsWorkforce API v1

Time-off requests

Get leave requests that overlap a date range. Filter by employee, leave type, or approval status.

Request

GET /api/external/v1/time-off-requests

Required scope: time_off:read. Set up your key and base URL before running this example.

Shell
curl --fail-with-body \
  -H "Authorization: Bearer $RIGHTWORK_API_KEY" \
  -H "Accept: application/json" \
  "$RIGHTWORK_BASE_URL/api/external/v1/time-off-requests?date_from=2026-09-01&date_to=2026-10-01"

Parameters

ParameterRequiredHow to use it
page_sizeNoRecords per page (1–500, default 100).
cursorNoPass the previous page’s meta.next_cursor with the same filters and page size.
employee_idNoEmployee UUID. Choose this or payroll_external_id.
payroll_external_idNoExact payroll ID as a string, including leading zeros.
payroll_sourceNoUse payroll_source_ukg or payroll_source_paylocity to narrow a payroll ID lookup.
location_idNoUUID of a location your key can access.
date_fromYesFirst local calendar date to include (YYYY-MM-DD).
date_toYesFirst date to exclude (YYYY-MM-DD). Request up to 31 days.
typeNoPTO, SICK, UNPAID, or unspecified. Omit to include all types.
statusNoPENDING, APPROVED, REJECTED, or RESCINDED. Omit to include all statuses.

Example response

JSON
{
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000401",
      "employee_id": "00000000-0000-4000-8000-000000000123",
      "payroll_external_id": "00123",
      "payroll_source": "payroll_source_ukg",
      "mapping_status": "mapped",
      "type": "PTO",
      "status": "APPROVED",
      "date_from": "2026-09-18",
      "date_to": "2026-09-19",
      "is_partial_day": false,
      "local_start": null,
      "local_end": null,
      "created_at": "2026-09-01T16:00:00+00:00",
      "updated_at": "2026-09-02T17:00:00+00:00",
      "locations": [
        {
          "id": "00000000-0000-4000-8000-000000000010",
          "timezone": "America/Los_Angeles"
        }
      ]
    }
  ],
  "meta": {
    "request_id": "00000000-0000-4000-8000-000000000901",
    "snapshot_id": "00000000-0000-4000-8000-000000000902",
    "as_of": "2026-09-18T18:00:00+00:00",
    "scope_revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "next_cursor": null,
    "complete": true
  }
}

The example covers September 18 only. date_to is the first day after the leave ends. All-day requests have null start and end times. For partial days, apply each time (HH:MM) and day_offset in the location’s time zone on each covered day. Payroll determines payable hours.

A request covering multiple locations appears once and lists the locations you can access. If older requests are grouped later, their ID changes. Refresh the affected date range to pick up the change. Request timestamps alone can miss updates.

Response fields

FieldTypeFormat / values
idstringuuid
employee_idstringuuid
payroll_external_idstring or null
payroll_sourcestring or null
mapping_statusstringmapped, missing, duplicate
typestring or nullPTO, SICK, UNPAID, null
statusstringPENDING, APPROVED, REJECTED, RESCINDED
date_fromstringdate
date_tostringdate
is_partial_dayboolean
local_startobject or null
local_start.timestring
local_start.day_offsetinteger
local_endobject or null
local_end.timestring
local_end.day_offsetinteger
created_atstringdate-time
updated_atstringdate-time
locationsarray of objects
locations[].idstringuuid
locations[].timezonestring

For multi-page results, follow the pagination and synchronization guide before updating your records.