REST-API: Abwesenheiten, Urlaubs- und Zeitkonto
Diese Seite gehört zur REST-API-Referenz. Dort stehen Adresse, Anmeldung, Scopes, Paginierung und Fehler. Alle Pfade hängen an https://api.litelog.de/api. In den Beispielen steht $KEY für Ihren API-Schlüssel; die Beispielwerte sind erfunden.
Übersicht
| Aufruf | Zweck | Scope |
|---|---|---|
GET /v1/absences |
Abwesenheiten auflisten (Urlaub, Krankheit usw.) | shifts:read |
POST /v1/absences |
Abwesenheit für einen Mitarbeiter melden | shifts:write |
GET /v1/absences/{id} |
Eine Abwesenheit lesen | shifts:read |
PUT /v1/absences/{id} |
Eine noch offene Abwesenheit korrigieren | shifts:write |
POST /v1/absences/{id}/decide |
Abwesenheit genehmigen oder ablehnen | shifts:write |
GET /v1/vacation-entitlements |
Urlaubsansprüche eines Mitarbeiters auflisten (alle Jahre) | shifts:read |
PUT /v1/vacation-entitlements |
Urlaubsanspruch eines Jahres anlegen oder ändern | shifts:write |
DELETE /v1/vacation-entitlements |
Urlaubsanspruch eines Jahres entfernen | shifts:write |
GET /v1/vacation-balance |
Urlaubskonto eines Mitarbeiters lesen (Anspruch, genommen, Rest) | shifts:read |
GET /v1/time-account/balance |
Salden der Zeitkonten zu einem Stichtag lesen | shifts:read |
GET /v1/absences
Abwesenheiten auflisten (Filter: status, type, account_id, from/to).
Berechtigung (Scope): shifts:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
status |
Query | string | nein | Werte: pending, approved, rejected, withdrawn. |
type |
Query | string | nein | Art der Abwesenheit (vacation, sick, time_off_in_lieu, child_sick, maternity_leave, parental_leave, education_leave, special_leave, unpaid_leave, other); braucht das Recht, Zeiten zu bearbeiten (sonst 403). |
account_id |
Query | integer | nein | — |
from |
Query | string (date) | nein | Überschneidungs-Filter: Abwesenheiten, die [from, to] berühren. Ein existierender Kalendertag (YYYY-MM-DD); 2026-02-31 antwortet 422 (seit 06.11.2026). |
to |
Query | string (date) | nein | Existierender Kalendertag, nicht vor from. |
page |
Query | integer | nein | Standard: 1. |
pageSize |
Query | integer | nein | Standard: 50; höchstens 100. |
Beispielaufruf
curl "https://api.litelog.de/api/v1/absences?from=2026-12-01&to=2026-12-31" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"absence_id": 318,
"account_id": 41,
"account_name": "Erika Musterfrau",
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"status": "pending",
"note": "Weihnachtsurlaub",
"created_by_account_id": 5,
"decided_by": null,
"decided_at": null,
"decision_note": null,
"extends_absence_id": null,
"created_at": "2026-12-01T09:14:27.318Z"
},
{
"absence_id": 317,
"account_id": 42,
"account_name": "Max Mustermann",
"type": "sick",
"start_date": "2026-12-07",
"end_date": "2026-12-09",
"status": "approved",
"note": null,
"created_by_account_id": 42,
"decided_by": 5,
"decided_at": "2026-12-07T07:41:03.552Z",
"decision_note": null,
"extends_absence_id": null,
"created_at": "2026-12-07T06:12:50.104Z"
}
],
"total": 2
}
POST /v1/absences
Abwesenheit für einen Mitarbeiter melden (Urlaub, Krankheit usw.) — Daten als existierende Kalendertage, höchstens 366 Tage je Meldung (sonst 422); längere Abwesenheiten als Folgemeldung mit extends_absence_id.
Berechtigung (Scope): shifts:write
Felder im Rumpf (JSON)
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
account_id |
integer | ja | — |
type |
string | ja | vacation, sick, time_off_in_lieu, child_sick, maternity_leave, parental_leave, education_leave, special_leave, unpaid_leave, other. |
start_date |
string (date) | ja | Erster Tag: ein existierender Kalendertag (YYYY-MM-DD). |
end_date |
string (date) | ja | Letzter Tag: ein existierender Kalendertag, nicht vor start_date; von start_date bis end_date höchstens 366 Tage (beide eingeschlossen). |
note |
string oder null | nein | Höchstens 2000 Zeichen. |
extends_absence_id |
integer | nein | — |
Beispielaufruf
curl -X POST "https://api.litelog.de/api/v1/absences" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"account_id": 41,
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"note": "Weihnachtsurlaub"
}'
Beispielantwort (201)
{
"data": {
"absence_id": 318,
"account_id": 41,
"account_name": "Erika Musterfrau",
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"status": "pending",
"note": "Weihnachtsurlaub",
"created_by_account_id": 5,
"decided_by": null,
"decided_at": null,
"decision_note": null,
"extends_absence_id": null,
"created_at": "2026-12-01T09:14:27.318Z"
},
"overlaps": []
}
GET /v1/absences/{id}
Eine Abwesenheit lesen.
Abwesenheit lesen bzw. eine noch offene Abwesenheit korrigieren (gleiche Grenzen: Kalendertage, höchstens 366 Tage).
Berechtigung (Scope): shifts:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | integer | ja | — |
Beispielaufruf
curl "https://api.litelog.de/api/v1/absences/318" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": {
"absence_id": 318,
"account_id": 41,
"account_name": "Erika Musterfrau",
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"status": "pending",
"note": "Weihnachtsurlaub",
"created_by_account_id": 5,
"decided_by": null,
"decided_at": null,
"decision_note": null,
"extends_absence_id": null,
"created_at": "2026-12-01T09:14:27.318Z"
}
}
PUT /v1/absences/{id}
Eine noch offene Abwesenheit korrigieren.
Abwesenheit lesen bzw. eine noch offene Abwesenheit korrigieren (gleiche Grenzen: Kalendertage, höchstens 366 Tage).
Berechtigung (Scope): shifts:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | integer | ja | — |
Felder im Rumpf (JSON)
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
type |
string | ja | — |
start_date |
string (date) | ja | Erster Tag: ein existierender Kalendertag (YYYY-MM-DD); seit 06.11.2026. |
end_date |
string (date) | ja | Letzter Tag: ein existierender Kalendertag, nicht vor start_date; von start_date bis end_date höchstens 366 Tage (beide eingeschlossen); seit 06.11.2026. |
note |
string oder null | nein | Höchstens 2000 Zeichen. |
Beispielaufruf
curl -X PUT "https://api.litelog.de/api/v1/absences/318" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"note": "Weihnachtsurlaub, mit der Teamleitung abgestimmt"
}'
Beispielantwort (200)
{
"data": {
"absence_id": 318,
"account_id": 41,
"account_name": "Erika Musterfrau",
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"status": "pending",
"note": "Weihnachtsurlaub, mit der Teamleitung abgestimmt",
"created_by_account_id": 5,
"decided_by": null,
"decided_at": null,
"decision_note": null,
"extends_absence_id": null,
"created_at": "2026-12-01T09:14:27.318Z"
},
"overlaps": []
}
POST /v1/absences/{id}/decide
Abwesenheit genehmigen oder ablehnen.
Berechtigung (Scope): shifts:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | integer | ja | — |
Felder im Rumpf (JSON)
Den Aufbau des Rumpfs zeigt das Beispiel.
Beispielaufruf
curl -X POST "https://api.litelog.de/api/v1/absences/318/decide" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"status": "approved",
"unassign": true,
"decision_note": "Vertretung ist geregelt"
}'
Beispielantwort (200)
{
"data": {
"absence_id": 318,
"account_id": 41,
"account_name": "Erika Musterfrau",
"type": "vacation",
"start_date": "2026-12-21",
"end_date": "2026-12-31",
"status": "approved",
"note": "Weihnachtsurlaub",
"created_by_account_id": 5,
"decided_by": 5,
"decided_at": "2026-12-02T10:05:12.640Z",
"decision_note": "Vertretung ist geregelt",
"extends_absence_id": null,
"created_at": "2026-12-01T09:14:27.318Z"
},
"unassigned_days": 8
}
GET /v1/vacation-entitlements
Urlaubsansprüche eines Mitarbeiters auflisten (alle Jahre).
Urlaubsansprüche je Jahr auflisten, anlegen/ändern (Upsert je Jahr) bzw. entfernen.
Berechtigung (Scope): shifts:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
account_id |
Query | integer | ja | — |
Beispielaufruf
curl "https://api.litelog.de/api/v1/vacation-entitlements?account_id=41" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"entitlement_id": 57,
"account_id": 41,
"year": 2026,
"days": 30,
"carryover_days": 2.5,
"note": "Vollzeit, 30 Tage laut Arbeitsvertrag",
"source": "manual",
"rolled_over_at": null,
"created_at": "2026-01-07T10:22:05.114Z",
"updated_at": "2026-01-07T10:22:05.114Z"
},
{
"entitlement_id": 31,
"account_id": 41,
"year": 2025,
"days": 30,
"carryover_days": 0,
"note": null,
"source": "manual",
"rolled_over_at": null,
"created_at": "2025-01-09T08:03:47.920Z",
"updated_at": "2025-01-09T08:03:47.920Z"
}
]
}
PUT /v1/vacation-entitlements
Urlaubsanspruch eines Jahres anlegen oder ändern.
Urlaubsansprüche je Jahr auflisten, anlegen/ändern (Upsert je Jahr) bzw. entfernen.
Berechtigung (Scope): shifts:write
Felder im Rumpf (JSON)
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
account_id |
integer | ja | — |
year |
integer | ja | 2000 – 2100. |
days |
number | ja | 0 – 400. |
carryover_days |
number | nein | -400 – 400. |
note |
string oder null | nein | — |
Beispielaufruf
curl -X PUT "https://api.litelog.de/api/v1/vacation-entitlements" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"account_id": 41,
"year": 2027,
"days": 30,
"carryover_days": 3.5,
"note": "Übertrag aus 2026 laut Personalabteilung"
}'
Beispielantwort (200)
{
"data": {
"entitlement_id": 58,
"account_id": 41,
"year": 2027,
"days": 30,
"carryover_days": 3.5,
"note": "Übertrag aus 2026 laut Personalabteilung",
"source": "manual",
"rolled_over_at": null,
"created_at": "2026-12-03T11:20:09.336Z",
"updated_at": "2026-12-03T11:20:09.336Z"
}
}
DELETE /v1/vacation-entitlements
Urlaubsanspruch eines Jahres entfernen.
Urlaubsansprüche je Jahr auflisten, anlegen/ändern (Upsert je Jahr) bzw. entfernen.
Berechtigung (Scope): shifts:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
account_id |
Query | integer | ja | — |
year |
Query | integer | ja | 2000 – 2100. |
Beispielaufruf
curl -X DELETE "https://api.litelog.de/api/v1/vacation-entitlements?account_id=41&year=2027" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": {
"deleted": true
}
}
GET /v1/vacation-balance
Urlaubskonto eines Mitarbeiters (Anspruch, genommen, Rest; Filter: account_id, year).
Berechtigung (Scope): shifts:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
account_id |
Query | integer | nein | — |
year |
Query | integer | nein | 2000 – 2100. |
absence_id |
Query | integer | nein | — |
Beispielaufruf
curl "https://api.litelog.de/api/v1/vacation-balance?account_id=41&year=2026&absence_id=318" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": {
"account_id": 41,
"year": 2026,
"entitlement_days": 30,
"carryover_days": 2.5,
"note": "Vollzeit, 30 Tage laut Arbeitsvertrag",
"source": "manual",
"used_days": 21,
"pending_days": 0,
"remaining_days": 11.5,
"remaining_after_pending_days": 11.5,
"request": [
{
"year": 2026,
"workdays": 8,
"entitlement_days": 30,
"carryover_days": 2.5,
"used_days": 21,
"remaining_before": 11.5,
"remaining_after": 3.5
}
]
}
}
GET /v1/time-account/balance
Zeitkonto-Salden zu einem Stichtag (as_of, optional account_id) — Lohn-/HR-Sync.
Berechtigung (Scope): shifts:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
as_of |
Query | string (date) | ja | — |
account_id |
Query | integer | nein | Auf einen Mitarbeiter beschränken; Standard = alle mit einem Arbeitszeitmodell. |
Beispielaufruf
curl "https://api.litelog.de/api/v1/time-account/balance?as_of=2026-12-31" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"account_id": 41,
"since": "2026-01-01",
"contract_minutes": 120480,
"actual_ms": 7254900000,
"adjustment_minutes": 120,
"balance_ms": 33300000
},
{
"account_id": 42,
"since": "2026-03-01",
"contract_minutes": 100800,
"actual_ms": 6030000000,
"adjustment_minutes": 0,
"balance_ms": -18000000
}
]
}
