Skip to main content

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

FieldTypeRequiredDescription
companyIdString (UUID)NoTarget Company ID
bandIdString (UUID)NoFilter by specific Band ID
isMappedBooleanNotrue for mapped employees, false for unmapped
searchStringNoSearch by name, email, or phone
pageNumberNoPagination page (Default: 1)
limitNumberNoItems 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
}
}