---
title: "One published week with its shifts"
method: GET
path: "/schedules/{schedule_id}"
tags: ["schedules"]
---

# One published week with its shifts

`GET /schedules/{schedule_id}`

## Request

- Base URL: `https://api.taktovka.com/v1`
- URL: `https://api.taktovka.com/v1/schedules/{schedule_id}`
- Auth: HTTP bearer

The week as it was announced to people: the latest published version, or any earlier one with `version`. Versions never change once published. Changes the manager has not published yet are never in it.

## Path parameters

- `schedule_id` string, uuid, required

## Query parameters

- `version` integer

## Response `200`

OK

- object
  - `data` ScheduleDetail, required
    - `schedule_id` string, uuid, required
    - `location_id` string, uuid, required
    - `period_start` string, date, required: Local date of the location, YYYY-MM-DD
    - `period_end` string, date, required: Local date of the location, YYYY-MM-DD
    - `version` integer, required
    - `published_at` string, date-time, required: ISO 8601 instant
    - `sha256` string, nullable, required: SHA-256 of the canonical snapshot; null for versions published before it was kept
    - `shifts` Shift[], required
      - `id` string, uuid, required
      - `schedule_id` string, uuid, required
      - `version` integer, required: The published version the shift is read from
      - `location_id` string, uuid, required
      - `position_id` string, uuid, nullable, required
      - `date` string, date, required: Local date the shift starts on
      - `start_local` string, required: Wall-clock time at the location, HH:MM
      - `end_local` string, required: Wall-clock end; not after start_local means the next day
      - `tz` string, required: IANA time zone of the location when the version was published
      - `starts_at` string, date-time, required: ISO 8601 instant with the location's offset at that moment
      - `ends_at` string, date-time, required: ISO 8601 instant with the location's offset at that moment
      - `break_min` integer, required: Unpaid break, minutes
      - `minutes` integer, required: Elapsed minutes from start to end
      - `paid_minutes` integer, required: Elapsed minutes less the break
      - `headcount` integer, required: People the shift needs
      - `assignments` object[], required
        - `employee_id` string, uuid, required
        - `state` 'assigned' | 'confirmed' | 'swap_requested' | 'declined', required: declined: the person gave the seat back and does not work it

## Other responses

- `400`: validation_failed, range_too_long or key_in_query
- `401`: unauthenticated, invalid_key, key_revoked or key_expired
- `403`: insufficient_scope (with required_scope)
- `404`: not_found: no such object in this company
- `429`: rate_limited (with retry_after and a Retry-After header)

---

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