---
title: "List all shifts"
method: GET
path: "/v1/links/{link_id}/shifts/"
tags: ["Shifts"]
---

# List all shifts

`GET /v1/links/{link_id}/shifts/`

The endpoint returns ongoing and completed work shifts. It includes time entries (clock in/clock out), the type of work, and earnings.

## Query parameters

- `start_date_from` string
- `start_date_to` string
- `page` integer
- `page_size` integer

## Response `200`

- ShiftsListResponse — Shift List
  - `count` integer, required — Number of the results in total
  - `next` string, nullable, required — Link to the next page
  - `previous` string, nullable, required — Link to the previous page
  - `results` Shift[], required — List of the Shifts
    - `id` string — Shift ID
    - `external_id` string, required — Shift External ID
    - `created_at` string — Shift creation timestamp (ISO 8601)
    - `updated_at` string — Shift update timestamp (ISO 8601)
    - `start_date` string, required — Start date of the Shift. ISO 8601 format.
    - `end_date` string, required — End date of the Shift. ISO 8601 format.
    - `time_entries` TimeEntry[], required — List of TimeEntries related to the Shift
      - `id` string — TimeEntry ID
      - `external_id` string, required — TimeEntry External ID
      - `created_at` string — TimeEntry creation timestamp (ISO 8601)
      - `updated_at` string — TimeEntry update timestamp (ISO 8601)
      - `entry_date` string, required — Entry date of the event in the time tracking system.
      - `start` string, required — Datetime when the work started (ISO 8601)
      - `end` string, required — Datetime when the work ended (ISO 8601)
    - `earnings` object[] — Aggregated earnings for the Shift
      - `name` string, required — Name of earnings
      - `amount` string, decimal, required — Amount of earnings
      - `category` 'regular' | 'overtime' | 'bonus' | 'commission' | 'other_pay', required — Category of earnings
      - `rate` string, decimal — Rate of earnings. The number of decimal places varies by payroll provider (`"30.29"`, `"3334.6200"`, `"2"`) and the value can be negative.
      - `units` string, decimal — Units of earnings. The number of decimal places varies by payroll provider (`"2"`, `"1.0000"`, `"842.5"`) and the value can be negative.
    - `type` 'other' | 'delivery' | 'rideshare' | 'shift', required — Type of the shift

## Other responses

- `401` — HTTP 401 Unauthorized
- `403` — HTTP 403 Forbidden

---

[API](https://skmtc.net/truv/apis/truv-api.md) · [All operations](https://skmtc.net/truv/apis/truv-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/truv/truv-api/revisions/b92671dcb52d/schema)
