---
title: "Absences"
method: GET
path: "/absences"
tags: ["absences"]
---

# Absences

`GET /absences`

## Request

- Base URL: `https://api.taktovka.com/v1`
- URL: `https://api.taktovka.com/v1/absences`
- Auth: HTTP bearer

Leave, sick notes and other absences touching the range. Without absences:kinds a sick note, OČR or other absence reads `absence` and has no note, because the kind is health data; with it the real kind and the note are sent and the answer is written to the company's audit log. `from` and `to` are local dates, both included, at most 93 days apart; `next_cursor` is always null.

## Query parameters

- `from` string, date, required
- `to` string, date, required
- `employee` string, uuid
- `status` 'requested' | 'approved' | 'rejected'

## Response `200`

OK

- object
  - `data` Absence[], required
    - `id` string, uuid, required
    - `employee_id` string, uuid, required
    - `kind` 'dovolenka' | 'pn' | 'ocr' | 'other' | 'absence', required: dovolenka | absence without absences:kinds; dovolenka | pn | ocr | other with it
    - `date_from` string, date, required: Local date of the location, YYYY-MM-DD
    - `date_to` string, date, required: Local date of the location, YYYY-MM-DD
    - `status` 'requested' | 'approved' | 'rejected', required
    - `note` string, nullable, required: Only with absences:kinds
    - `created_at` string, date-time, required: ISO 8601 instant
    - `approved_at` string, date-time, nullable, required: ISO 8601 instant
  - `next_cursor` string, nullable, required

## 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)
- `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)
