Public
Documentation Settings

LoanDefaultPredictionAPI

Loan Default Prediction API which predicts if an applicant would be granted a loan [1] or not [0] based on Applicant(s) information passed to API request

POSTLoanPredict

https://loan-default-api.herokuapp.com/predict
Bodyraw (json)
json
[
    {
        "ApplicantIncome": 5000,
        "CoapplicantIncome": 200,
        "LoanAmount": 15000,
        "Loan_Amount_Term": 365,
        "Credit_History": 1,
        "Gender": "Male",
        "Married": "Yes",
        "Dependents": 1,
        "Education": "Graduate",
        "Self_Employed": "No",
        "Property_Area": "Urban"
    },
    {
        "ApplicantIncome": 1000,
        "CoapplicantIncome": 0,
        "LoanAmount": 125000,
        "Loan_Amount_Term": 360,
        "Credit_History": 0,
        "Gender": "Female",
        "Married": "Yes",
        "Dependents": 4,
        "Education": "Graduate",
        "Self_Employed": "Yes",
        "Property_Area": "Urban"
    },

    {
        "ApplicantIncome": 500000,
        "CoapplicantIncome": 0,
        "LoanAmount": 125000,
        "Loan_Amount_Term": 360,
        "Credit_History": 0,
        "Gender": "male",
        "Married": "Yes",
        "Dependents": 4,
        "Education": "Graduate",
        "Self_Employed": "Yes",
        "Property_Area": "Urban"
    }
]
Example Request
curl
curl --location 'https://loan-default-api.herokuapp.com/predict' \
--data '[
    {
        "ApplicantIncome": 5000,
        "CoapplicantIncome": 200,
        "LoanAmount": 15000,
        "Loan_Amount_Term": 365,
        "Credit_History": 1,
        "Gender": "Male",
        "Married": "Yes",
        "Dependents": 1,
        "Education": "Graduate",
        "Self_Employed": "No",
        "Property_Area": "Urban"
    },
    {
        "ApplicantIncome": 1000,
        "CoapplicantIncome": 0,
        "LoanAmount": 125000,
        "Loan_Amount_Term": 360,
        "Credit_History": 0,
        "Gender": "Female",
        "Married": "Yes",
        "Dependents": 4,
        "Education": "Graduate",
        "Self_Employed": "Yes",
        "Property_Area": "Urban"
    },

    {
        "ApplicantIncome": 500000,
        "CoapplicantIncome": 0,
        "LoanAmount": 125000,
        "Loan_Amount_Term": 360,
        "Credit_History": 0,
        "Gender": "male",
        "Married": "Yes",
        "Dependents": 4,
        "Education": "Graduate",
        "Self_Employed": "Yes",
        "Property_Area": "Urban"
    }
]'
200 OK
Example Response
json
{
  "prediction": "[1, 0, 0]"
}
Server

Cowboy

Date

Mon, 02 Aug 2021 08:31:14 GMT

Connection

keep-alive

Content-Type

application/json

Content-Length

27

Via

1.1 vegur