Investment · Calculation
Rental deal and buy-box screen
Calculates the four checks against caller thresholds using price plus repairs, alongside the price-only quick indicators. The quick GRM threshold uses a strict upper limit as on the app.
Example result · state: available See output
- Cost per success
- 10 calculation credits
- Production plans
- Standard, Business, Scale, Enterprise
Plan allowances - Free sandbox
- Not available
Integration example
Make a request
Use a production key scoped to investor-deal-screener.
Keep the key on your server. A successful call uses 10 calculation credits.
Set HT_PRODUCTION_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.
import { randomUUID } from "node:crypto";
const key = process.env.HT_PRODUCTION_KEY;
if (!key) throw new Error("Set HT_PRODUCTION_KEY on your server.");
const endpoint = "https://calc.hasstechapi.com/v2/calc/investor-deal-screener";
const input = {
"purchasePrice": 200000,
"monthlyRent": 2400,
"estimatedRepairs": 10000,
"monthlyOperatingExpenses": 600,
"annualDebtService": 14400,
"minRentToPricePct": 1,
"maxGrm": 12,
"minMonthlyCashFlow": 0,
"minDscr": 1.25
};
const requestId = process.env.HT_REQUEST_ID || Date.now() + "." + randomUUID();
// Keep this ID to look up usage if the connection is interrupted.
console.error("Usage lookup ID:", requestId);
const response = await fetch(endpoint, {
method: "POST",
redirect: "error",
headers: {
"Authorization": "Bearer " + key,
"Content-Type": "application/json",
"Idempotency-Key": requestId
},
body: JSON.stringify(input)
});
if (!response.ok) {
const problem = await response.json().catch(() => null);
const code = problem?.error?.code || response.statusText;
const delay = response.headers.get("retry-after");
if (delay) console.error("Retry-After (seconds):", delay);
console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
if (Array.isArray(problem?.error?.details)) {
for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
}
process.exitCode = 1;
} else {
console.log(JSON.stringify(await response.json(), null, 2));
} cURL (shell)
(
set -eu
: "${HT_PRODUCTION_KEY:?Set HT_PRODUCTION_KEY on your server}"
request_id="${HT_REQUEST_ID:-}"
if [ -z "$request_id" ]; then
request_id=$(python3 -c 'import time, uuid; print(str(time.time_ns() // 1000000) + "." + str(uuid.uuid4()))')
fi
printf 'Usage lookup ID: %s\n' "$request_id" >&2
# On INVALID_INPUT, read error.details in the JSON response body.
curl --disable --silent --show-error --fail-with-body --include \
--request POST 'https://calc.hasstechapi.com/v2/calc/investor-deal-screener' \
--header "Authorization: Bearer $HT_PRODUCTION_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $request_id" \
--data-binary @- <<'HT_INPUT'
{
"purchasePrice": 200000,
"monthlyRent": 2400,
"estimatedRepairs": 10000,
"monthlyOperatingExpenses": 600,
"annualDebtService": 14400,
"minRentToPricePct": 1,
"maxGrm": 12,
"minMonthlyCashFlow": 0,
"minDscr": 1.25
}
HT_INPUT
) If your request fails
400 INVALID_INPUT-
Read
error.detailswhen present. Node prints each issue. cURL returns the JSON body. Eachpathpoints into your request. An empty path refers to the whole body.Check the accepted inputs for required fields, units and ranges. Send the corrected JSON as a new request.
401or403- Check that the server has the bearer key for the endpoint’s environment and that the key includes
investor-deal-screener. 429- Read the service error code, check your allowance, and wait for the
Retry-Afterinterval when supplied before trying again. - Lost response,
409or503 - Open Request lookup, select the same environment and enter the printed usage lookup ID. A settled ID has already consumed credits. To retry the same calculation, set
HT_REQUEST_IDto the original ID and reuse the same inputs. A settled request does not return its result again. Unset the variable for a new request, which can consume credits.
The usage lookup ID is the Idempotency-Key your server sends. The response’s x-request-id identifies the HTTP exchange for support.
Output
Example result
These values come from running this operation on the example inputs.
state- available
formulaVersion- deal-screener-buy-box-1.0.0
value.verdict- meets-configured-buy-box
Result warnings
- This verdict only compares the property with the user-configured buy box; it is not a universal good-deal claim.
How to interpret this result
- Calculates the four checks against caller thresholds using price plus repairs, alongside the price-only quick indicators. The quick GRM threshold uses a strict upper limit as on the app.
Full example response (JSON)
{
"status": "available",
"result": {
"state": "available",
"fieldErrors": {},
"warnings": [
{
"code": "pre-screen-only",
"severity": "info",
"message": "This verdict only compares the property with the user-configured buy box; it is not a universal good-deal claim."
}
],
"assumptions": [
{
"key": "screeningPriceBasis",
"value": "purchase price plus estimated repairs",
"source": "default"
}
],
"provenance": [],
"formulaVersion": "deal-screener-buy-box-1.0.0",
"ruleVersions": [],
"auditTrail": [
"rent-to-price: pass (1.142857142857142857142857142857142857143 vs 1).",
"grm: pass (7.291666666666666666666666666666666666667 vs 12).",
"cash-flow: pass (600 vs 0).",
"dscr: pass (1.5 vs 1.25).",
"Compatibility adapter: the hub passes all-in acquisition cost as the screen price; thresholds remain user-configured and are exported with the result."
],
"value": {
"verdict": "meets-configured-buy-box",
"score": 100,
"rentToPricePct": "1.142857142857142857142857142857142857143",
"grm": "7.291666666666666666666666666666666666667",
"monthlyCashFlow": "600",
"dscr": "1.5",
"reasons": [
{
"code": "rent-to-price",
"passed": true,
"observed": "1.142857142857142857142857142857142857143",
"threshold": "1",
"deepLink": "/rental",
"label": "Rent-to-price pre-screen"
},
{
"code": "grm",
"passed": true,
"observed": "7.291666666666666666666666666666666666667",
"threshold": "12",
"deepLink": "/rental",
"label": "Gross rent multiplier pre-screen"
},
{
"code": "cash-flow",
"passed": true,
"observed": "600",
"threshold": "0",
"deepLink": "/cash-on-cash",
"label": "Monthly cash-flow threshold"
},
{
"code": "dscr",
"passed": true,
"observed": "1.5",
"threshold": "1.25",
"deepLink": "/dscr",
"label": "Debt-service coverage threshold"
}
],
"exportedThresholds": {
"minRentToPricePct": "1",
"maxGrm": "12",
"minMonthlyCashFlow": "0",
"minDscr": "1.25"
}
},
"quickScreen": {
"grm": 6.944444444444445,
"grmStatus": "available",
"onePercentRule": 1.2,
"allInCost": 210000,
"allInOnePercent": 1.1428571428571428,
"rentPass": true,
"grmPass": true
}
},
"formulaVersion": "deal-screener-buy-box-1.0.0",
"units": {
"currency": "USD",
"minRentToPricePct": "monthly rent / all-in basis as percent",
"grm": "price / annual gross rent, years",
"monthlyCashFlow": "USD per month",
"annualDebtService": "USD per year",
"dscr": "annual NOI / annual debt service, ratio",
"score": "points out of 100"
},
"assumptions": [
"Calculates the four checks against caller thresholds using price plus repairs, alongside the price-only quick indicators. The quick GRM threshold uses a strict upper limit as on the app."
],
"warnings": [
"This verdict only compares the property with the user-configured buy box; it is not a universal good-deal claim."
],
"creditCost": 10
}Request contract
Accepted inputs
Fields for this example. Expand the schema for all supported combinations and limits.
FieldType, units and limits
purchasePriceRequiredAcquisition price, in USD.
Min 0.01 · Max 1000000000monthlyRentRequiredScheduled gross rent, in USD per month before vacancy.
Min 0 · Max 1000000000estimatedRepairsRequiredRepair budget added to purchase price for all-in buy-box tests, in USD.
Min 0 · Max 1000000000monthlyOperatingExpensesRequiredOperating expenses before debt service, in USD per month.
Min 0 · Max 1000000000annualDebtServiceRequiredTotal debt payments, in USD per year.
Min 0 · Max 1000000000minRentToPricePctRequiredMinimum gross monthly rent divided by acquisition basis, expressed as a percent (1 means 1%).
Min 0 · Max 100maxGrmRequiredMaximum gross rent multiplier, in years of gross scheduled rent.
Min 0.01 · Max 1000minMonthlyCashFlowRequiredLowest accepted cash flow after operating expenses and debt service, in signed USD per month.
Min -1000000000 · Max 1000000000minDscrRequiredMinimum ratio of annual net operating income to annual debt service (1.25 means 1.25×).
Min 0 · Max 100Example request body (JSON)
{
"purchasePrice": 200000,
"monthlyRent": 2400,
"estimatedRepairs": 10000,
"monthlyOperatingExpenses": 600,
"annualDebtService": 14400,
"minRentToPricePct": 1,
"maxGrm": 12,
"minMonthlyCashFlow": 0,
"minDscr": 1.25
} Full JSON schema
{
"type": "object",
"properties": {
"purchasePrice": {
"type": "number",
"minimum": 0.01,
"maximum": 1000000000,
"description": "Acquisition price, in USD."
},
"monthlyRent": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Scheduled gross rent, in USD per month before vacancy."
},
"estimatedRepairs": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Repair budget added to purchase price for all-in buy-box tests, in USD."
},
"monthlyOperatingExpenses": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Operating expenses before debt service, in USD per month."
},
"annualDebtService": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Total debt payments, in USD per year."
},
"minRentToPricePct": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Minimum gross monthly rent divided by acquisition basis, expressed as a percent (1 means 1%)."
},
"maxGrm": {
"type": "number",
"minimum": 0.01,
"maximum": 1000,
"description": "Maximum gross rent multiplier, in years of gross scheduled rent."
},
"minMonthlyCashFlow": {
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000,
"description": "Lowest accepted cash flow after operating expenses and debt service, in signed USD per month."
},
"minDscr": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Minimum ratio of annual net operating income to annual debt service (1.25 means 1.25×)."
}
},
"required": [
"purchasePrice",
"monthlyRent",
"estimatedRepairs",
"monthlyOperatingExpenses",
"annualDebtService",
"minRentToPricePct",
"maxGrm",
"minMonthlyCashFlow",
"minDscr"
],
"additionalProperties": false,
"description": "Calculates the four checks against caller thresholds using price plus repairs, alongside the price-only quick indicators. The quick GRM threshold uses a strict upper limit as on the app."
}Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-deal-screener
Formula: deal-screener-buy-box-1.0.0