Commercial Real Estate (CRE) Loans (/api/v1/cre-loans)
Endpoints specific to Commercial Real Estate loan applications. These differ from standard consumer loans by relying on metrics like NOI (Net Operating Income), Cap Rates, and DSCR (Debt Service Coverage Ratio).
1. Create a CRE Loan
Creates a new Commercial Real Estate loan application.
- Method:
POST - Endpoint:
/api/v1/cre-loans/ - Authentication: Required (
Bearer Token)
Request Body
{
"propertyAddress": "123 Business Avenue",
"loanAmount": 2500000,
"term": 120,
"interestRate": 6.5,
"propertyType": "OFFICE"
}
Response
{
"success": true,
"data": {
"id": "cre_123",
"status": "UNDER_REVIEW"
}
}
2. Get All User CRE Loans
Retrieves a list of CRE loan applications belonging to the authenticated user.
- Method:
GET - Endpoint:
/api/v1/cre-loans/ - Authentication: Required (
Bearer Token) - Query Params: (Optional pagination/filters)
Response
{
"success": true,
"data": [
{
"id": "cre_123",
"propertyType": "OFFICE",
"loanAmount": 2500000
}
]
}
3. Predict CRE Loan Risk
Run a risk assessment tailored to Commercial Real Estate properties based on JSON data payload.
- Method:
POST - Endpoint:
/api/v1/cre-loans/predict/:propertyType - Path Param:
propertyType(e.g.,OFFICE,RETAIL,MULTIFAMILY,INDUSTRIAL)
Request Body
{
"loanId": "cre_123",
"dscr": 1.45,
"ltv": 65.0,
"occupancyRate": 92.5
}
Response
{
"success": true,
"data": {
"creScore": 90,
"riskLevel": "LOW_RISK",
"approvalProbability": 95.5
}
}
4. Predict Risk from PDF Document
Submit a CRE-related PDF document (like a rent roll or operating statement) to extract fields and run the risk prediction model immediately.
- Method:
POST - Endpoint:
/api/v1/cre-loans/predict/pdf/:propertyType - Authentication: Required (
Bearer Token) - Headers:
Content-Type: multipart/form-data
Request Payload
file: The PDF document to analyze.loanId: The ID of the CRE Loan.
Response
{
"success": true,
"data": {
"extractedData": {
"noi": 150000,
"grossIncome": 220000
},
"prediction": {
"creScore": 88,
"riskLevel": "LOW_RISK"
}
}
}
5. Get CRE Loan by ID
Retrieve details of a specific CRE loan.
- Method:
GET - Endpoint:
/api/v1/cre-loans/:id - Authentication: Required (
Bearer Token)
Response
{
"success": true,
"data": {
"id": "cre_123",
"propertyAddress": "123 Business Avenue",
"status": "APPROVED",
"createdAt": "2023-10-01T12:00:00Z"
}
}