Master Records
Frappe Lending provides REST API support to create essential master records required for loan processing. These APIs allow external applications to create applicants, charges, loan categories, and loan products programmatically.
The following APIs demonstrate how to create borrower records, charge items, loan categories, and loan products using the /api/resource endpoint.
Did You Know?
Frappe REST APIs allow lending platforms to integrate with external applications while maintaining the same document structure used inside the system.
Applicant (Customer/Borrower)
An Applicant represents the borrower or customer associated with a loan. In Frappe Lending, applicants are managed through the Customer document.
API Endpoint
POST /api/resource/Customer
Request Body
{
"customer_name": "New Ventures LLC",
"customer_type": "Company",
"email_id": "info@newventures.co"
}
Response
{
"data": {
"name": "CUST-00003",
"customer_name": "New Ventures LLC",
"customer_type": "Company",
"email_id": "info@newventures.co",
"owner": "test@example.com",
"creation": "2025-09-22 10:00:00.000000",
"modified": "2025-09-22 10:00:00.000000"
}
}
Charges (Items)
Charges used in loan transactions are created as Item records. These items can represent service-based fees such as documentation charges, processing fees, or other loan-related charges.
API Endpoint
POST /api/resource/Item
Request Body
{
"item_code": "DOC-FEE-01",
"item_name": "Documentation Charge",
"item_group": "Service",
"is_stock_item": 0,
"is_service_item": 1,
"stock_uom": "Nos",
"rate": 500
}
Response
{
"data": {
"name": "ITEM-00004",
"item_code": "DOC-FEE-01",
"item_name": "Documentation Charge",
"item_group": "Service",
"is_stock_item": 0,
"is_service_item": 1,
"stock_uom": "Nos",
"rate": 500,
"owner": "test@example.com",
"creation": "2025-09-22 13:00:00.000000",
"modified": "2025-09-22 13:00:00.000000"
}
}
Loan Category
Loan Category defines the classification of loans offered by the lending institution. It helps organize loan products based on their purpose or type.
API Endpoint
POST /api/resource/Loan Category
Request Body
{
"loan_category_code": "LAP",
"loan_category_name": "Loan Against Property"
}
Response
{
"data": {
"name": "LAP",
"loan_category_code": "LAP",
"loan_category_name": "Loan Against Property",
"owner": "test@example.com",
"creation": "2025-09-22 17:00:00.000000",
"modified": "2025-09-22 17:00:00.000000"
}
}
Loan Product
A Loan Product defines the rules and parameters used for creating loans, including interest rate, repayment schedule, maximum loan amount, and loan type.
API Endpoint
POST /api/resource/Loan Product
Request Body
{
"product_name": "Personal Loan",
"product_code": "LN-PROD-00004",
"rate_of_interest": 8.5,
"repayment_schedule_type": "Monthly as per cycle date",
"maximum_loan_amount": 50000,
"is_term_loan": 1,
"min_days_bw_disbursement_first_repayment": 15
}
Response
{
"data": {
"name": "LN-PROD-00005",
"product_name": "Personal Loan",
"product_code": "LN-PROD-00004",
"rate_of_interest": 8.5,
"repayment_schedule_type": "Monthly as per cycle date",
"maximum_loan_amount": 50000,
"is_term_loan": 1,
"min_days_bw_disbursement_first_repayment": 15,
"owner": "test@example.com",
"creation": "2025-09-22 15:00:00.000000",
"modified": "2025-09-22 15:00:00.000000"
}
}
API Summary
| Document | API Endpoint | Purpose |
|---|---|---|
| Customer | /api/resource/Customer | Create borrower or applicant records. |
| Item | /api/resource/Item | Create loan-related charges and service items. |
| Loan Category | /api/resource/Loan Category | Create loan classifications. |
| Loan Product | /api/resource/Loan Product | Create loan product configurations. |
Best Practices
- Validate mandatory fields before creating records through API.
- Maintain consistent naming conventions for loan products and categories.
- Ensure borrower email addresses are accurate for communication workflows.
- Configure loan products carefully before creating loan applications.
- Use authentication and access controls when exposing lending APIs.