GET
/api/public/v1/shifts

List shifts

The planned schedule: who is covering a location, and when. Not hours worked — that is the time clock. Scheduling is per-location, so `schedule:read` on that location reaches it, and `hr:schedule:manager` reaches every location in the company.

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.

schedule: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.
locationIdstringOptionalOne location’s rota. Omit for every location the token can manage.
employeeIdstringOptionalOne person’s shifts.
startsAfterstringOptionalISO 8601. Shifts starting at or after this instant.
startsBeforestringOptionalISO 8601, exclusive. Shifts starting before this instant.
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/shifts" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Shifts retrieved successfully!",
  "content": {
    "shifts": [
      {
        "id": "shf_9911",
        "companyId": "com_001",
        "locationId": "loc_abc123",
        "employeeId": "emp_44f1",
        "startAt": "2026-08-29T13:00:00.000Z",
        "endAt": "2026-08-29T21:00:00.000Z",
        "role": "Front desk",
        "note": null,
        "createdById": "emp_12ab",
        "createdAt": "2026-08-20T10:00:00.000Z",
        "updatedAt": "2026-08-20T10: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 → Scheduling
/employee/scheduling