curl -X GET https://api.companyflow.com/departments/{id} \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"company_id": "987fcdeb-51a2-43f7-9c5d-123456789abc",
"name": "Engineering",
"code": "ENG",
"description": "Software engineering and development",
"parent_department_id": null,
"cost_center": "CC-100",
"status": "active",
"created_at": "2026-03-03T10:00:00Z",
"updated_at": "2026-03-03T10:00:00Z"
}
}
{
"success": false,
"message": "invalid department id"
}
{
"success": false,
"message": "missing authorization header"
}
{
"success": false,
"message": "department not found"
}
Departments
Get Department
Retrieve a specific department by ID
GET
/
departments
/
{id}
curl -X GET https://api.companyflow.com/departments/{id} \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"company_id": "987fcdeb-51a2-43f7-9c5d-123456789abc",
"name": "Engineering",
"code": "ENG",
"description": "Software engineering and development",
"parent_department_id": null,
"cost_center": "CC-100",
"status": "active",
"created_at": "2026-03-03T10:00:00Z",
"updated_at": "2026-03-03T10:00:00Z"
}
}
{
"success": false,
"message": "invalid department id"
}
{
"success": false,
"message": "missing authorization header"
}
{
"success": false,
"message": "department not found"
}
Authentication
This endpoint requires authentication with a Bearer token. Only users with Super Admin or HR Manager roles can retrieve department details.string
required
The unique identifier of the department
Response
boolean
Indicates if the request was successful
object
The department object
Show Department Object
Show Department Object
string
Unique department identifier
string
Company identifier
string
Department name
string
Department code
string
Department description
string
Parent department ID if hierarchical
string
Cost center identifier
string
Department status (active/inactive)
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
curl -X GET https://api.companyflow.com/departments/{id} \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"company_id": "987fcdeb-51a2-43f7-9c5d-123456789abc",
"name": "Engineering",
"code": "ENG",
"description": "Software engineering and development",
"parent_department_id": null,
"cost_center": "CC-100",
"status": "active",
"created_at": "2026-03-03T10:00:00Z",
"updated_at": "2026-03-03T10:00:00Z"
}
}
{
"success": false,
"message": "invalid department id"
}
{
"success": false,
"message": "missing authorization header"
}
{
"success": false,
"message": "department not found"
}