Base URL: https://api.roofquery.com. Authenticate with Authorization: Bearer <your key> — except the file routes (report and storm report files), which take no key.
Copies this whole page as Markdown, so you can paste it into an assistant and have it write the integration. Nothing secret goes on the clipboard — your keys aren't included.
The catalog: every drawable target for this order, already addressed, so a client can
build a picker without hardcoding our vocabulary. The same links appear inside
totals.diagrams and each structures[].diagrams.
curl "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/diagrams"
{
"types": [
{ "id": "outline", "label": "Outline", "description": "The roof plan — facets and edges, unlabelled." },
{ "id": "area", "label": "Area", "description": "Each facet labelled with its area in square feet." },
{ "id": "pitch", "label": "Pitch", "description": "Each facet labelled with its pitch, in twelfths." },
{ "id": "lengths", "label": "Lengths", "description": "Every edge colour-coded by type and labelled with its true sloped length in feet." }
],
"formats": ["svg", "png"],
"size": { "default": 1000, "min": 200, "max": 4000 },
"available": [
{
"structure": "all",
"label": "Whole property",
"diagrams": {
"outline": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/diagrams/all/outline",
"area": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/diagrams/all/area",
"pitch": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/diagrams/all/pitch",
"lengths": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/diagrams/all/lengths"
}
},
{
"structure": 1,
"label": "Structure 1",
"totalAreaSqFt": 5597.29,
"diagrams": { "...": "same four types, addressed to structure 1" }
}
]
}
Only 404 not_found, for an unknown order id. Before the order is delivered, and on a
Rapid Squares order (no roof faces to draw), it answers
200 with available empty. Every code is under
Errors.
One roof drawing — the same sketches the PDF prints, as a standalone image. Rendered on the fly from the delivered document, so a report re-delivered after a revision produces new drawings from the same URLs with no cache to invalidate.
| Field | Required | Description |
|---|---|---|
:structure | Yes, in the path | all, or a 1-based structures[].index — 1 is the largest building. The index matches the figures beside it, so a link and its numbers always describe the same roof |
:type | Yes, in the path | outline, area, pitch, lengths |
format | No | svg (default) or png |
size | No | Edge length in pixels. Default 1000, min 200, max 4000. Always square |
download | No | 1 forces a save dialog instead of inline |
curl "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/diagrams/1/area?format=png&size=2000" \
-o structure-1-area.png
HTTP/1.1 200 OK
Content-Type: image/png
Content-Disposition: inline; filename="rq_ord_8f3a21c9d4e07b16-structure-1-area.png"
Cache-Control: no-store
SVG is the default because it's a line drawing: it scales to any size and it's a fraction of the bytes. Square is the default because a roof plan has no natural aspect ratio, and a square drops into a grid or a card without you reasoning about letterboxing.
An unknown :type, format or size, or a :structure
that isn't all or a whole number, returns 400 validation; a structure number
the order doesn't have returns 404 not_found; a
Rapid Squares order returns 404 not_available; an
undelivered order returns 409 not_ready; a structure with nothing drawable returns
409 no_geometry. Every code is under
Errors.