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

Shift Preference Schema

Schema ID
shift_preference
Collection
shift_preferences
Permissions
  • Readshift_preference_view
  • Createshift_preference_create
  • Editshift_preference_edit
  • Deleteshift_preference_delete

Fields

Shift Preference Schema

shift_preferences4 permissions

Schema for employee shift preferences (Wunschzettel)

schedulePeriodIduuidrequired
employeeIduuidrequired
userIduuidrequired
statusstringoptional
DRAFTSUBMITTEDLOCKED
Default: "DRAFT"
submittedByuuidoptional
nullable
llmParseConfirmedByuuidoptional
nullable
availabilityobject[]optional
Default: []
startDatedaterequired
endDatedaterequired
typestringrequired
AVAILABLEUNAVAILABLEPREFERREDAVOID
notestringoptional
max 500 charactersnullable
shiftPreferencesobject[]optional
Default: []
shiftBlockIduuidrequired
preferencestringrequired
LOVEPREFERNEUTRALAVOIDNEVER
weightnumberoptional

Importance weight

1 – 5Default: 3
colleaguePreferencesobject[]optional

References target employees by employeeId (not userId) so colleagues without a user account can be picked.

Default: []
employeeIduuidrequired
typestringrequired
PREFER_WITHPREFER_NOT_WITH
notestringoptional
max 500 charactersnullable
timePreferencesobjectoptional
nullable
preferMorningsbooleanoptional
Default: false
preferEveningsbooleanoptional
Default: false
preferNightsbooleanoptional
Default: false
preferWeekendsbooleanoptional
Default: false
avoidWeekendsbooleanoptional
Default: false
maxShiftsPerWeeknumberoptional
0 – 7nullable
preferBlocksbooleanoptional

Prefer consecutive shift blocks

Default: false
avoidShortChangeoversbooleanoptional

Avoid late-then-early sequences beyond the legal ArbZG §5 minimum

Default: false
tradeoffsobject[]optional

Conditional wishes (if-then tradeoffs)

max 10 itemsDefault: []
ifConditionstringrequired
max 500 characters
thenAcceptstringrequired
max 500 characters
customWishesstringoptional

Free-text wishes, parsed by LLM

max 3000 charactersnullable
preferenceWeightsobjectoptional

Relative importance of each preference dimension (1-10)

nullable
availabilitynumberoptional
1 – 10Default: 5
shiftTypenumberoptional
1 – 10Default: 5
colleaguenumberoptional
1 – 10Default: 3
timenumberoptional
1 – 10Default: 4
submittedAtdatetimeoptional
nullable
lockedAtdatetimeoptional
read-onlynullable
lockedByuuidoptional
read-onlynullable
llmParseResultobjectoptional

Parsed structured constraints from customWishes

nullable
llmParseConfirmedAtdatetimeoptional

When employee confirmed the LLM parse result

nullable

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/shift_preferences — List, paginated + filterable
  • GET /api/v1/shift_preferences/<id> — Single entity
  • POST /api/v1/shift_preferences — Create
  • PATCH /api/v1/shift_preferences/<id> — Partial update
  • DELETE /api/v1/shift_preferences/<id> — Soft delete
  • GET /api/v1/shift_preferences/<id>/timeline — Audit + activities

Search