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.
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
| Parameter | Required | How to use it |
|---|---|---|
page_size | No | Records per page (1–500, default 100). |
cursor | No | Pass the previous page’s meta.next_cursor with the same filters and page size. |
employee_id | No | Employee UUID. Choose this or payroll_external_id. |
payroll_external_id | No | Exact payroll ID as a string, including leading zeros. |
payroll_source | No | Use payroll_source_ukg or payroll_source_paylocity to narrow a payroll ID lookup. |
location_id | No | UUID of a location your key can access. |
date_from | Yes | First local calendar date to include (YYYY-MM-DD). |
date_to | Yes | First date to exclude (YYYY-MM-DD). Request up to 31 days. |
type | No | PTO, SICK, UNPAID, or unspecified. Omit to include all types. |
status | No | PENDING, APPROVED, REJECTED, or RESCINDED. Omit to include all statuses. |
Example response
{
"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
| Field | Type | Format / values |
|---|---|---|
id | string | uuid |
employee_id | string | uuid |
payroll_external_id | string or null | |
payroll_source | string or null | |
mapping_status | string | mapped, missing, duplicate |
type | string or null | PTO, SICK, UNPAID, null |
status | string | PENDING, APPROVED, REJECTED, RESCINDED |
date_from | string | date |
date_to | string | date |
is_partial_day | boolean | |
local_start | object or null | |
local_start.time | string | |
local_start.day_offset | integer | |
local_end | object or null | |
local_end.time | string | |
local_end.day_offset | integer | |
created_at | string | date-time |
updated_at | string | date-time |
locations | array of objects | |
locations[].id | string | uuid |
locations[].timezone | string |
For multi-page results, follow the pagination and synchronization guide before updating your records.
