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

List time-off requests

Who is away and when, plus anything still waiting on a decision. What comes back depends on the token: `hr:admin` sees the whole company, anyone else sees their own requests plus those of everyone below them in the reporting chain — which is exactly the set they can act on. A request with status APPROVED and a null `reviewedById` was auto-approved because the requester has no manager.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

hr:read

Query Parameters

NameTypeRequiredDescription
limitnumberOptionalMaximum number of items to return (1-100).Default: 20
offsetnumberOptionalNumber of items to skip before starting to collect the result set.Default: 0
sortBystringOptionalField to sort by. Allowed values vary by endpoint.Default: createdAt
sortOrderstring
asc
desc
OptionalSort direction.Default: desc
searchstringOptionalFree-text search across the resource’s primary fields.
createdAfterstringOptionalISO 8601 timestamp — only return items created after this time.
createdBeforestringOptionalISO 8601 timestamp — only return items created before this time.
updatedAfterstringOptionalISO 8601 timestamp — only return items updated after this time.
statusstring
PENDING
APPROVED
DENIED
CANCELLED
OptionalFilter by decision state.
typestring
VACATION
SICK
PERSONAL
BEREAVEMENT
JURY_DUTY
UNPAID
OTHER
OptionalFilter by kind of leave.
employeeIdstringOptionalOne person’s requests. Only widens what you can already see.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/time-off-requests" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Time-off requests retrieved successfully!",
  "content": {
    "requests": [
      {
        "id": "tor_31aa",
        "employeeId": "emp_44f1",
        "type": "VACATION",
        "status": "PENDING",
        "startDate": "2026-09-14",
        "endDate": "2026-09-18",
        "startsAt": null,
        "endsAt": null,
        "timezone": null,
        "note": "Family trip.",
        "reviewedById": null,
        "reviewedAt": null,
        "reviewNote": null,
        "createdAt": "2026-08-20T09:00:00.000Z",
        "updatedAt": "2026-08-20T09:00:00.000Z"
      }
    ],
    "pagination": {
      "total": 42,
      "limit": 20,
      "offset": 0,
      "hasMore": true
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Employees → Time off
/employee/timeoff