List Employee Bands API
Overview
Retrieves a paginated list of Employee Bands created for a specific company.
- Endpoint:
/api/bands/list - Method:
GET - Access: Corporate Admin / Manager / User
Query Parameters (req.query)
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | String (UUID) | Yes | Target company ID |
search | String | No | Search filter by band name, code, or description |
page | Number | No | Page number (Default: 1) |
limit | Number | No | Items per page (Default: 10, Max: 100) |
activeOnly | Boolean | No | Filter active bands only (true/false) |
Query Example
GET /api/bands/list?companyId=c478a846-993d-4c8d-bf8d-d77cb3370e01&search=Band&page=1&limit=10
Success Response (200 OK)
{
"success": true,
"message": "Employee Bands 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",
"_count": {
"users": 12
}
}
],
"pagination": {
"totalItems": 1,
"currentPage": 1,
"totalPages": 1,
"pageSize": 10,
"hasNextPage": false,
"hasPreviousPage": false
}
}
Database Impact
- Table:
employee_bands(EmployeeBandmodel) - Operations:
SELECTwithskip,take, andcountfor pagination.