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

# List all shifts

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

## Request

- Base URL: `https://prod.truv.com`
- URL: `https://prod.truv.com/v1/links/{link_id}/shifts/`
- Auth: API key in header `X-Access-Client-Id` and API key in header `X-Access-Secret`

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

## Changes

- **2026-07-27** `f7c013875516`: 1 info
  - the `results/items/earnings/items/amount` response's property pattern `^-?\d{1,10}\.\d{2}$` was added for the status `200`

[Operation history](https://skmtc.dev/truv/apis/truv-api/changes/v1/links/:link_id/shifts/get.md)

---

[API](https://skmtc.dev/truv/apis/truv-api.md) - [All operations](https://skmtc.dev/truv/apis/truv-api/llms.txt) - [OpenAPI document](https://skmtc.dev/truv/apis/truv-api/revisions/e20fd88e9371?raw)
