cURL
Hierarchy
Set parent customer
Assigns a parent customer to establish an organizational hierarchy. The hierarchy supports a maximum of 3 levels. Circular references and self-assignment are not permitted. Both the parent and child customer must belong to the same tenant, and the parent customer must be active (not archived).
This endpoint requires the customer.hierarchy feature to be enabled.
customer:writePUT
cURL
Establishes a parent-child relationship between two customers. This is used to model organizational structures such as a company with departments, a clinic with specialized units, or a retail chain with individual stores.
Validation
The following rules are enforced when assigning a parent customer:- The parent and child customer must belong to the same tenant
- A customer cannot be its own parent
- Circular references are not permitted (e.g., A → B → A)
- The hierarchy supports a maximum of 3 levels (root → child → grandchild)
- The parent customer must be active (not archived)
400 Bad Request with a descriptive error message.
Feature Flag
This endpoint requires thecustomer.hierarchy feature to be enabled. If the feature is not active, a 501 Not Implemented response is returned.
Webhooks
A successful assignment dispatches thecustomer.parent.assigned webhook event, which includes the full customer and parent customer payloads.Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Pfadparameter
The ID of the customer to assign a parent to
Body
application/json
The parent customer assignment
The ID of the customer to set as parent
Beispiel:
"00000000-0000-0000-0000-000000000000"