Skip to main content

RejectLoanRequestCommand

Overview​

Rejects a loan application at the current approval level. The loan is moved to Rejected status and cannot proceed further. A rejection comment is mandatory.

Authorization​

Caller must hold a role with rejection authority: Branch Manager, Area Manager, Division Manager, Credit Admin, Head Credit Admin, Control Officer, Finance, MD, or GMD.

Command Structure​

{
"cmd": "RejectLoanRequestCommand",
"data": "{\"loanRequestId\":110,\"comment\":\"Insufficient income to service the requested amount\"}"
}

Parameters​

ParameterTypeRequiredDescription
loanRequestIdlongYesID of the loan application
commentstringYesMandatory rejection reason

Validations​

  • Loan must be in PendingApproval, PartialApproval, or Returned state
  • Caller must have a role with rejection authority and appropriate branch access

Process​

  1. Validates loan state and user role
  2. Checks for an active workflow UserTask — signals it with outcome=rejected if found
  3. Sets ApprovalStatus → "Rejected" and records in approval history
  4. Persists changes

Response​

{
"ok": true,
"statusCode": "00",
"message": "Loan request rejected successfully.",
"outData": {
"LoanRequestId": 110,
"comment": "Insufficient income to service the requested amount"
}
}