Get Employee Band by ID API
Overview
Retrieves full details of a specific Employee Band by ID, including assigned users list and company relation.
- Endpoint:
/api/bands/get-by-id - Method:
POST - Access: Corporate Admin / Manager / User
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Yes | Target Employee Band ID |
Request Body Example
{
"id": "b1234567-89ab-cdef-0123-456789abcdef"
}
Success Response (200 OK)
{
"success": true,
"message": "Employee Band details retrieved successfully",
"data": {
"id": "b1234567-89ab-cdef-0123-456789abcdef",
"companyId": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"name": "Band 1",
"code": "B1",
"description": "Junior Executive Level Band",
"autoApprovalLimit": "7000.00",
"maxBookingLimit": "25000.00",
"active": true,
"createdAt": "2026-08-24T12:00:00.000Z",
"updatedAt": "2026-08-24T12:00:00.000Z",
"company": {
"id": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"name": "Abbott Healthcare"
},
"users": [
{
"id": "u9876543-21ba-fedc-3210-9876543210fe",
"firstName": "Vikram",
"lastName": "Singh",
"email": "vikram.singh@abbott.com"
}
],
"_count": {
"users": 1
}
}
}
Error Response (404 Not Found)
{
"success": false,
"message": "Employee Band with ID 'b1234567-89ab-cdef-0123-456789abcdef' not found",
"data": null
}
Database Impact
- Tables:
employee_bands,companies,users - Operations:
SELECTwith relational inclusions.