Skip to main content

UpdateSelfServiceLoanProductCommand

Overview​

Updates an existing loan product's parameters. All fields except loanProductId are optional — only provided fields are updated. Currency code cannot be changed after creation.

Command Structure​

{
"cmd": "UpdateSelfServiceLoanProductCommand",
"data": "{\"loanProductId\":5,\"interestRate\":4.0,\"interestRateCalculation\":2,\"maximumTenorInDays\":730}"
}

Parameters​

ParameterTypeRequiredDescription
loanProductIdlongYesID of the loan product to update
interestRateCalculationintYesInterest rate period type (0=Daily, 1=Weekly, 2=Monthly, 3=Yearly)
namestringNoNew display name
codestringNoNew product code
currencyCodestringNoCurrency — blocked from change (returns error)
interestRatedecimalNoNew interest rate percentage
disbursementFeeCalculationintNoFee calculation method (0=Flat, 1=% Loan, 2=% Disbursed)
loanFeedecimalNoNew fee amount or percentage
minimumAmountdecimalNoNew minimum loan amount
maximumAmountdecimalNoNew maximum loan amount
maximumTenorInDaysintNoNew maximum tenor in days

Validations​

  • Product must exist — error returned if loanProductId not found
  • name and code must remain unique — error if new value already belongs to another product
  • currencyCode change is blocked — returns an error if a new currency is provided

Response​

{
"ok": true,
"statusCode": "00",
"message": "Loan product updated successfully.",
"outData": {
"LoanProductId": 5,
"LoanProductName": "Personal Loan",
"LoanProductCode": "PERSONAL"
}
}