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).
All endpoints require authentication via X-API-Key.
1. Create CRE Loan
Save a new CRE loan record.
- Method:
POST - Endpoint:
/api/v1/cre-loans
Request Body
| Parameter | Type | Description |
|---|---|---|
propertyType | String | OFFICE, MULTIFAMILY, RETAIL, HOTEL, INDUSTRIAL, MIXED, OTHER |
PROP_VAL | Number | Property Value |
NOI | Number | Net Operating Income |
OBAL | Number | Outstanding Balance |
LTV | Number | Loan-to-Value ratio |
DSCR | Number | Debt Service Coverage Ratio |
ORIG_AMT | Number | Origination Amount |
RATE | Number | Interest Rate |
TTA | Number | Time to Amortization (months) |
AMORT_M | Number | Amortization period (months) |
GRNTR | String | Guarantor name |
{
"propertyType": "OFFICE",
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"LTV": 75.0,
"DSCR": 1.35,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe"
}
Response (201 Created)
{
"id": "uuid",
"propertyType": "OFFICE",
"PROP_VAL": 1000000.00,
"NOI": 150000.00,
"OBAL": 750000.00,
"LTV": 75.0,
"DSCR": 1.35,
"ORIG_AMT": 800000.00,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"userId": "uuid",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z"
}
2. Get All CRE Loans
Retrieve all CRE loans for the authenticated user.
- Method:
GET - Endpoint:
/api/v1/cre-loans
Response
[
{
"id": "uuid",
"propertyType": "OFFICE",
"PROP_VAL": 1000000.00,
"NOI": 150000.00,
...
}
]
3. Get CRE Loan by ID
Retrieve a specific CRE loan.
- Method:
GET - Endpoint:
/api/v1/cre-loans/:id
4. Predict CRE Loan Risk (JSON)
Run a risk assessment tailored to Commercial Real Estate properties. Consumes credits (CRE_LOAN_PREDICTION).
- Method:
POST - Endpoint:
/api/v1/cre-loans/predict/:propertyType - Path Param:
propertyType—OFFICE,RETAIL,MULTIFAMILY,INDUSTRIAL,HOTEL,MIXED,OTHER
Request Body
| Parameter | Type | Description |
|---|---|---|
PROP_VAL | Number | Property Value |
NOI | Number | Net Operating Income |
OBAL | Number | Outstanding Balance |
ORIG_AMT | Number | Origination Amount |
RATE | Number | Interest Rate |
TTA | Number | Time to Amortization |
AMORT_M | Number | Amortization period |
GRNTR | String | Guarantor name |
MAT_DEF | Number | Maturity Default indicator |
PD_IND | Number | Probability of Default Indicator |
DPVA_PV | Number | DPVA Present Value |
DPVA_LTV | Number | DPVA Loan to Value |
{
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}
- cURL
curl -X POST https://api.riskinmind.ai/api/v1/cre-loans/predict/OFFICE \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"PROP_VAL": 1000000,
"NOI": 150000,
"OBAL": 750000,
"ORIG_AMT": 800000,
"RATE": 4.5,
"TTA": 12,
"AMORT_M": 360,
"GRNTR": "John Doe",
"MAT_DEF": 0,
"PD_IND": 0,
"DPVA_PV": 1000000,
"DPVA_LTV": 75.0
}'
Response
{
"probability": 0.05,
"risk": "Low",
"threshold_used": 0.15
}
| Field | Type | Description |
|---|---|---|
probability | Number | The calculated probability of default |
risk | String | Categorized risk level (e.g., Low, High) |
threshold_used | Number | Threshold used to classify risk |
5. Generate CRE Risk Report (PDF)
Submit CRE financial data to generate a risk prediction PDF report. Consumes credits (CRE_LOAN_REPORT_GEN).
- Method:
POST - Endpoint:
/api/v1/cre-loans/predict/pdf/:propertyType
Request Body
Same JSON payload structure as Predict CRE Loan Risk (PROP_VAL, NOI, OBAL, etc.), plus optional:
| Parameter | Type | Description |
|---|---|---|
probability_of_default | Number | Pre-calculated PD to include in report |
risk_level | String | Pre-calculated risk level |
Response
- Content-Type:
application/pdf - Returns: Binary PDF stream (
cre_loan_report.pdf)