LiteLogDocs
English

REST API: Absences, vacation and time accounts

This page belongs to the REST API reference, which covers the address, authentication, scopes, pagination and errors. Every path is appended to https://api.litelog.de/api. In the examples $KEY stands for your API key; the example values are made up.

Overview

Call Purpose Scope
GET /v1/absences List absences (vacation, sick leave etc.) shifts:read
POST /v1/absences Report an absence for an employee shifts:write
GET /v1/absences/{id} Get an absence shifts:read
PUT /v1/absences/{id} Correct a still-pending absence shifts:write
POST /v1/absences/{id}/decide Approve or reject an absence shifts:write
GET /v1/vacation-entitlements List vacation entitlement rows of an employee (all years) shifts:read
PUT /v1/vacation-entitlements Create or update a vacation entitlement (upsert per year) shifts:write
DELETE /v1/vacation-entitlements Remove the entitlement of one year shifts:write
GET /v1/vacation-balance Vacation balance of an employee (entitlement, used, remaining) shifts:read
GET /v1/time-account/balance Time-account balances as of a date (payroll/HR sync) shifts:read

GET /v1/absences

List absences (filters: status, type, account_id, from/to).

Scope: shifts:read

Parameters

Name In Type Required Description
status query string no Values: pending, approved, rejected, withdrawn.
type query string no Absence type (vacation, sick, time_off_in_lieu, child_sick, maternity_leave, parental_leave, education_leave, special_leave, unpaid_leave, other) — requires the update gate (403 otherwise).
account_id query integer no —
from query string (date) no Overlap filter — absences overlapping [from, to]. An existing calendar day (YYYY-MM-DD); 2026-02-31 answers 422 (since 06.11.2026).
to query string (date) no Existing calendar day, not before from.
page query integer no Default: 1.
pageSize query integer no Default: 50; at most 100.

Example call

curl "https://api.litelog.de/api/v1/absences?from=2026-12-01&to=2026-12-31" \
  -H "X-Api-Key: $KEY"

Example response (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

Report an absence for an employee (vacation, sick leave etc.) — dates as existing calendar days, at most 366 days per report (otherwise 422); longer absences as a follow-up report with extends_absence_id.

Scope: shifts:write

Body fields (JSON)

Field Type Required Description
account_id integer yes —
type string yes vacation, sick, time_off_in_lieu, child_sick, maternity_leave, parental_leave, education_leave, special_leave, unpaid_leave, other.
start_date string (date) yes First day — an existing calendar day (YYYY-MM-DD).
end_date string (date) yes Last day — an existing calendar day, not before start_date; span start_date..end_date at most 366 days (both inclusive).
note string or null no At most 2000 characters.
extends_absence_id integer no —

Example call

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"
}'

Example response (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}

Get an absence.

Read an absence / correct a still-pending one (same limits: calendar days, at most 366 days).

Scope: shifts:read

Parameters

Name In Type Required Description
id path integer yes —

Example call

curl "https://api.litelog.de/api/v1/absences/318" \
  -H "X-Api-Key: $KEY"

Example response (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}

Correct a still-pending absence.

Read an absence / correct a still-pending one (same limits: calendar days, at most 366 days).

Scope: shifts:write

Parameters

Name In Type Required Description
id path integer yes —

Body fields (JSON)

Field Type Required Description
type string yes —
start_date string (date) yes First day — an existing calendar day (YYYY-MM-DD); since 06.11.2026.
end_date string (date) yes Last day — an existing calendar day, not before start_date; span start_date..end_date at most 366 days (both inclusive); since 06.11.2026.
note string or null no At most 2000 characters.

Example call

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"
}'

Example response (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

Approve or reject an absence.

Scope: shifts:write

Parameters

Name In Type Required Description
id path integer yes —

Body fields (JSON)

The example shows the structure of the body.

Example call

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"
}'

Example response (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

List vacation entitlement rows of an employee (all years).

List vacation entitlements per year, create/update one (upsert per year), or remove one.

Scope: shifts:read

Parameters

Name In Type Required Description
account_id query integer yes —

Example call

curl "https://api.litelog.de/api/v1/vacation-entitlements?account_id=41" \
  -H "X-Api-Key: $KEY"

Example response (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

Create or update a vacation entitlement (upsert per year).

List vacation entitlements per year, create/update one (upsert per year), or remove one.

Scope: shifts:write

Body fields (JSON)

Field Type Required Description
account_id integer yes —
year integer yes 2000 – 2100.
days number yes 0 – 400.
carryover_days number no -400 – 400.
note string or null no —

Example call

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"
}'

Example response (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

Remove the entitlement of one year.

List vacation entitlements per year, create/update one (upsert per year), or remove one.

Scope: shifts:write

Parameters

Name In Type Required Description
account_id query integer yes —
year query integer yes 2000 – 2100.

Example call

curl -X DELETE "https://api.litelog.de/api/v1/vacation-entitlements?account_id=41&year=2027" \
  -H "X-Api-Key: $KEY"

Example response (200)

{
  "data": {
    "deleted": true
  }
}

GET /v1/vacation-balance

An employee's vacation balance (entitlement, used, remaining; filters: account_id, year).

Scope: shifts:read

Parameters

Name In Type Required Description
account_id query integer no —
year query integer no 2000 – 2100.
absence_id query integer no —

Example call

curl "https://api.litelog.de/api/v1/vacation-balance?account_id=41&year=2026&absence_id=318" \
  -H "X-Api-Key: $KEY"

Example response (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

Time-account balances as of a date (as_of, optional account_id) — payroll/HR sync.

Scope: shifts:read

Parameters

Name In Type Required Description
as_of query string (date) yes —
account_id query integer no Restrict to one employee; default = all with a model.

Example call

curl "https://api.litelog.de/api/v1/time-account/balance?as_of=2026-12-31" \
  -H "X-Api-Key: $KEY"

Example response (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
    }
  ]
}