Skip to main content

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)

ParameterTypeRequiredDescription
companyIdString (UUID)YesTarget company ID
searchStringNoSearch filter by band name, code, or description
pageNumberNoPage number (Default: 1)
limitNumberNoItems per page (Default: 10, Max: 100)
activeOnlyBooleanNoFilter 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 (EmployeeBand model)
  • Operations: SELECT with skip, take, and count for pagination.