- Add a new customer to the customer table with an approved limit based on salary.
approved_limit = 36 * monthly_salary
(rounded to the nearest lakh).
- Request Body:
first_name
(string): First Name of customerlast_name
(string): Last Name of customerage
(int): Age of customermonthly_income
(int): Monthly income of the individualphone_number
(int): Phone number of the customer
- Response Body:
customer_id
(int): ID of the customername
(string): Name of the customerage
(int): Age of the customermonthly_income
(int): Monthly income of the individualapproved_limit
(int): Approved credit limitphone_number
(int): Phone number of the customer
- Check loan eligibility based on the credit score of the customer.
- Assign a credit score based on historical loan data.
- Approve loans based on credit score and other criteria.
- Request Body:
customer_id
(int): ID of the customerloan_amount
(float): Requested loan amountinterest_rate
(float): Interest rate on the loantenure
(int): Tenure of the loan
- Response Body:
customer_id
(int): ID of the customerapproval
(bool): Can the loan be approvedinterest_rate
(float): Interest rate on the loancorrected_interest_rate
(float): Corrected interest rate based on credit rating (if applicable)tenure
(int): Tenure of the loanmonthly_installment
(float): Monthly installment to be paid as repayment
- Process a new loan based on eligibility.
- Request Body:
customer_id
(int): ID of the customerloan_amount
(float): Requested loan amountinterest_rate
(float): Interest rate on the loantenure
(int): Tenure of the loan
- Response Body:
loan_id
(int): ID of the approved loan (null otherwise)customer_id
(int): ID of the customerloan_approved
(bool): Is the loan approvedmessage
(string): Appropriate message if the loan is not approvedmonthly_installment
(float): Monthly installment to be paid as repayment
- View loan details and customer details.
- Response Body:
loan_id
(int): ID of the approved loancustomer
(JSON): JSON containing customer details (id, first_name, last_name, phone_number, age)loan_approved
(bool): Is the loan approvedloan_amount
(float): Loan amountinterest_rate
(float): Interest rate of the approved loanmonthly_installment
(float): Monthly installment to be paid as repaymenttenure
(int): Tenure of the loan
- View all current loan details by customer ID.
- Response Body (List of loan items):
loan_id
(int): ID of the approved loanloan_approved
(bool): Is the loan approvedinterest_rate
(float): Interest rate of the approved loanmonthly_installment
(float): Monthly installment to be paid as repaymentrepayments_left
(int): Number of EMIs left