Division erstellen
Erstellt eine Division. X-Tenant-ID wählt den Tenant aus. Fehlt der Header, ermittelt die API den Tenant aus parentId oder dem Scope des API-Keys; bei Mehrdeutigkeit schlägt die Anfrage fehl. Mit dryRun=true gibt die API die projizierte Division zurück, ohne sie zu speichern.
Auf einen Blick
Betriebsverhalten
Erstellt eine Division.X-Tenant-ID wählt den Tenant aus. Fehlt der Header, ermittelt die API den Tenant aus parentId oder dem Scope des API-Keys; bei Mehrdeutigkeit schlägt die Anfrage fehl. Mit dryRun=true gibt die API die projizierte Division zurück, ohne sie zu speichern.
parentId: nullerstellt eine Root-Division.- Der Name muss unter Geschwistern eindeutig sein.
- Eine Dry-Run-Vorschau-ID darf später nicht verwendet werden.
Häufige Fehler
Vor der Implementierung
- Erzeugen und protokollieren Sie für den Versuch eine neue
X-Request-ID. - Behandeln Sie jeden dokumentierten Response-Status.
- Protokollieren Sie weder
X-API-Keynoch unnötige personenbezogene Daten. - Gleichen Sie die aktuelle Geschwisterebene ab, bevor Sie einen mehrdeutigen Create-Vorgang wiederholen.
Zugehöriger Integrationsleitfaden
Autorisierungen
JobHandy integration API key. Send the credential in the X-API-Key header. Treat the key as a secret and use it only from trusted server-side environments.
Header
Tenant in which to create the resource. If omitted, the API infers the tenant as described for this operation. In interactive clients, use the {{tenantId}} variable when a tenant must be selected. Keep the header disabled when tenant selection is not required.
^[0-9a-fA-F]{24}$Optional request identifier. If supplied, it must be a UUID v4 or v7 and is returned unchanged in every response. If omitted, the API generates one. Invalid values return 400 INVALID_REQUEST_ID. If your client uses a {{requestId}} variable, refresh it with a new UUID version 4 or 7 for every HTTP request attempt. Keep the header disabled to let the API generate the request identifier.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[47][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Abfrageparameter
When true, the API validates the request without applying the change. The operation's responses specify the returned representation. When omitted, the server uses false.
true
Body
The JSON request body must not exceed 5,242,880 bytes.
Fields accepted when creating a division.
Division name. It must be unique among siblings.
1"Sales"
Parent division ID. Use null or omit the field to create a root division.
^[0-9a-fA-F]{24}$"68920e08eeaea4f2301eecb3"
Display order among sibling divisions. Defaults after the last sibling.
1
Optional customer-defined cost center. Omit the field when no cost center is assigned.
"CC-SALES"
Antwort
Dry-run validation succeeded. Returns the division that would be created; it is not stored.
Division details.
Division ID. A create dry run returns a preview ID that cannot be used in later requests.
"68920e08eeaea4f2301eecb3"
ID of the tenant that owns the division.
^[0-9a-fA-F]{24}$"68a000000000000000000010"
Division name.
"Sales"
Parent division ID, or null for a root division.
1^[0-9a-fA-F]{24}$null
Display order among sibling divisions.
1
Customer-defined cost center, or null when none is assigned.
1"CC-SALES"
UTC creation timestamp.
1Z$"2026-01-15T10:30:00.000Z"
UTC timestamp of the latest update.
1Z$"2026-07-01T08:15:00.000Z"
