Skip to content

Investment · Calculation

DSCR threshold and income sensitivity

Compare rent/PITIA or NOI/debt service to an ordered array of caller-supplied thresholds. Residential rent can be capped by entered market rent. Income shocks return the ratio at each percentage change.

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-dscr-thresholds.

Keep the key on your server. A successful call uses 10 calculation credits.

Production request

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-dscr-thresholds";
const input = {
  "method": "residential-gross-rent-pitia",
  "monthlyRent": 2500,
  "monthlyPayment": 1500,
  "monthlyTaxes": 300,
  "monthlyInsurance": 100,
  "monthlyHoa": 100,
  "minimumDscrs": [
    1.2,
    1.3
  ]
};
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 HT_PRODUCTION_KEY on your server. Run in a POSIX shell with cURL 7.76+ and Python 3.7+ to create a request ID.

(
  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-dscr-thresholds' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "method": "residential-gross-rent-pitia",
  "monthlyRent": 2500,
  "monthlyPayment": 1500,
  "monthlyTaxes": 300,
  "monthlyInsurance": 100,
  "monthlyHoa": 100,
  "minimumDscrs": [
    1.2,
    1.3
  ]
}
HT_INPUT
)
If your request fails
400 INVALID_INPUT

Read error.details when present. Node prints each issue. cURL returns the JSON body. Each path points 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.

401 or 403
Check that the server has the bearer key for the endpoint’s environment and that the key includes investor-dscr-thresholds.
429
Read the service error code, check your allowance, and wait for the Retry-After interval when supplied before trying again.
Lost response, 409 or 503
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_ID to 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
lender-qualifier-2.0.0
value.method
residential-gross-rent-pitia

Result warnings

  • A passing screen is not approval. Confirm current definitions, thresholds, reserves, and overlays with the lender.
How to interpret this result
  • Compare rent/PITIA or NOI/debt service to an ordered array of caller-supplied thresholds. Residential rent can be capped by entered market rent. Income shocks return the ratio at each percentage change.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "state": "available",
    "fieldErrors": {},
    "warnings": [
      {
        "code": "lender-overlay-required",
        "severity": "warning",
        "message": "A passing screen is not approval. Confirm current definitions, thresholds, reserves, and overlays with the lender."
      }
    ],
    "assumptions": [
      {
        "key": "incomeBumpsPct",
        "value": "5,10,15",
        "unit": "%",
        "source": "default"
      }
    ],
    "provenance": [
      {
        "source": "Declared DSCR identity selected by the user",
        "asOf": "2026-08-13"
      }
    ],
    "formulaVersion": "lender-qualifier-2.0.0",
    "ruleVersions": [
      "residential-gross-rent-over-pitia",
      "commercial-noi-over-debt-service"
    ],
    "auditTrail": [
      "Residential screening ratio: gross monthly rent divided by monthly PITIA; operating expenses are not subtracted.",
      "Compared the result with 2 supplied threshold(s)."
    ],
    "value": {
      "method": "residential-gross-rent-pitia",
      "qualifyingAnnualIncome": "30000",
      "annualDebtService": "24000",
      "dscr": "1.25",
      "thresholds": [
        {
          "id": "threshold-1",
          "label": "Reference 1",
          "minimumDscr": "1.2",
          "passes": true
        },
        {
          "id": "threshold-2",
          "label": "Reference 2",
          "minimumDscr": "1.3",
          "passes": false
        }
      ],
      "incomeScenarios": [
        {
          "incomeBumpPct": "5",
          "dscr": "1.3125"
        },
        {
          "incomeBumpPct": "10",
          "dscr": "1.375"
        },
        {
          "incomeBumpPct": "15",
          "dscr": "1.4375"
        }
      ],
      "methodDisclosure": "Residential screening ratio: gross monthly rent divided by monthly PITIA; operating expenses are not subtracted."
    }
  },
  "formulaVersion": "lender-qualifier-2.0.0",
  "units": {
    "money": "USD",
    "months": "whole months",
    "years": "whole years",
    "percentage": "percent points (6 = 6%)",
    "dscr": "income divided by debt service, unitless"
  },
  "assumptions": [
    "Compare rent/PITIA or NOI/debt service to an ordered array of caller-supplied thresholds. Residential rent can be capped by entered market rent. Income shocks return the ratio at each percentage change."
  ],
  "warnings": [
    "A passing screen is not approval. Confirm current definitions, thresholds, reserves, and overlays with the lender."
  ],
  "creditCost": 10
}

Request contract

Accepted inputs

Fields for this example. Expand the schema for all supported combinations and limits.

FieldType, units and limits

monthlyRentRequired
number

USD per month in gross rent before the residential appraisal cap or commercial operating expenses.

Min 0 · Max 1000000000
monthlyPaymentRequired
number

USD per month in mortgage principal and interest, excluding separately entered taxes, insurance and association dues.

Min 0 · Max 1000000000
monthlyTaxesRequired
number

USD per month in property taxes.

Min 0 · Max 1000000000
monthlyInsuranceRequired
number

USD per month in property insurance premiums.

Min 0 · Max 1000000000
monthlyHoaRequired
number

USD per month in association dues.

Min 0 · Max 1000000000
minimumDscrsRequired
arrayMin items 1 · Max items 24
incomeBumpsPctOptional
arrayMin items 1 · Max items 24
methodRequired
stringMust equal "residential-gross-rent-pitia"
appraisalMarketRentOptional
number

USD per month in caller-supplied appraisal market rent.

Min 0.01 · Max 1000000000
appraisalRentCapPctOptional
number

Percent of entered appraisal market rent allowed in qualifying rent (90 means 90%).

Min 0 · Max 100
Example request body (JSON)
{
  "method": "residential-gross-rent-pitia",
  "monthlyRent": 2500,
  "monthlyPayment": 1500,
  "monthlyTaxes": 300,
  "monthlyInsurance": 100,
  "monthlyHoa": 100,
  "minimumDscrs": [
    1.2,
    1.3
  ]
}
Full JSON schema
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "monthlyRent": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in gross rent before the residential appraisal cap or commercial operating expenses."
        },
        "monthlyPayment": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in mortgage principal and interest, excluding separately entered taxes, insurance and association dues."
        },
        "monthlyTaxes": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in property taxes."
        },
        "monthlyInsurance": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in property insurance premiums."
        },
        "monthlyHoa": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in association dues."
        },
        "minimumDscrs": {
          "type": "array",
          "items": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 10,
            "description": "Caller-selected DSCR reference multiple (1.20 means qualifying income covers debt service 1.20 times)."
          },
          "minItems": 1,
          "maxItems": 24
        },
        "incomeBumpsPct": {
          "type": "array",
          "items": {
            "type": "number",
            "minimum": -99,
            "maximum": 100,
            "description": "Signed percent change to qualifying income with debt fixed. A value of -10 models 10% less income."
          },
          "minItems": 1,
          "maxItems": 24
        },
        "method": {
          "const": "residential-gross-rent-pitia"
        },
        "appraisalMarketRent": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 1000000000,
          "description": "USD per month in caller-supplied appraisal market rent."
        },
        "appraisalRentCapPct": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Percent of entered appraisal market rent allowed in qualifying rent (90 means 90%)."
        }
      },
      "required": [
        "monthlyRent",
        "monthlyPayment",
        "monthlyTaxes",
        "monthlyInsurance",
        "monthlyHoa",
        "minimumDscrs",
        "method"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "monthlyRent": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in gross rent before the residential appraisal cap or commercial operating expenses."
        },
        "monthlyPayment": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in mortgage principal and interest, excluding separately entered taxes, insurance and association dues."
        },
        "monthlyTaxes": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in property taxes."
        },
        "monthlyInsurance": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in property insurance premiums."
        },
        "monthlyHoa": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in association dues."
        },
        "minimumDscrs": {
          "type": "array",
          "items": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 10,
            "description": "Caller-selected DSCR reference multiple (1.20 means qualifying income covers debt service 1.20 times)."
          },
          "minItems": 1,
          "maxItems": 24
        },
        "incomeBumpsPct": {
          "type": "array",
          "items": {
            "type": "number",
            "minimum": -99,
            "maximum": 100,
            "description": "Signed percent change to qualifying income with debt fixed. A value of -10 models 10% less income."
          },
          "minItems": 1,
          "maxItems": 24
        },
        "method": {
          "const": "commercial-noi-debt-service"
        },
        "monthlyOperatingExpenses": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "USD per month in operating expenses in addition to the separately entered taxes, insurance and association dues."
        }
      },
      "required": [
        "monthlyRent",
        "monthlyPayment",
        "monthlyTaxes",
        "monthlyInsurance",
        "monthlyHoa",
        "minimumDscrs",
        "method",
        "monthlyOperatingExpenses"
      ],
      "additionalProperties": false
    }
  ],
  "description": "Compare rent/PITIA or NOI/debt service to an ordered array of caller-supplied thresholds. Residential rent can be capped by entered market rent. Income shocks return the ratio at each percentage change."
}

Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-dscr-thresholds
Formula: lender-qualifier-2.0.0

Related PDF reports