Documentation

Errors

Every error code the RoofQuery API returns, by endpoint, with the HTTP status and what to do about it.

API reference

Base URL: https://api.roofquery.com. Authenticate with Authorization: Bearer <your key> — except the four file routes, 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.

Errors

Every error is JSON with an error code and an error_description. Branch on the code — the description is written for a person and may change.

{
  "error": "validation",
  "error_description": "scope is required and must be one of: primary_only, primary_and_garage, all_structures"
}

Match codes case-sensitively, and expect both casings. Lower-case codes come from the request layer; upper-case ones are raised deeper, in ordering and revisions. validation and VALIDATION are two distinct codes that both mean "a field is missing or malformed" — a check for one will not catch the other.

Any endpoint
CodeHTTPMeaning
unauthorized401Missing, invalid, or revoked key
validation400A field is missing or malformed
not_found404No such order on this account. Also returned for an order belonging to someone else
server_error500Something went wrong on our end. Retry
Placing an order
CodeHTTPMeaning
VALIDATION400Address or coordinates missing once the request layer has handed off
INSUFFICIENT_CREDITS402Available balance won't cover the report
BILLING_SETUP_REQUIRED402No card or balance on the account yet
ENV_MISMATCH400The key's environment and the order's don't agree. Should be unreachable
BILLING_NOT_CONFIGURED503Billing isn't available on our side. Not your account — retry or contact support
ORDER_FAILED502The order was refused at placement. Not about the address — a property that can't be measured is only ever discovered on review and arrives later as a cancelled webhook. This is something our end; nothing was charged, and it's worth reporting
Revisions
CodeHTTPMeaning
VALIDATION400topic or notes missing or blank
INVALID_TOPIC400Topic isn't one of the accepted values
NOT_REVISABLE409Revisions need a delivered report — this order isn't completed
REVISION_ALREADY_OPEN409One open revision per report
REVISION_REJECTED409The revision was refused. The description says why
REVISION_FAILED502The revision couldn't be raised. Safe to retry
Files and diagrams
CodeHTTPMeaning
not_ready409Report hasn't completed, so the file doesn't exist yet. Carries the current status
no_geometry409That structure has nothing drawable. Delivered, but there is no sketch to render
download_failed502ESX download failed. Safe to retry — nothing was charged
render_failed500The PDF or diagram couldn't be drawn
Brand profiles
CodeHTTPMeaning
validation400A required field is missing, a colour isn't hex, or text is over the header limit
not_found404No such profile on this account. Also what a PDF link with an unknown or foreign ?brand= returns
profile_limit409The account already has 500 profiles
empty_upload400The logo body was empty
too_large413The logo is over 5MB
unsupported_type415The logo isn't a PNG, JPEG, WebP, GIF, AVIF or SVG