Credit Card Loans (/api/v1/credit-card-loans)
Endpoints specific to credit card application decisioning and limit predictions.
1. Predict Credit Card Loan
Execute a risk and limit prediction for a credit card application based on user profile and financial history.
- Method:
POST - Endpoint:
/api/v1/credit-card-loans/predict - Authentication: Required (
X-API-Keyor Bearer / session — see Introduction) - Headers:
X-API-Key: <your_api_key>Content-Type: application/json
Request Body
| Parameter | Type | Description |
|---|---|---|
Total_Good_Debt | Number | The applicant's total existing good debt. |
Applicant_Gender_M | Number | 1 if male, 0 otherwise. |
Income_Type_Working | Number | 1 if standard working class, 0 otherwise. |
Job_Title_Laborers | Number | 1 if laborer role, 0 otherwise. |
Family_Status_Married | Number | 1 if married, 0 otherwise. |
Total_Income | Number | The applicant's annual gross income. |
Total_Children | Number | The number of children the applicant has. |
Years_of_Working | Number | Total years of employment. |
Applicant_Age | Number | Applicant's current age. |
Income_Type_State_servant | Number | 1 if state servant, 0 otherwise. |
- JSON Schema
- cURL
- Python
- JavaScript
{
"Total_Good_Debt": 15000,
"Applicant_Gender_M": 1,
"Income_Type_Working": 1,
"Job_Title_Laborers": 0,
"Family_Status_Married": 1,
"Total_Income": 95000,
"Total_Children": 2,
"Years_of_Working": 10,
"Applicant_Age": 35,
"Income_Type_State_servant": 0
}
curl -X POST https://api.riskinmind.ai/api/v1/credit-card-loans/predict \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Total_Good_Debt": 15000,
"Applicant_Gender_M": 1,
"Income_Type_Working": 1,
"Job_Title_Laborers": 0,
"Family_Status_Married": 1,
"Total_Income": 95000,
"Total_Children": 2,
"Years_of_Working": 10,
"Applicant_Age": 35,
"Income_Type_State_servant": 0
}'
import requests
url = "https://api.riskinmind.ai/api/v1/credit-card-loans/predict"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"Total_Good_Debt": 15000,
"Applicant_Gender_M": 1,
"Income_Type_Working": 1,
"Job_Title_Laborers": 0,
"Family_Status_Married": 1,
"Total_Income": 95000,
"Total_Children": 2,
"Years_of_Working": 10,
"Applicant_Age": 35,
"Income_Type_State_servant": 0
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://api.riskinmind.ai/api/v1/credit-card-loans/predict', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Total_Good_Debt: 15000,
Applicant_Gender_M: 1,
Income_Type_Working: 1,
Job_Title_Laborers: 0,
Family_Status_Married: 1,
Total_Income: 95000,
Total_Children: 2,
Years_of_Working: 10,
Applicant_Age: 35,
Income_Type_State_servant: 0
})
});
const data = await response.json();
console.log(data);
Response
- Content-Type:
application/json
{
"predictions": [
{
"probability": 0.85,
"rejection_probability": 0.15
}
]
}
| Field | Type | Description |
|---|---|---|
predictions[0].probability | Number | Likelihood of application approval (0-1). |
predictions[0].rejection_probability | Number | Likelihood of application rejection (0-1). |