Skip to main content

Update Employee

Overview​

Updates an existing employee record. All provided fields will overwrite the current values. The employee's referralCode is not affected by updates — it remains the same as when the employee was originally created.

Command Details​

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

API Endpoint​

POST /api/bpm/cmd

Request Structure​

FieldTypeRequiredDescription
$typestringYesMust be UpdateEmployeeCommand
idlongYesThe employee record ID
staffIdstringYesUnique staff identifier
emailstringYesEmployee email address
titlestringNoTitle (e.g., Mr, Mrs, Dr)
firstNamestringYesEmployee first name
lastNamestringYesEmployee last name
middleNamestringNoEmployee middle name
dateOfBirthstringNoDate of birth (ISO 8601)
branchstringNoBranch name or code
rolestringNoEmployee role or position
isAccountOfficerboolNoWhether the employee is an account officer (default: false)
canReferCustomerboolNoWhether the employee can refer customers (default: true)
isEnabledboolNoWhether the employee is enabled/active for operations
notestringNoAdditional notes
contactDetailsobjectNoContact information object
contactDetails.mobilestringNoMobile phone number
contactDetails.addressLine1stringNoAddress line 1
contactDetails.addressLine2stringNoAddress line 2
contactDetails.citystringNoCity
contactDetails.statestringNoState or province
contactDetails.zipCodestringNoZIP or postal code
contactDetails.countrystringNoCountry

Try It Out​

POST/api/bpm/cmdUpdateEmployeeCommand
Request Body

Response Structure​

Success:

{
"success": true,
"data": {
"id": 101,
"staffId": "EMP-001234",
"email": "john.doe@company.com",
"firstName": "John",
"lastName": "Doe",
"branch": "Victoria Island Branch",
"branchName": "Victoria Island Branch",
"role": "Senior Relationship Manager",
"roleName": "Senior Relationship Manager",
"isAccountOfficer": true,
"canReferCustomer": true,
"isEnabled": true,
"updatedAt": "2026-03-09T14:00:00Z"
},
"message": "Employee updated successfully"
}

Error:

{
"success": false,
"data": null,
"message": "Update failed",
"errors": [
"Employee not found"
]
}