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
Operations
Sezione intitolata “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
Sezione intitolata “Request Body ”Parameters for searching org units
object
object
Example
{ "filter": { "name": "HR", "code": "ORG-001" }, "per-page": 20, "page": 1, "sort": "name"}
Responses
Sezione intitolata “ 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
Sezione intitolata “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
Sezione intitolata “Path Parameters ”ID of the org unit to retrieve
Responses
Sezione intitolata “ 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
POST /v2/org-unit/create
Create a new org unit by providing the required details.
Request Body required
Sezione intitolata “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
Sezione intitolata “ 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"}
PUT /v2/org-unit/update/{id}
Update an existing org unit by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the org unit to update
Request Body required
Sezione intitolata “Request Body required ”Org unit object with updated data
object
Example
{ "name": "Updated HR", "description": "Updated description"}
Responses
Sezione intitolata “ 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 /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
Sezione intitolata “Path Parameters ”ID of the org unit to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ 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