API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · work_schedule_entries

Work Schedule Entry Schema

ID du schéma
work_schedule_entry
Collection
work_schedule_entries
Autorisations
  • Lirework_schedule_view
  • Créerwork_schedule_create
  • Modifierwork_schedule_edit
  • Supprimerwork_schedule_delete

Champs

Work Schedule Entry Schema

work_schedule_entries4 autorisations

Unified schema for work schedule rows. The `kind` discriminator selects between PERIOD (contractual template valid for a date range, with a weekly schedule) and DAY (a single planned/recorded day, optionally overriding an active period).

kindstringobligatoire

PERIOD = contractual template, DAY = single date entry

PERIODDAY
userIduuidfacultatif

User ID of the employee. Optional (ADR 0123): Mitarbeitende ohne verknüpften Login-Account haben keine userId — Disposition läuft dann rein über `employeeId`. Denormalisierter Self-Service-Lookup-Key wenn verknüpft.

nullable
employeeIduuidobligatoire

Employee profile ID — canonical Disposition-Schlüssel.

workingTimeModelIduuidfacultatif

Reference to the working time model (envelope/validator)

nullable
validFromdatefacultatif

PERIOD only: start date of the contractual period (YYYY-MM-DD)

nullable
validTodatefacultatif

PERIOD only: end date or null for open-ended

nullable
weeklyHoursnumberfacultatif

PERIOD only: target weekly hours

0 – 168nullable
weeklyScheduleobject[]facultatif

PERIOD only: per-weekday recurring work pattern

nullable
daynumberobligatoire
1 – 7
startTimestringobligatoire
Motif
endTimestringobligatoire
Motif
breakMinutesnumberfacultatif
0 – 480Par défaut : 0
breakStartTimestringfacultatif

PERIOD only: prescribed/declared break start (HH:mm); blocked in calendar

Motifnullable
breakEndTimestringfacultatif

PERIOD only: prescribed/declared break end (HH:mm)

Motifnullable
locationstringfacultatif

Default work location for this weekday

nullOFFICEREMOTECUSTOMER_SITETRAVEL
nullable
locationAddressIduuidfacultatif

PERIOD only: address in the self-company party (parties.addresses[]._id) for this weekday; set whenever location is OFFICE and a site was chosen

nullable
locationIduuidfacultatif

PERIOD only: building (location entity, parentId=null) within locationAddressId; null when the address itself was chosen

nullable
dayTypestringfacultatif

PERIOD only: kind of weekday. WORK = regular working day; VOCATIONAL_SCHOOL = recurring Berufsschultag (§ 15 BBiG) — counts towards the target hours as paid release, but the person is not available for dispatch. Missing = WORK.

WORKVOCATIONAL_SCHOOL
Par défaut : "WORK"
notestringfacultatif

PERIOD only: optional freetext note (e.g. "Teilzeit nach Elternzeit")

max. 1000 caractèresnullable
datedatefacultatif

DAY only: the date (YYYY-MM-DD)

nullable
plannedStartTimestringfacultatif

DAY only: planned start time, null = day off

Motifnullable
plannedEndTimestringfacultatif

DAY only: planned end time

Motifnullable
plannedBreakMinutesnumberfacultatif

DAY only: planned break duration in minutes

≥ 0Par défaut : 30
plannedBreakStartTimestringfacultatif

DAY only: planned break start (HH:mm); blocked in calendar

Motifnullable
plannedBreakEndTimestringfacultatif

DAY only: planned break end (HH:mm)

Motifnullable
plannedWorkMinutesnumberfacultatif

DAY only: calculated planned work minutes (end - start - break)

≥ 0Par défaut : 0
locationstringfacultatif

DAY only: work location type

nullOFFICEREMOTECUSTOMER_SITETRAVEL
nullable
dayTypestringfacultatif

DAY only: kind of day. WORK = regular working day; VOCATIONAL_SCHOOL = Berufsschultag (§ 15 BBiG), paid release that still counts towards the target hours. Missing = WORK.

WORKVOCATIONAL_SCHOOL
Par défaut : "WORK"
locationAddressIduuidfacultatif

DAY only: address in the self-company party (parties.addresses[]._id); set whenever location is OFFICE and a site was chosen

nullable
locationIduuidfacultatif

DAY only: building (location entity, parentId=null) within locationAddressId; null when the address itself was chosen

nullable
locationNotestringfacultatif

DAY only: additional location notes

max. 500 caractèresnullable
shiftAssignmentIduuidfacultatif

DAY only: reference to shift assignment (for SHIFT model type)

nullable
statusstringfacultatif

DAY only: submission status (DRAFT = editable, SUBMITTED = locked). APPROVED/REJECTED are legacy — read-only remnants of the removed approval flow.

nullDRAFTSUBMITTEDAPPROVEDREJECTED
nullable
submittedAtdatetimefacultatif

DAY only: when this entry was submitted. Also anchors the 15-minute self-withdraw grace window (SELF_WITHDRAW_WINDOW_MS).

nullable
approvedByIduuidfacultatif

DAY only: LEGACY — user ID of the approver (removed approval flow)

nullable
approvedAtdatetimefacultatif

DAY only: LEGACY — when this entry was approved (removed approval flow)

nullable
rejectedByIduuidfacultatif

DAY only: LEGACY — user ID of the rejecter (removed approval flow)

nullable
rejectedAtdatetimefacultatif

DAY only: LEGACY — when this entry was rejected (removed approval flow)

nullable
rejectionReasonstringfacultatif

DAY only: LEGACY — rejection reason (removed approval flow)

max. 1000 caractèresnullable
flagsobject[]facultatif

DAY only: ArbZG/TV validation flags computed on save (Phase 6.2 engine). Legacy string codes (DEADLINE_MISSED, REST_TIME_VIOLATION, STAFFING_VIOLATION, OVERRIDES_PERIOD) remain available via informationalFlags.

Par défaut : []lecture seule
codestringobligatoire
CORE_HOUR_VIOLATIONOUTSIDE_FLEX_WINDOWSHIFT_MISMATCHBANDWIDTH_EXCEEDEDKAPOVAZ_MINIMUMBREAK_RULE_VIOLATIONBREAK_SEGMENT_TOO_SHORTMAX_CONSECUTIVE_WORK_EXCEEDEDREST_PERIOD_VIOLATIONMAX_DAILY_EXCEEDEDMAX_WEEKLY_AVG_EXCEEDEDNIGHT_WORK_EXCEEDEDHOLIDAY_WORK_UNAPPROVED
severitystringobligatoire
WARNINGBLOCKING
legalBasisstringobligatoire
max. 100 caractères
messagestringobligatoire
max. 1000 caractères
detailsobjectfacultatif
nullable
acknowledgementsobject[]facultatif

DAY only: Warn-and-Confirm acknowledgements (Phase 6.3). Required for every flag stored in `flags[]` before the entry can be submitted.

Par défaut : []
flagstringobligatoire
CORE_HOUR_VIOLATIONOUTSIDE_FLEX_WINDOWSHIFT_MISMATCHBANDWIDTH_EXCEEDEDKAPOVAZ_MINIMUMBREAK_RULE_VIOLATIONBREAK_SEGMENT_TOO_SHORTMAX_CONSECUTIVE_WORK_EXCEEDEDREST_PERIOD_VIOLATIONMAX_DAILY_EXCEEDEDMAX_WEEKLY_AVG_EXCEEDEDNIGHT_WORK_EXCEEDEDHOLIDAY_WORK_UNAPPROVED
acknowledgedBystringobligatoire
max. 64 caractères
acknowledgedAtdatetimeobligatoire
reasonstringobligatoire
10–4000 caractères
approvedBystringfacultatif
max. 64 caractèresnullable
approvedAtdatetimefacultatif
nullable
legalBasisstringobligatoire
max. 100 caractères
informationalFlagsstring[]facultatif

DAY only: non-ArbZG informational flags that do not require acknowledgement (deadline missed, staffing issues, period override).

Par défaut : []
reasonstringfacultatif

DAY only: optional reason when this DAY overrides a PERIOD (e.g. "Arzttermin", "Halbtagsurlaub")

max. 500 caractèresnullable
overridesPeriodIduuidfacultatif

DAY only: optional reference back to the PERIOD this DAY deviates from. Set automatically when HR records a contractual exception.

nullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/work_schedule_entries — Liste, paginée et filtrable
  • GET /api/v1/work_schedule_entries/<id> — Une entité
  • POST /api/v1/work_schedule_entries — Créer
  • PATCH /api/v1/work_schedule_entries/<id> — Mise à jour partielle
  • DELETE /api/v1/work_schedule_entries/<id> — Suppression logique
  • GET /api/v1/work_schedule_entries/<id>/timeline — Audit et activités

Recherche