Salta ai contenuti

OrgUnit

Questi contenuti non sono ancora disponibili nella tua lingua.

Manage organizational units, which are hierarchical groups of people that can fill company roles.
You can create, update, delete, and search for org units with advanced filtering and pagination.

Version
2.0.0
OpenAPI version
3.0.0
POST
/v2/org-unit/index

Returns a paginated and filterable list of org units.
Use POST to allow complex filters via JSON payload.

Parameters for searching org units

object
filter
object
org_unit_id
string format: uuid
code
string
name
string
parent_org_unit_id
string format: uuid
project_id
string format: uuid
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: code name
history
boolean
Example
{
"filter": {
"name": "HR",
"code": "ORG-001"
},
"per-page": 20,
"page": 1,
"sort": "name"
}

List of org units

Array<object>
object
org_unit_id
required
string
code
string
name
required
string
description
string
parent_org_unit_id
required
string
project_id
required
string
{
"org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"code": "ORG-001",
"name": "HR",
"description": "HR department",
"parent_org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"project_id": "452b7448dce72057574d59f93d456ed0"
}
Example
{
"org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"code": "ORG-001",
"name": "HR",
"description": "HR department",
"parent_org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"project_id": "452b7448dce72057574d59f93d456ed0"
}
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

GET
/v2/org-unit/view/{id}

Retrieve an org unit by its unique ID.

id
required
string format: uuid

ID of the org unit to retrieve

Org unit found

object
org_unit_id
required
string
code
string
name
required
string
description
string
parent_org_unit_id
required
string
project_id
required
string
Example
{
"org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"code": "ORG-001",
"name": "HR",
"description": "HR department",
"parent_org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"project_id": "452b7448dce72057574d59f93d456ed0"
}

Org unit not found

POST
/v2/org-unit/create

Create a new org unit by providing the required details.

Org unit object to be created

object
org_unit_id
required
string
code
string
name
required
string
description
string
parent_org_unit_id
required
string
project_id
required
string
Example
{
"code": "ORG-002",
"name": "IT",
"description": "IT department",
"parent_org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"project_id": "452b7448dce72057574d59f93d456ed0"
}

Org unit created successfully

object
org_unit_id
required
string
code
string
name
required
string
description
string
parent_org_unit_id
required
string
project_id
required
string
Example
{
"org_unit_id": "223e4567-e89b-12d3-a456-426655440000",
"code": "ORG-002",
"name": "IT",
"description": "IT department",
"parent_org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"project_id": "452b7448dce72057574d59f93d456ed0"
}
PUT
/v2/org-unit/update/{id}

Update an existing org unit by its unique ID.

id
required
string format: uuid

ID of the org unit to update

Org unit object with updated data

object
org_unit_id
required
string
code
string
name
required
string
description
string
parent_org_unit_id
required
string
project_id
required
string
Example
{
"name": "Updated HR",
"description": "Updated description"
}

Org unit updated successfully

object
org_unit_id
required
string
code
string
name
required
string
description
string
parent_org_unit_id
required
string
project_id
required
string
Example
{
"org_unit_id": "123e4567-e89b-12d3-a456-426655440000",
"name": "Updated HR",
"description": "Updated description"
}

Org unit not found

DELETE
/v2/org-unit/delete/{id}

Delete an org unit by its unique ID.
If force=true, all related entities will also be deleted.

id
required
string format: uuid

ID of the org unit to delete

force
boolean

Force the deletion of the entity and all related entities

Org unit deleted successfully

If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned