post
https://sandbox.pismolabs.io/apex/v1/hierarchies
Create a hierarchy and its levels. The client chooses the external_hierarchy_id of the hierarchy and the external_hierarchy_level_id of each level, which must be unique within the organization and cannot be changed after the hierarchy is created. The Pismo platform generates the hierarchy_id and the hierarchy_level_id of each level, and responses return both IDs.
This endpoint generates a Corporate hierarchy created event.
A hierarchy is typically used to organize divisions along territorial lines: headquarters > countries > regions > branches, and so on. Each level has an index, 0 for the root level.
Notes:
levelshas 1 to 10 levels, with sequentialindexvalues starting at0and no repeats. Levels can't be added, removed or changed after the hierarchy is created.- Two levels can't have the same
external_hierarchy_level_id(400,WAPX0092), and anexternal_hierarchy_level_idalready used by another hierarchy fails with409and the codeWAPX0091. - Creating with an
external_hierarchy_idthat's already in use creates nothing: the endpoint returns the response of the first creation with200, whatever the body. Use Get hierarchy to read the hierarchy's current state. - If the Pismo platform doesn't confirm the creation in time, the request fails with
504and the codeEAPX0030. Retry with the same body after theRetry-Afterdelay: the retry returns the hierarchy if Apex saved it, or creates it. If the Pismo platform created the hierarchy but didn't answer in time, the retry can create a second hierarchy, and the first one is left without an external ID.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…