API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · work_schedule_entries

Work Schedule Entry Schema

ID del esquema
work_schedule_entry
Colección
work_schedule_entries
Permisos
  • Leerwork_schedule_view
  • Crearwork_schedule_create
  • Modificarwork_schedule_edit
  • Eliminarwork_schedule_delete

Campos

Work Schedule Entry Schema

work_schedule_entries4 permisos

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).

kindstringobligatorio

PERIOD = contractual template, DAY = single date entry

PERIODDAY
userIduuidopcional

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.

admite null
employeeIduuidobligatorio

Employee profile ID — canonical Disposition-Schlüssel.

workingTimeModelIduuidopcional

Reference to the working time model (envelope/validator)

admite null
validFromdateopcional

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

admite null
validTodateopcional

PERIOD only: end date or null for open-ended

admite null
weeklyHoursnumberopcional

PERIOD only: target weekly hours

0 – 168admite null
weeklyScheduleobject[]opcional

PERIOD only: per-weekday recurring work pattern

admite null
daynumberobligatorio
1 – 7
startTimestringobligatorio
Patrón
endTimestringobligatorio
Patrón
breakMinutesnumberopcional
0 – 480Valor por defecto: 0
breakStartTimestringopcional

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

Patrónadmite null
breakEndTimestringopcional

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

Patrónadmite null
locationstringopcional

Default work location for this weekday

nullOFFICEREMOTECUSTOMER_SITETRAVEL
admite null
locationAddressIduuidopcional

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

admite null
locationIduuidopcional

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

admite null
dayTypestringopcional

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
Valor por defecto: "WORK"
notestringopcional

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

máx. 1000 caracteresadmite null
datedateopcional

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

admite null
plannedStartTimestringopcional

DAY only: planned start time, null = day off

Patrónadmite null
plannedEndTimestringopcional

DAY only: planned end time

Patrónadmite null
plannedBreakMinutesnumberopcional

DAY only: planned break duration in minutes

≥ 0Valor por defecto: 30
plannedBreakStartTimestringopcional

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

Patrónadmite null
plannedBreakEndTimestringopcional

DAY only: planned break end (HH:mm)

Patrónadmite null
plannedWorkMinutesnumberopcional

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

≥ 0Valor por defecto: 0
locationstringopcional

DAY only: work location type

nullOFFICEREMOTECUSTOMER_SITETRAVEL
admite null
dayTypestringopcional

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
Valor por defecto: "WORK"
locationAddressIduuidopcional

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

admite null
locationIduuidopcional

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

admite null
locationNotestringopcional

DAY only: additional location notes

máx. 500 caracteresadmite null
shiftAssignmentIduuidopcional

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

admite null
statusstringopcional

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

nullDRAFTSUBMITTEDAPPROVEDREJECTED
admite null
submittedAtdatetimeopcional

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

admite null
approvedByIduuidopcional

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

admite null
approvedAtdatetimeopcional

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

admite null
rejectedByIduuidopcional

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

admite null
rejectedAtdatetimeopcional

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

admite null
rejectionReasonstringopcional

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

máx. 1000 caracteresadmite null
flagsobject[]opcional

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.

Valor por defecto: []solo lectura
codestringobligatorio
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
severitystringobligatorio
WARNINGBLOCKING
legalBasisstringobligatorio
máx. 100 caracteres
messagestringobligatorio
máx. 1000 caracteres
detailsobjectopcional
admite null
acknowledgementsobject[]opcional

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

Valor por defecto: []
flagstringobligatorio
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
acknowledgedBystringobligatorio
máx. 64 caracteres
acknowledgedAtdatetimeobligatorio
reasonstringobligatorio
10–4000 caracteres
approvedBystringopcional
máx. 64 caracteresadmite null
approvedAtdatetimeopcional
admite null
legalBasisstringobligatorio
máx. 100 caracteres
informationalFlagsstring[]opcional

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

Valor por defecto: []
reasonstringopcional

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

máx. 500 caracteresadmite null
overridesPeriodIduuidopcional

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

admite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/work_schedule_entries — Lista, paginada y filtrable
  • GET /api/v1/work_schedule_entries/<id> — Una entidad
  • POST /api/v1/work_schedule_entries — Crear
  • PATCH /api/v1/work_schedule_entries/<id> — Actualización parcial
  • DELETE /api/v1/work_schedule_entries/<id> — Eliminación lógica
  • GET /api/v1/work_schedule_entries/<id>/timeline — Auditoría y actividades

Búsqueda