Hierarchy model
parentId: null creates or moves a division to the tenant root.
Create flow
IfX-Tenant-ID is omitted, the create operation may infer the tenant from parentId or an unambiguous key scope. Send the header when more than one tenant is possible.
Create a root division
Create a child division
Reparent safely
A division cannot be moved to another tenant through the public update endpoint.Patch behavior
- Omit properties that should remain unchanged.
- Set
parentId: nullto move to the root. - Set nullable
costCenter: nullto clear the cost center. - Use dry run before hierarchy changes.
- Persist the returned state after the real patch.
Ordering
order is a numeric display order among sibling divisions. The updated provider schema uses the OpenAPI type number and no longer applies the previous integer-only multipleOf: 1 constraint. The create operation documents a server default after the last sibling when the value is omitted. The public contract does not guarantee that sibling order values are unique or automatically renumbered; read the resulting hierarchy and use the returned values.
