API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · time_accounts

Time Account Schema

Schema ID
time_account
Collection
time_accounts
Permissions
  • Readtime_account_view
  • Createtime_account_manage
  • Edittime_account_manage
  • Deletetime_account_manage

Fields

Time Account Schema

time_accounts4 permissions

Stundenkonto pro Mitarbeiter und Kontotyp (ADR 0036b)

userIduuidrequired

Kontoinhaber (users._id)

accountTypestringrequired

FLEX = Gleitzeit-Saldo; OVERTIME = genehmigte Überstunden; ANNUAL = Jahresarbeitszeit; LONG_TERM = Langzeit/Sabbatical

FLEXOVERTIMEANNUALLONG_TERM
statusstringrequired

ACTIVE = Buchungen erlaubt; FROZEN = keine neuen Buchungen, aber sichtbar; CLOSED = endgültig geschlossen (z.B. nach Offboarding)

ACTIVEFROZENCLOSED
Default: "ACTIVE"
currentBalanceMinutesintegeroptional

Laufender Saldo in Minuten. Positiv = Guthaben, negativ = Schuld. Vom Service verwaltet, nicht direkt per Schema-Validierung änderbar (in entity-config.protectedFields).

Default: 0read-only
lastClosingDatestringoptional

Datum des letzten erfolgreichen monthly_closing

Patternnullable
periodStartstringrequired

Beginn der aktuellen Abrechnungsperiode

Pattern
periodEndstringoptional

Ende der aktuellen Abrechnungsperiode; 9999-12-31 bei LONG_TERM

Pattern
limitsobjectoptional

Kappungsgrenzen. Initial aus working_time_model.overtimeRules abgeleitet, pro Konto überschreibbar.

nullable
maxBalanceMinutesintegeroptional

Obergrenze; Überschreitung → Kappung oder Überlauf auf OVERTIME

nullable
minBalanceMinutesintegeroptional

Untergrenze (negativ erlaubt, null = unbegrenzt). Unterschreitung → Flag MIN_BALANCE_VIOLATED

nullable
carryOverMaxMinutesintegeroptional

Max. Übertrag in die nächste Periode

nullable
carryOverDeadlineMonthsintegeroptional

Verfallsfrist für Übertrag in Monaten

≥ 0nullable
warnAboveMinutesintegeroptional

Ampel gelb ab diesem Saldo (rot ab maxBalanceMinutes)

nullable
warnBelowMinutesintegeroptional

Ampel gelb unter diesem Saldo (rot unter minBalanceMinutes)

nullable
warningLevelstringoptional

Ampelfarbe, über die zuletzt benachrichtigt wurde. Der nächtliche Lauf meldet nur, wenn die Farbe schlechter wird.

GREENYELLOWREDnull
nullable
workingTimeModelIduuidoptional

Optional: Modell zum Zeitpunkt der Konto-Erstellung. Für Audit-Zwecke. Die effektive Regel-Auflösung läuft zur Runtime über den Resolver, nicht dieses Feld.

nullable
openedAtdatetimeoptional

Zeitpunkt der Konto-Eröffnung

nullable
openedBystringoptional

userId der Person, die das Konto eröffnet hat; "system-auto" bei Auto-Create

max 64 charactersnullable
closedAtdatetimeoptional
nullable
closedBystringoptional
max 64 charactersnullable
notesstringoptional
max 4000 charactersnullable

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/time_accounts — List, paginated + filterable
  • GET /api/v1/time_accounts/<id> — Single entity
  • POST /api/v1/time_accounts — Create
  • PATCH /api/v1/time_accounts/<id> — Partial update
  • DELETE /api/v1/time_accounts/<id> — Soft delete
  • GET /api/v1/time_accounts/<id>/timeline — Audit + activities

Search