Retrieve Employee Referrals
Overview​
Retrieves a paginated list of referrals for a specific employee. Each referral represents a customer registration that was linked to the employee via their referral code. Supports date range filtering for performance tracking over specific periods.
Command Details​
- Command:
RetrieveEmployeeReferralsQuery - Type: Query (read operation)
API Endpoint​
POST /api/bpm/cmd
Request Structure​
| Field | Type | Required | Description |
|---|---|---|---|
$type | string | Yes | Must be RetrieveEmployeeReferralsQuery |
employeeId | long | Yes | The employee record ID to retrieve referrals for |
pageNumber | int | No | Page number (default: 1) |
pageSize | int | No | Items per page (default: 10) |
startDate | string | No | Filter referrals created on or after this date (ISO 8601) |
endDate | string | No | Filter referrals created on or before this date (ISO 8601) |
Try It Out​
POST
/api/bpm/cmdRetrieveEmployeeReferralsQueryRequest Body
Response Structure​
Success:
{
"success": true,
"data": {
"items": [
{
"referralId": 301,
"employeeId": 101,
"referralCode": "REF-EMP001234",
"customerName": "Jane Smith",
"customerAccountNumber": "0098765432",
"createdAt": "2026-02-20T09:15:00Z"
}
],
"pageNumber": 1,
"pageSize": 10,
"totalCount": 1,
"totalPages": 1
},
"message": "Referrals retrieved successfully"
}
Error:
{
"success": false,
"data": null,
"message": "Failed to retrieve referrals",
"errors": [
"Employee not found"
]
}
Related Operations​
- Create Referral — Link a customer to an employee referral
- Retrieve Employee by ID — Get details of the referring employee