- 03 May 2023
- 2 Minutes To Read
- Print
- DarkLight
- PDF
Loan Risk Levels Configuration
- Updated On 03 May 2023
- 2 Minutes To Read
- Print
- DarkLight
- PDF
Risk Levels are user-defined categories composed of an interval for number of days in arrears and a correspondent provision amount. Risk levels will be used to calculate the organization’s portfolio at risk (PAR), based on the number of loans in arrears that fall into each level. For more information, see Defining Risk Levels.
With Configuration as Code (CasC), you may batch configure your loan risk levels configuration via the API using YAML. For general information on CasC, see Configuration as Code Overview.
API Operations
CasC for loan risk levels supports two operations.
Action | Endpoint | Description |
---|---|---|
GET | /configuration/loanrisklevels.yaml | Get current loan risk levels configuration. |
PUT | /configuration/loanrisklevels.yaml | Write a new loan risk levels configuration to Mambu. |
If you PUT
a configuration to Mambu, any current configuration settings not included in the new YAML configuration will be deleted. PATCH
requests are not currently supported.
Requests
For general information on CasC requests such as authentication and required headers, see Configuration as Code Overview.
The following section shows sample requests using curl and basic authentication. For all examples, replace TENANT_NAME
with your actual tenant name.
GET configuration
curl -X GET 'https://TENANT_NAME.mambu.com/api/configuration/loanrisklevels.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Authorization: Basic {auth}'
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
PUT configuration
curl -X PUT 'https://TENANT_NAME.mambu.com/api/configuration/loanrisklevels.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @loanrisklevels.yaml
{auth} is the base-64-encoded value of username:password
. For more information, see Authentication in our API reference.
@loanrisklevels.yaml
represents the absolute path of the file on your device.
Use “--data-raw” if you want to specify the YAML body inline.
Configuration body example
---
loanRiskLevels:
- id: "1"
name: "Mild Risk"
arrearsFrom: 10
arrearsTo: 30
provisioningPercent: 4.5
- id: "1153177013"
name: "Healthy loans"
arrearsFrom: 0
arrearsTo: 0
provisioningPercent: 3
- id: "2"
name: "Moderate Risk"
arrearsFrom: 30
arrearsTo: 40
provisioningPercent: 7
Attributes
Name | Type | Description | Required |
---|---|---|---|
id | String | User-defined ID, globally unique. | ✔ |
name | String | Name of the loan risk level. | ✔ |
arrearsFrom | Integer(int32) | Lower level of the band of number of days the account is at risk. | ✔ |
arrearsTo | Integer(int32) | Upper level of the band of number of days the account is at risk. | ✔ |
provisioningPercent | Number | How much to provision at this level (as a percent). | ✔ |
Replies
If you do not receive a If you If you encounter this issue, please contact us through Mambu Support so we can investigate it.200 OK
status code then fix any validation errors and make another PUT
request until you receive a 200 OK
status code.PUT
a valid YAML configuration to the API and you do not receive a 200 OK
status code within 60 seconds, you may receive a 504 Gateway Timeout
status code. We expect all responses to be below 60 seconds.
Input Requirements
Name | Validations |
---|---|
id | Must not be blank, must not exceed 32 characters in length, must contain only letters and numbers, and must be unique in the configuration. |
name | Must not be blank and must not exceed 256 characters in length. |
arrearsFrom arrearsTo | Must be a whole number (positive or 0), cannot be null or empty, cannot be larger than 2,000,000,000. |
provisioningPercent | Can be any number, but cannot be null or empty. |