API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen
Entity · shift_assignments

Shift Assignment Schema

Schema-ID
shift_assignment
Collection
shift_assignments
Permissions
  • Lezenshift_assignment_view
  • Aanmakenshift_assignment_create
  • Wijzigenshift_assignment_edit
  • Verwijderenshift_assignment_delete

Velden

Shift Assignment Schema

shift_assignments4 permissions

A concrete staffing entry: one employee occupies one role-slot of one coverage-demand using one shift-block on one date. Together with the coverage-demand.coverageWindow, the set of assignments determines whether the demand is fully covered.

employeeIduuidvereist

UUID of the employee profile — canonical key (ADR 0122). Shifts can be planned for employees without a linked user account (Aushilfen, Subunternehmer, Azubis ohne IT-Konto).

userIduuidoptioneel

Linked user UUID (denormalised from `employee_profile.userId` for fast personal-calendar lookups). `null` when the employee has no login. Writers must keep it in sync.

nullable
shiftBlockIduuidvereist

UUID of the shift-block (time bucket). Required — the time + ArbZG semantics of the assignment come from this block.

coverageDemandIduuidoptioneel

UUID of the coverage-demand this assignment fills. Null for ad-hoc shifts that do not belong to any demand (e.g. Springer, training time blocked off as a shift).

nullable
roleSlotIdstringoptioneel

When coverageDemandId is set, this is the slotId of the role within coverage-demand.roles[] that the employee occupies. Null when coverageDemandId is null.

max. 100 tekensnullable
datedatevereist

Date of the shift (YYYY-MM-DD)

startTimeOverridestringoptioneel

Override start time for this specific assignment

Patternnullable
endTimeOverridestringoptioneel

Override end time for this specific assignment

Patternnullable
statusstringoptioneel

Assignment status

PLANNEDCONFIRMEDSWAPPEDCANCELLEDOPEN
Default: "PLANNED"
swappedWithUserIduuidoptioneel

User UUID if this shift was swapped

nullable
notesstringoptioneel
max. 2000 tekensnullable
schedulePeriodIduuidoptioneel

UUID of the schedule period this assignment belongs to

nullable
solverGeneratedbooleanoptioneel

True if generated by the scheduling solver (CP-SAT / greedy fallback). Manually-created or manually-edited assignments stay false.

Default: false
aiExplanationstringoptioneel

LLM-rendered German-language explanation of why the solver made this assignment (generated post-solve by schedule-evaluation.service via Claude).

max. 2000 tekensnullable
preferenceScorenumberoptioneel

Normalised employee preference for this employee × shift-block combination, in [-1, 1]. Mapping: LOVE=1.0, PREFER=0.7, NEUTRAL=0.5, AVOID=0.1, NEVER=-1.0. NEVER is a soft penalty, not a veto — the solver may still assign a NEVER block when no feasible alternative exists (such cases are reported in qualityReport.neverViolations).

-1 – 1nullable
confirmedByEmployeebooleanoptioneel
Default: false
confirmedAtdatetimeoptioneel
nullable

Standaard-endpoints

Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:

  • GET /api/v1/shift_assignments — Lijst, gepagineerd + filterbaar
  • GET /api/v1/shift_assignments/<id> — Enkele entity
  • POST /api/v1/shift_assignments — Aanmaken
  • PATCH /api/v1/shift_assignments/<id> — Gedeeltelijke update
  • DELETE /api/v1/shift_assignments/<id> — Soft-delete
  • GET /api/v1/shift_assignments/<id>/timeline — Audit + activiteiten

Zoeken