Skip to main content

Send Referral Code

Overview​

Sends the employee's unique referral code to their registered email address. This allows employees to easily share their referral code with potential customers.

Command Details​

  • Command: SendEmployeeReferralCodeCommand
  • Type: Command (write operation)

API Endpoint​

POST /api/bpm/cmd

Request Structure​

FieldTypeRequiredDescription
idlongYesThe employee record ID

Try It Out​

POST/api/bpm/cmdSendEmployeeReferralCodeCommand
Request Body

Response Structure​

Success:

{
"success": true,
"data": {
"id": 101,
"staffId": "EMP-001234",
"referralCode": "A3X9K2",
"sentTo": "john.doe@company.com"
},
"message": "Referral code has been sent to john.doe@company.com."
}

Error — Employee not found:

{
"success": false,
"data": null,
"message": "Employee with ID 999 not found."
}

Error — No email:

{
"success": false,
"data": null,
"message": "Employee does not have an email address configured."
}