Skip to main content

GetSelfServiceLoanProductConfiByCodeQuery

Overview​

Returns the complete YAML-backed configuration for one self-service loan product. The command reads the General Configuration whose code is loanProductConfiguration and performs a case-insensitive match on the product code.

The command requires administrator authorization, matching the existing loan-product administration commands.

Request​

{
"cmd": "GetSelfServiceLoanProductConfiByCodeQuery",
"data": "{\"productCode\":\"SALARY_LOAN\"}"
}
FieldRequiredDescription
productCodeYesProduct code configured in loanProductConfiguration

DTI configuration​

Each product has a defaultDti and can override the rate for selected employment categories through dtiByEmployments. Rates are ratios between 0 and 1; for example, 0.40 means 40%.

loanProducts:
- name: Salary Loan
code: SALARY_LOAN
defaultDti: 0.40
dtiByEmployments:
- employmentCategory: federalGovernment
rate: 0.40
- employmentCategory: police
rate: 0.40
- employmentCategory: tertiary
rate: 0.30
- employmentCategory: lagosStateGovernment
rate: 0.50
- employmentCategory: otherStateGovernments
rate: 0.50

employmentCategory is an EmploymentStatusType enum value represented by its YAML alias. Supported aliases are:

unemployed
selfEmployedSme
privateSector
lagosStateGovernment
otherStateGovernments
federalGovernment
retired
student
police
custom
tertiary

If no entry matches the applicant's employment category, defaultDti applies. Existing products that omit defaultDti receive the backward-compatible value 0.40.

Response​

{
"isSuccessful": true,
"statusCode": "00",
"message": "Loan product configuration retrieved successfully.",
"data": {
"configurationCode": "loanProductConfiguration",
"name": "Salary Loan",
"code": "SALARY_LOAN",
"currencyCode": "NGN",
"defaultDti": 0.40,
"dtiByEmployments": [
{
"employmentCategory": "lagosStateGovernment",
"employmentCategoryValue": 3,
"employmentCategoryDescription": "Lagos State Government",
"rate": 0.50
}
],
"underWritingProcessKey": "SALARY_LOAN_APPROVAL",
"isDirect": false
}
}

The command returns status code 04 when the configuration or requested product is not found, and 08 for an invalid request or invalid YAML configuration.

Validation​

Configuration validation rejects:

  • a defaultDti or employment rate outside 0 to 1;
  • duplicate employment categories within one product;
  • unknown EmploymentStatusType YAML aliases;
  • duplicate product codes.