Retrieve Employees List
Overview​
Retrieves a paginated list of employee records. Supports filtering by status and date range. Set isExport to true to generate an Excel export of the results instead of a paginated JSON response.
Command Details​
- Command:
RetrieveEmployeesListQuery - Type: Query (read operation)
API Endpoint​
POST /api/bpm/cmd
Request Structure​
| Field | Type | Required | Description |
|---|---|---|---|
$type | string | Yes | Must be RetrieveEmployeesListQuery |
isExport | bool | No | Set to true to export results as Excel (default: false) |
pageNumber | int | No | Page number (default: 1) |
pageSize | int | No | Items per page (default: 10) |
id | int | No | Filter by employee ID |
status | array of int | No | Filter by employee status codes |
startDate | string | No | Filter employees created on or after this date (ISO 8601) |
endDate | string | No | Filter employees created on or before this date (ISO 8601) |
Try It Out​
POST
/api/bpm/cmdRetrieveEmployeesListQueryRequest Body
Response Structure​
Success:
{
"success": true,
"data": {
"items": [
{
"id": 101,
"staffId": "EMP-001234",
"email": "john.doe@company.com",
"firstName": "John",
"lastName": "Doe",
"referralCode": "REF-EMP001234",
"branch": "Lagos Main Branch",
"branchName": "Lagos Main Branch",
"role": "Relationship Manager",
"roleName": "Relationship Manager",
"isAccountOfficer": false,
"canReferCustomer": true,
"status": 1,
"createdAt": "2026-03-09T10:30:00Z"
}
],
"pageNumber": 1,
"pageSize": 10,
"totalCount": 1,
"totalPages": 1
},
"message": "Employees retrieved successfully"
}
Error:
{
"success": false,
"data": null,
"message": "Failed to retrieve employees",
"errors": [
"Invalid filter parameters"
]
}
Related Operations​
- Retrieve Employee by ID — Get a single employee
- Create Employee — Add a new employee
- Upload Employees — Bulk import from Excel