Skip to main content

UpdateLoanInterestRateCommand

Overview​

Updates the interest rate and calculation method on a loan request. Can only be applied before the loan is fully approved.

Command Structure​

{
"cmd": "UpdateLoanInterestRateCommand",
"data": "{\"loanRequestId\":110,\"newInterestRate\":4.5,\"rateCalculationType\":2,\"comment\":\"Adjusted rate after credit review\"}"
}

Parameters​

ParameterTypeRequiredDescription
loanRequestIdlongYesID of the loan application
newInterestRatedecimalYesNew interest rate percentage
rateCalculationTypeintYesCalculation period (0=Daily, 1=Weekly, 2=Monthly, 3=Yearly)
commentstringNoReason for the rate change

Validations​

  • Loan must not be in FullyApproved state — returns an error if it is
  • The change is recorded in the loan approval history with the comment

Process​

  1. Retrieves loan quote by ID
  2. Validates loan is not yet fully approved
  3. Updates InterestRate and InterestCalculation on the loan quote
  4. Records the action in approval history
  5. Persists changes

Response​

{
"ok": true,
"statusCode": "00",
"message": "Loan interest rate updated successfully.",
"outData": {
"LoanRequestId": 110,
"comment": "Adjusted rate after credit review"
}
}