API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · org_units

Org Unit Schema

Schema-ID
org_unit
Collection
org_units
Permissions
  • Lesenorg_unit_view
  • Anlegenorg_unit_create
  • Ändernorg_unit_edit
  • Löschenorg_unit_delete

Felder

Org Unit Schema

org_units4 Permissions

Schema for organisational units (Abteilungen, Teams)

namestringerforderlich

Name of the organisational unit

1–200 Zeichen
parentUnitIduuidoptional

Parent org unit ID for hierarchical structures

nullable
kindstringoptional

Structural classification (ADR 0107). TEAM = operational unit (people work here, customers get assigned here); DEPARTMENT = Abteilung (mid-layer); DIVISION = Fachbereich (top-layer, carries cost-center/budget identity). Informational by default — actual permission behavior is driven by data_scope.* and parties.allowed_assignment_ou_kinds setting_overrides.

TEAMDEPARTMENTDIVISION
Default: "TEAM"
managerIdsuuid[]optional

User IDs of the unit managers/leads. Supports co-leadership (Doppelspitze): all entries are equal leads — each is a SpiceDB `manager` and a valid approver source (ADR 0144). Replaces the former single `managerId` field (ADR 0148).

Default: []
descriptionstringoptional

Description of the organisational unit

max 2000 Zeichennullable
costCenterIduuidoptional

FK auf cost_center. Wird von Positionen dieser OU geerbt; Positionen können übersteuern. Siehe ADR 0116a.

nullable
isActivebooleanoptional

Whether this unit is currently active

Default: true
timeZonestringoptional

IANA-Zeitzone des Unit-Standorts (z.B. "Europe/Berlin"). Wird vom Working-Time-Resolver für Schicht-/Zuschlag-Zeitfenster benutzt. Override gegenüber Tenant-Default, überschrieben durch employee_profile.timeZone.

max 64 Zeichennullable
holidayRegionstringoptional

ISO 3166-2 Feiertagsregion der Unit (z.B. "DE-NW"). Override gegenüber tenant.settings.defaultHolidayRegion, überschrieben durch employee_profile.holidayRegion.

Patternnullable
dailyClosingConfigobjectoptional

Configuration for daily closing (Tagesabschluss) requirement

nullable
enabledbooleanoptional

Whether daily closing is required for this org unit

Default: false
deadlineTimestringoptional

Deadline for daily closing (HH:MM, e.g. 18:00)

Pattern
reminderMinutesBeforeintegeroptional

Minutes before deadline to send reminder

≥ 0Default: 30
excludeWeekendsbooleanoptional

Whether weekends are excluded from daily closing requirement

Default: true
staffingRulesobject[]optional

Minimum staffing rules for this org unit

Default: []
iduuiderforderlich

Unique rule identifier (UUIDv7)

ruleTypestringerforderlich

Type of staffing rule

MIN_HEADCOUNTMIN_HEADCOUNT_WITH_SKILL
minCountnumbererforderlich

Minimum number of employees required

1 – 100
skillIduuidoptional

Required skill (for MIN_HEADCOUNT_WITH_SKILL)

nullable
minSkillLevelstringoptional

Minimum proficiency level for the required skill

BEGINNERINTERMEDIATEADVANCEDEXPERT
nullable
timeWindowobjectoptional

Time window for the rule (defaults to core hours)

nullable
startTimestringerforderlich
Pattern
endTimestringerforderlich
Pattern
daysOfWeeknumber[]optional

ISO weekdays (1=Mon … 7=Sun), defaults to Mon-Fri

nullable
isActivebooleanerforderlich

Whether this rule is currently active

Default: true
skillTargetsobject[]optional

Strategic skill staffing targets for this org unit (e.g. "≥2 Mitarbeiter müssen M365 Administration auf Experten-Level beherrschen"). Targets are NOT inherited downward — they apply only to the OU they are defined on. However, members of sub-OUs DO contribute to the target count when evaluating coverage (transitive members count). Used by the Skill-Matrix to flag Lücken. Distinct from staffingRules, which model shift-time coverage (timeWindow/daysOfWeek). See ADR 0137.

Default: []
iduuiderforderlich

Unique target identifier (UUIDv7)

skillIduuiderforderlich

FK to skill_definitions._id (leaf or parent skill)

minHoldersintegererforderlich

Minimum number of employees that must meet the target

1 – 100
minLevelstringoptional

Minimum proficiency tier required. NULL means any level counts (and is implied for binary skills, which have no level).

BEGINNERINTERMEDIATEADVANCEDEXPERT
nullable
notesstringoptional

Free-text rationale / context for this target

max 500 Zeichennullable

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/org_units — Liste, paginiert + filterbar
  • GET /api/v1/org_units/<id> — Einzelne Entity
  • POST /api/v1/org_units — Anlegen
  • PATCH /api/v1/org_units/<id> — Teil-Update
  • DELETE /api/v1/org_units/<id> — Soft-Delete
  • GET /api/v1/org_units/<id>/timeline — Audit + Aktivitäten

Suche