Skip to main content

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

ParameterTypeDescription
propertyTypeStringOFFICE, MULTIFAMILY, RETAIL, HOTEL, INDUSTRIAL, MIXED, OTHER
PROP_VALNumberProperty Value
NOINumberNet Operating Income
OBALNumberOutstanding Balance
LTVNumberLoan-to-Value ratio
DSCRNumberDebt Service Coverage Ratio
ORIG_AMTNumberOrigination Amount
RATENumberInterest Rate
TTANumberTime to Amortization (months)
AMORT_MNumberAmortization period (months)
GRNTRStringGuarantor 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: propertyTypeOFFICE, RETAIL, MULTIFAMILY, INDUSTRIAL, HOTEL, MIXED, OTHER

Request Body

ParameterTypeDescription
PROP_VALNumberProperty Value
NOINumberNet Operating Income
OBALNumberOutstanding Balance
ORIG_AMTNumberOrigination Amount
RATENumberInterest Rate
TTANumberTime to Amortization
AMORT_MNumberAmortization period
GRNTRStringGuarantor name
MAT_DEFNumberMaturity Default indicator
PD_INDNumberProbability of Default Indicator
DPVA_PVNumberDPVA Present Value
DPVA_LTVNumberDPVA 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 -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
}
FieldTypeDescription
probabilityNumberThe calculated probability of default
riskStringCategorized risk level (e.g., Low, High)
threshold_usedNumberThreshold 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:

ParameterTypeDescription
probability_of_defaultNumberPre-calculated PD to include in report
risk_levelStringPre-calculated risk level

Response

  • Content-Type: application/pdf
  • Returns: Binary PDF stream (cre_loan_report.pdf)