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​
| Parameter | Type | Required | Description |
|---|---|---|---|
loanRequestId | long | Yes | ID of the loan application |
newInterestRate | decimal | Yes | New interest rate percentage |
rateCalculationType | int | Yes | Calculation period (0=Daily, 1=Weekly, 2=Monthly, 3=Yearly) |
comment | string | No | Reason for the rate change |
Validations​
- Loan must not be in
FullyApprovedstate — returns an error if it is - The change is recorded in the loan approval history with the comment
Process​
- Retrieves loan quote by ID
- Validates loan is not yet fully approved
- Updates
InterestRateandInterestCalculationon the loan quote - Records the action in approval history
- Persists changes
Response​
{
"ok": true,
"statusCode": "00",
"message": "Loan interest rate updated successfully.",
"outData": {
"LoanRequestId": 110,
"comment": "Adjusted rate after credit review"
}
}