Skip to main content
POST
Create unit

Body

application/json
name
string
required

Unit name

reference
string | null

External reference identifier

parent_id
integer | null

Parent unit ID

description
string | null

Response

Unit created

content_type
string
Example:

"unit"

id
integer
Example:

1

reference
string | null
name
string
Example:

"HQ"

description
string | null
level
integer

Depth in unit tree

path
string

Materialized path

unit_type
string
Example:

"unit"

falldown
boolean | null

From pivot when in context

features
object[] | null
departments
object[] | null
parent
object | null

Parent unit when loaded

image
object | null

Unit image when loaded

children
object[] | null
addresses
object

Company, delivery, invoicing addresses

contact
object

Contact name and phone

opening_hours
object

Office hours and closed days

geo
object
stats
object | null
permissions
object

Permission flags for current user

url
string
Example:

"api/units/1"