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)
filtersarrayNoDynamic predicate filters (see below)

Dynamic Filter Fields​

The filters array supports dot-notation property paths on the Employee entity. Use the exact field paths below.

Filter goalCorrect field valueExample
Filter by emailEmployeeContact.Email{"field": "EmployeeContact.Email", "operator": "equals", "value": "john@example.com"}
Filter by first nameFirstName{"field": "FirstName", "operator": "contains", "value": "John"}
Filter by staff IDStaffId{"field": "StaffId", "operator": "equals", "value": "EMP-001"}
Filter by date rangeUse startDate / endDate paramsDo not use CreatedAt in filters — use the top-level startDate/endDate fields instead
warning

Do not use ContactDetails.Email as a filter field name — the actual navigation property is EmployeeContact.Email. Using the wrong path will return unfiltered results.

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"
]
}