Get Employees API (Filtered by Band/Mapping Status)
Overview
Generic filtered query to fetch employees by company, assigned band, or mapping status (isMapped).
- Endpoint:
/api/bands/get-employees - Method:
POST - Access: Company Admin / Super Admin
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
companyId | String (UUID) | No | Target Company ID |
bandId | String (UUID) | No | Filter by specific Band ID |
isMapped | Boolean | No | true for mapped employees, false for unmapped |
search | String | No | Search by name, email, or phone |
page | Number | No | Pagination page (Default: 1) |
limit | Number | No | Items per page (Default: 10) |
Request Body Example
{
"companyId": "c478a846-993d-4c8d-bf8d-d77cb3370e01",
"isMapped": true,
"page": 1,
"limit": 10
}
Success Response (200 OK)
{
"success": true,
"message": "Employees list retrieved successfully",
"data": [
{
"id": "u1111111-1111-1111-1111-111111111111",
"firstName": "Rahul",
"lastName": "Sharma",
"email": "rahul.sharma@company.com",
"phone": "+919876543210",
"bandId": "b1234567-89ab-cdef-0123-456789abcdef",
"employeeBand": "Band 1",
"band": {
"id": "b1234567-89ab-cdef-0123-456789abcdef",
"name": "Band 1",
"autoApprovalLimit": "7000.00"
}
}
],
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"itemsPerPage": 10,
"hasNextPage": false,
"hasPreviousPage": false
}
}