Skip to content

PDF report

Cost segregation planning

Cost segregation planning with the calculator’s supporting assumptions and breakdown.

Cost per success
20 calculation credits + 1 PDF report
Production plans
Business, Scale, Enterprise
Plan allowances
Free sandbox
Not available

Integration example

Request a PDF

Before your first report

  1. Open Widgets & reports in your paid workspace. Save your brand name, accent and at least one exact HTTPS origin, such as https://app.example.com. The origins identify sites allowed to embed your widgets.
  2. Under Report credentials, name a credential, select investment-cost-segregation-v1 and choose Create report credential. Save the secret shown once in your server’s HT_REPORT_KEY.
  3. Run the example on your server against accounts.hasstechapi.com, without an Origin header. A successful request returns a PDF and uses 20 calculation credits and 1 PDF report. Running the example again starts a new paid request.
What if the PDF doesn’t arrive?

For 400 INVALID_INPUT, inspect error.details when present. Paths for template fields start with input. Fix the indicated field and send a new request. This validation error uses zero credits and zero reports.

Open the .pdf.request.json file the example saved before sending. Within 24 hours, open Request lookup in the same workspace, choose Production, and paste the file’s requestId. The response’s X-Request-Id is a separate support identifier.

A settled request shows the calculation credits and report used. The service doesn’t keep the PDF for download. Check your saved file first. A replacement with a new ID uses 20 calculation credits and 1 PDF report on success.

If the outcome is unclear, check the workspace and ID, then look it up again before requesting a replacement.

Download the production PDF

Set HT_REPORT_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.

import { randomUUID } from "node:crypto";
import { writeFile } from "node:fs/promises";

const key = process.env.HT_REPORT_KEY;
if (!key) throw new Error("Set HT_REPORT_KEY on your server.");
const endpoint = "https://accounts.hasstechapi.com/v2/reports/investment-cost-segregation-v1";
const input = {
  "asOfDate": "2026-10-16",
  "isAdvanced": false,
  "landPct": 15,
  "buildingPct": 55,
  "landImprovePct": 12,
  "personalPropPct": 18,
  "totalBasis": 500000,
  "stateRuleEnabled": false,
  "stateJurisdiction": "",
  "stateVersion": "",
  "stateSourceUrl": "",
  "stateEffectiveDate": "2026-01-01",
  "stateExpiresOn": "2026-12-31",
  "stateConforms": true,
  "stateBonusPct": 0,
  "acquisitionDate": "2026-01-01",
  "bindingContractDate": "",
  "placedInServiceDate": "2026-01-01",
  "taxYearStartDate": "2026-01-01",
  "taxYearEndDate": "2026-12-31",
  "acquisitionPath": "purchase",
  "businessUse": true,
  "relatedParty": false,
  "propertyType": "residential",
  "otherAssetsKnown": true,
  "bonusElection": "automatic",
  "passiveActivity": true,
  "passiveIncome": 35000,
  "specialAllowance": 0,
  "taxRate": 37,
  "dispositionEnabled": false,
  "disposition": {
    "amountRealized": 0,
    "allocatedGainFiveYear": 0,
    "allocatedGainSevenYear": 0,
    "allocatedGainFifteenYear": 0,
    "allocatedGainBuilding": 0,
    "depreciationTakenFiveYear": 0,
    "depreciationTakenSevenYear": 0,
    "depreciationTakenFifteenYear": 0,
    "depreciationTakenBuilding": 0
  }
};
const requestId = Date.now() + "." + randomUUID();
const output = "investment-cost-segregation-v1-" + requestId + ".pdf";
await writeFile(output + ".request.json", JSON.stringify({ requestId, endpoint }), {
  flag: "wx", mode: 0o600
});
console.error("Usage lookup ID:", requestId);

const response = await fetch(endpoint, {
  method: "POST",
  redirect: "error",
  headers: {
    "Authorization": "Bearer " + key,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ requestId, 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 {
  if (response.headers.get("content-type")?.split(";")[0] !== "application/pdf") {
    throw new Error("Expected a PDF. Look up request " + requestId);
  }
  await writeFile(output, new Uint8Array(await response.arrayBuffer()), { flag: "wx" });
  console.log("Saved", output);
}

Output

PDF output

A successful request returns the PDF file as application/pdf. The example writes a file named investment-cost-segregation-v1-<requestId>.pdf.

See the Cost segregation depreciation scenario calculation and example result.

Request contract

Accepted inputs

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

FieldType, units and limits

asOfDateRequired
string

Calendar date of the scenario, UTC

Format: date
isAdvancedRequired
boolean
landPctRequired
numberMin 0 · Max 100
buildingPctRequired
numberMin 0 · Max 100
landImprovePctRequired
numberMin 0 · Max 100
personalPropPctRequired
numberMin 0 · Max 100
totalBasisRequired
numberMin 0 · Max 1000000000000
stateRuleEnabledRequired
boolean
stateJurisdictionRequired
stringMax length 120
stateVersionRequired
stringMax length 120
stateSourceUrlRequired
string
stateEffectiveDateRequired
stringFormat: date
stateExpiresOnRequired
stringMax length 120
stateConformsRequired
boolean
stateBonusPctRequired
numberMin 0 · Max 100
acquisitionDateRequired
stringFormat: date
bindingContractDateRequired
string
placedInServiceDateRequired
stringFormat: date
taxYearStartDateRequired
stringFormat: date
taxYearEndDateRequired
stringFormat: date
acquisitionPathRequired
stringAllowed: "purchase", "construction", "like-kind", "gift", "inheritance"
businessUseRequired
boolean
relatedPartyRequired
boolean
propertyTypeRequired
stringAllowed: "residential", "nonresidential"
otherAssetsKnownRequired
boolean
bonusElectionRequired
stringAllowed: "automatic", "section-168-k-10-40", "opt-out"
passiveActivityRequired
boolean
passiveIncomeRequired
numberMin 0 · Max 1000000000000
specialAllowanceRequired
numberMin -1000000000000 · Max 1000000000000
taxRateRequired
numberMin 0 · Max 1000000000000
dispositionEnabledRequired
boolean
dispositionRequired
object
disposition.amountRealizedRequired
numberMin 0 · Max 1000000000000
disposition.allocatedGainFiveYearRequired
integerMin 0 · Max 10000
disposition.allocatedGainSevenYearRequired
integerMin 0 · Max 10000
disposition.allocatedGainFifteenYearRequired
integerMin 0 · Max 10000
disposition.allocatedGainBuildingRequired
numberMin 0 · Max 1000000000000
disposition.depreciationTakenFiveYearRequired
integerMin 0 · Max 10000
disposition.depreciationTakenSevenYearRequired
integerMin 0 · Max 10000
disposition.depreciationTakenFifteenYearRequired
integerMin 0 · Max 10000
disposition.depreciationTakenBuildingRequired
numberMin 0 · Max 1000000000000
Example input (JSON)

The server example adds a fresh requestId to this input.

{
  "input": {
    "asOfDate": "2026-10-16",
    "isAdvanced": false,
    "landPct": 15,
    "buildingPct": 55,
    "landImprovePct": 12,
    "personalPropPct": 18,
    "totalBasis": 500000,
    "stateRuleEnabled": false,
    "stateJurisdiction": "",
    "stateVersion": "",
    "stateSourceUrl": "",
    "stateEffectiveDate": "2026-01-01",
    "stateExpiresOn": "2026-12-31",
    "stateConforms": true,
    "stateBonusPct": 0,
    "acquisitionDate": "2026-01-01",
    "bindingContractDate": "",
    "placedInServiceDate": "2026-01-01",
    "taxYearStartDate": "2026-01-01",
    "taxYearEndDate": "2026-12-31",
    "acquisitionPath": "purchase",
    "businessUse": true,
    "relatedParty": false,
    "propertyType": "residential",
    "otherAssetsKnown": true,
    "bonusElection": "automatic",
    "passiveActivity": true,
    "passiveIncome": 35000,
    "specialAllowance": 0,
    "taxRate": 37,
    "dispositionEnabled": false,
    "disposition": {
      "amountRealized": 0,
      "allocatedGainFiveYear": 0,
      "allocatedGainSevenYear": 0,
      "allocatedGainFifteenYear": 0,
      "allocatedGainBuilding": 0,
      "depreciationTakenFiveYear": 0,
      "depreciationTakenSevenYear": 0,
      "depreciationTakenFifteenYear": 0,
      "depreciationTakenBuilding": 0
    }
  }
}
Full JSON schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "asOfDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
      "description": "Calendar date of the scenario, UTC"
    },
    "isAdvanced": {
      "type": "boolean"
    },
    "landPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "buildingPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "landImprovePct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "personalPropPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "totalBasis": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "stateRuleEnabled": {
      "type": "boolean"
    },
    "stateJurisdiction": {
      "type": "string",
      "maxLength": 120,
      "pattern": "^[^<>\\u0000-\\u001f]*$"
    },
    "stateVersion": {
      "type": "string",
      "maxLength": 120,
      "pattern": "^[^<>\\u0000-\\u001f]*$"
    },
    "stateSourceUrl": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 400,
          "format": "uri"
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "stateEffectiveDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "stateExpiresOn": {
      "type": "string",
      "maxLength": 120,
      "pattern": "^[^<>\\u0000-\\u001f]*$"
    },
    "stateConforms": {
      "type": "boolean"
    },
    "stateBonusPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "acquisitionDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "bindingContractDate": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "placedInServiceDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "taxYearStartDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "taxYearEndDate": {
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "acquisitionPath": {
      "type": "string",
      "enum": [
        "purchase",
        "construction",
        "like-kind",
        "gift",
        "inheritance"
      ]
    },
    "businessUse": {
      "type": "boolean"
    },
    "relatedParty": {
      "type": "boolean"
    },
    "propertyType": {
      "type": "string",
      "enum": [
        "residential",
        "nonresidential"
      ]
    },
    "otherAssetsKnown": {
      "type": "boolean"
    },
    "bonusElection": {
      "type": "string",
      "enum": [
        "automatic",
        "section-168-k-10-40",
        "opt-out"
      ]
    },
    "passiveActivity": {
      "type": "boolean"
    },
    "passiveIncome": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "specialAllowance": {
      "type": "number",
      "minimum": -1000000000000,
      "maximum": 1000000000000
    },
    "taxRate": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "dispositionEnabled": {
      "type": "boolean"
    },
    "disposition": {
      "type": "object",
      "properties": {
        "amountRealized": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "allocatedGainFiveYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "allocatedGainSevenYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "allocatedGainFifteenYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "allocatedGainBuilding": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "depreciationTakenFiveYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "depreciationTakenSevenYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "depreciationTakenFifteenYear": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "depreciationTakenBuilding": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        }
      },
      "required": [
        "amountRealized",
        "allocatedGainFiveYear",
        "allocatedGainSevenYear",
        "allocatedGainFifteenYear",
        "allocatedGainBuilding",
        "depreciationTakenFiveYear",
        "depreciationTakenSevenYear",
        "depreciationTakenFifteenYear",
        "depreciationTakenBuilding"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "asOfDate",
    "isAdvanced",
    "landPct",
    "buildingPct",
    "landImprovePct",
    "personalPropPct",
    "totalBasis",
    "stateRuleEnabled",
    "stateJurisdiction",
    "stateVersion",
    "stateSourceUrl",
    "stateEffectiveDate",
    "stateExpiresOn",
    "stateConforms",
    "stateBonusPct",
    "acquisitionDate",
    "bindingContractDate",
    "placedInServiceDate",
    "taxYearStartDate",
    "taxYearEndDate",
    "acquisitionPath",
    "businessUse",
    "relatedParty",
    "propertyType",
    "otherAssetsKnown",
    "bonusElection",
    "passiveActivity",
    "passiveIncome",
    "specialAllowance",
    "taxRate",
    "dispositionEnabled",
    "disposition"
  ],
  "additionalProperties": false
}

Production endpoint: POST https://accounts.hasstechapi.com/v2/reports/investment-cost-segregation-v1
Formula: rules-workflows-1.1.0 · Report version: 1.0.0