Skip to main content

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​

FieldTypeRequiredDescription
$typestringYesMust be RetrieveEmployeeReferralsQuery
employeeIdlongYesThe employee record ID to retrieve referrals for
pageNumberintNoPage number (default: 1)
pageSizeintNoItems per page (default: 10)
startDatestringNoFilter referrals created on or after this date (ISO 8601)
endDatestringNoFilter referrals created on or before this date (ISO 8601)

Try It Out​

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