Home / API

Takeoff by page

Every measured line of the takeoff, grouped by the drawing page it is on, with its points on that page. Draw them over your own rendering of the plans, link a quantity to its place on the sheet, or check it against your own takeoff.

GET /v1/jobs/{id}/takeoff. Before the first takeoff is done it answers 409 with the job's status.

{
  "job_id": "c74f3ef7-…",
  "takeoff_version": 1,
  "run_id": "ae8c4158-…",
  "pages": [{
    "page": 1,
    "sheet_number": "P1",
    "drawing": "Hope 4 Youth - Plumbing Permit.pdf",
    "sheet_id": "a3f9…:page:1",
    "width": 3024, "height": 2160, "rotation": 0,
    "items": [{
      "id": "2754e5bf-…",
      "service": "HW", "size": "1-1/4\"",
      "quantity": 147.2, "unit": "LF",
      "item_type": "pipe", "description": "1-1/4\" HW main above ceiling",
      "state": "provisional", "work_scope": "new",
      "points":     [[812.4, 1103.0], [1290.7, 1103.0], [1290.7, 1388.2]],
      "pdf_points": [[812.4, 1057.0], [1290.7, 1057.0], [1290.7, 771.8]]
    }]
  }],
  "allowances": [{
    "id": "…", "service": "CW", "size": "1/2\"", "quantity": 48.0, "unit": "LF",
    "item_type": "pipe", "description": "8 ft drop per pipe at each new or unknown fixture — 6 drops",
    "state": "provisional", "work_scope": "new"
  }],
  "totals": {"scaled_LF": 961.0, "allowance_LF": 96.0, "known_estimate_LF": 1057.0},
  "api_version": "2026-11-21"
}

Pages

FieldWhat it is
pageThe page number in the PDF (1 is the first page). With several PDFs, the page in drawing.
sheet_numberThe sheet number printed in the title block (P1, M-201), when it could be read.
drawingThe file the page is in.
width, heightThe page as displayed, in PDF points (1/72 inch), rotation applied.
rotationThe page's own rotation in the PDF (0, 90, 180, 270).

Items

FieldWhat it is
idThe item's id, unique within this takeoff_version. A new version has new ids: replace a job's items when the version changes (see Keep your system in sync).
serviceThe system code: CW, HW, SA… (see systems).
sizeThe pipe size (3/4") or duct size (24x12, 14"Ø), or unknown.
quantity, unitFeet (LF) for pipe and duct; a count (EA) for fittings and valves. null when it could not be measured.
item_typepipe, duct, fitting, valve…
stateprovisional as read; excluded when your company rules leave it out of the price (for example pipe that is not insulated, or underground with no specification), or when your estimator took the line out in the app. Excluded lines are listed so you can show them struck out.
work_scopenew or existing.
assumed_size, size_sourcePresent when no size was printed for the line and one was assumed, with why (for example connected: the size of the pipe it continues).
square_feet, locationDuct only: its surface area and indoor or outdoor.
tradeMechanical lines only: ductwork, or the piping trade the line belongs to.
verticalMechanical lines only, when true: a vertical run, whose length is the rise.
pointsWhere it is, in the page's displayed coordinates (below). A polyline for pipe and duct, one point for a fitting.
pdf_pointsThe same places in the PDF's own user space.

Coordinates

points are in PDF points from the top-left corner of the page as it is displayed (the page's rotation applied), x to the right and y down: the way a PDF viewer shows the sheet. To draw a line on a rendering of the page, scale each point by the rendering's width over width, or use an SVG whose viewBox is the page and needs no scaling at all.

pdf_points are in the PDF's own user space (origin at the bottom-left of the media box, before rotation), for tools that annotate the PDF file itself.

Show quantities on your drawings has working code for all three: an SVG overlay with PDF.js in the browser, a page image with Pillow, and PDF annotations with pypdf.

Allowances

Some priced footage has no line on a page: the vertical drop at each fixture, a roof drain's leader down the building, a riser's height, the refrigerant and condensate runs to units the plans do not draw. These are under allowances, each with a description that says the rule that made it. With them, the mechanical items add up to the takeoff the app shows for each system and size.

A job with only ductwork or HVAC piping has no plumbing items: its pages hold the mechanical lines alone. Lines your estimator moved, redrew, resized or took out in the app come back as they left them.

Totals

FieldWhat it is
scaled_LFFeet measured on the drawings.
allowance_LFFeet from allowances: drops, leaders, risers.
known_estimate_LFAll the feet the takeoff has.
complete_estimate_LFThe same, or null while some line's length is still unknown.
complete_estimate_EAThe count of fittings, valves and other counted items.

These totals cover the plumbing takeoff. Mechanical lines (duct and HVAC piping) are listed on their pages; sum them from the items. Other totals may appear: ignore the ones you do not use.