OrgUnit
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
Operations
Section titled “Operations” POST /v2/org-unit/index
Returns a paginated and filterable list of org units.
Use POST to allow complex filters via JSON payload.
Request Body
Section titled “Request Body ”Parameters for searching org units
object
object
Example
{ "filter": { "name": "HR", "code": "ORG-001" }, "per-page": 20, "page": 1, "sort": "name"}
Responses
Section titled “ Responses ”List of org units
object
{ "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"}
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
GET /v2/org-unit/view/{id}
Retrieve an org unit by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the org unit to retrieve
Responses
Section titled “ Responses ”Org unit found
object
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
create
Section titled “create” POST /v2/org-unit/create
Create a new org unit by providing the required details.
Request Body required
Section titled “Request Body required ”Org unit object to be created
object
Example
{ "code": "ORG-002", "name": "IT", "description": "IT department", "parent_org_unit_id": "123e4567-e89b-12d3-a456-426655440000", "project_id": "452b7448dce72057574d59f93d456ed0"}
Responses
Section titled “ Responses ”Org unit created successfully
object
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"}
update
Section titled “update” PUT /v2/org-unit/update/{id}
Update an existing org unit by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the org unit to update
Request Body required
Section titled “Request Body required ”Org unit object with updated data
object
Example
{ "name": "Updated HR", "description": "Updated description"}
Responses
Section titled “ Responses ”Org unit updated successfully
object
Example
{ "org_unit_id": "123e4567-e89b-12d3-a456-426655440000", "name": "Updated HR", "description": "Updated description"}
Org unit not found
delete
Section titled “delete” DELETE /v2/org-unit/delete/{id}
Delete an org unit by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Section titled “Path Parameters ”ID of the org unit to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”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