Skip to main content

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​

FieldTypeRequiredDescription
$typestringYesMust be RetrieveEmployeesListQuery
isExportboolNoSet to true to export results as Excel (default: false)
pageNumberintNoPage number (default: 1)
pageSizeintNoItems per page (default: 10)
idintNoFilter by employee ID
statusarray of intNoFilter by employee status codes
startDatestringNoFilter employees created on or after this date (ISO 8601)
endDatestringNoFilter employees created on or before this date (ISO 8601)

Try It Out​

POST/api/bpm/cmdRetrieveEmployeesListQuery
Request 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"
]
}