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

Org Unit Schema

Schema ID
org_unit
Collection
org_units
Permissions
  • Readorg_unit_view
  • Createorg_unit_create
  • Editorg_unit_edit
  • Deleteorg_unit_delete

Fields

Org Unit Schema

org_units4 permissions

Schema for organisational units (Abteilungen, Teams)

namestringrequired

Name of the organisational unit

1–200 characters
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 charactersnullable
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
excludeFromAutoSkillsbooleanoptional

ADR 0910 — members of this unit (and of its sub-units) receive NO automatic skill changes: no XP on ticket/task completion, no level change from a satisfaction survey. Manual assignment, grant-xp, certificates and LMS courses are unaffected. Fail-closed: membership in one flagged unit wins over any unflagged one. Written via the org-unit routes (allowlist in orgunit.routes.ts), like excludeFromDataScopes.

Default: false
dispatchLeadModestringoptional

Whether the auto-dispatch may suggest the leads (managerIds) of this unit: ALWAYS = like any other member, CRITICAL_ONLY = only on tickets the ticket or the AI rates CRITICAL, NEVER = not at all. A person leading several units gets the strictest mode. Missing = ALWAYS (no backfill). Written via the org-unit routes (allowlist in orgunit.routes.ts).

ALWAYSCRITICAL_ONLYNEVER
Default: "ALWAYS"
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 charactersnullable
holidayRegionstringoptional

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

Patternnullable
absenceApprovalConfigobjectoptional

ADR 0682 — Ob und durch wen Abwesenheitsanträge genehmigt werden. Jedes Feld ist optional; null/fehlend bedeutet „von der übergeordneten Ebene erben" (Mitarbeiter → Team → Abteilung → Bereich → Mandant → Standard).

nullable
modestringoptional

REQUIRED = Antrag muss genehmigt werden (Standard). NONE = Antrag wird beim Anlegen sofort genehmigt, es entsteht keine Genehmigungsanfrage.

REQUIREDNONEnull
nullable
approverModestringoptional

ORG_UNIT_LEAD = Leitung der Organisationseinheit (Standard, mit Kette über die übergeordnete Einheit). SPECIFIC_USERS = feste Personen. ROLE = alle Inhaber einer Rolle.

ORG_UNIT_LEADSPECIFIC_USERSROLEnull
nullable
approverUserIdsuuid[]optional

Nur bei approverMode=SPECIFIC_USERS: die genehmigenden Personen.

nullable
approverRoleSlugstringoptional

Nur bei approverMode=ROLE: Slug der Rolle aus role_definitions (z. B. "hr").

max 100 charactersnullable
allowSelfApprovalAsLeadbooleanoptional

Standard true. Darf eine Person ihren eigenen Antrag genehmigen, wenn sie selbst Leitung ihrer Einheit ist und weder Doppelspitze noch übergeordnete Leitung gepflegt sind? Gilt NUR für Leitungen — ein Mitarbeitender ohne gepflegte Teamleitung genehmigt sich dadurch nicht selbst.

nullable
fallbackApproverUserIdsuuid[]optional

Auffanglinie: greift, wenn die reguläre Kette keine erreichbaren Genehmiger liefert.

nullable
overtimeApprovalConfigobjectoptional

ADR 0709 — Ob eine Leitung die eigene Überstundenbuchung freigeben darf. Jedes Feld ist optional; null/fehlend bedeutet „von der übergeordneten Ebene erben" (Mitarbeiter → Team → Abteilung → Bereich → Mandant → Standard).

nullable
allowSelfApprovalAsLeadbooleanoptional

Standard FALSE (anders als bei der Urlaubsgenehmigung — ohne ausdrückliche Einstellung bleibt es beim 4-Augen-Prinzip). Darf eine Person ihre eigene Überstundenbuchung freigeben, wenn sie Leitung einer ihrer Einheiten ist? Gilt NUR für Leitungen; wer die Berechtigung overtime_approve ohne Leitungsfunktion hat, kann sich dadurch nicht selbst freigeben. Anders als beim Urlaub greift die Regel auch dann, wenn eine zweite oder übergeordnete Leitung verfügbar wäre.

nullable
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: []
iduuidrequired

Unique rule identifier (UUIDv7)

ruleTypestringrequired

Type of staffing rule

MIN_HEADCOUNTMIN_HEADCOUNT_WITH_SKILL
minCountnumberrequired

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
startTimestringrequired
Pattern
endTimestringrequired
Pattern
daysOfWeeknumber[]optional

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

nullable
isActivebooleanrequired

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: []
iduuidrequired

Unique target identifier (UUIDv7)

skillIduuidrequired

FK to skill_definitions._id (leaf or parent skill)

minHoldersintegerrequired

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 charactersnullable

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

Search