Documentation

Errors

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

API reference

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.

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, and for a beta endpoint that is not enabled on this account
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 (and its ESX, if the order includes one)
BRAND_NOT_FOUND400brand isn't one of this account's brand profiles (a typo, or another account's id). Nothing was placed
ESX_NOT_SUPPORTED400"esx": true on a report type that has no ESX (Rapid Squares). Nothing was placed; leave esx out or send false
BILLING_SETUP_REQUIRED402No card or balance on the account yet
BRAND_NOT_FOUND400brand isn't one of this account's brand profiles (a typo, or another account's id). Nothing was placed or charged
PRODUCT_NOT_ENABLED403A product that isn't turned on for this account. Nothing was charged
ORDER_IN_PROGRESS409An order with this Idempotency-Key is still being placed. Retry in a few seconds
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. Also returned when retrying an Idempotency-Key whose first attempt failed: use a new key
Storm reports
CodeHTTPMeaning
validation400A field is missing or malformed (a date of loss in the future, an unknown template)
needs_date_of_loss400The Date of Loss PDF was asked for without a date. Pass dateOfLoss
INSUFFICIENT_CREDITS402Less than $5 available. Nothing was looked up or charged
BILLING_SETUP_REQUIRED402Add a card and top up first
NOT_REVISABLE400Storm reports aren't revised: read them with new details, or order again
service_unavailable503Weather data didn't answer in time. No order was created and nothing was charged; retry
Adding ESX to an order
CodeHTTPMeaning
INSUFFICIENT_CREDITS402Available balance won't cover the ESX. Nothing was charged
BILLING_SETUP_REQUIRED402No card or balance on the account yet
not_found404No such order on this account
NOT_UPGRADABLE409The order was cancelled, so there's no report to add ESX to
ESX_NOT_SUPPORTED409A Rapid Squares order: it never has an ESX
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
CLAIM_NOT_FOUND409The report couldn't be matched for revision. Contact support with the order id
REVISION_REJECTED409 (or 4xx / 502)The revision was refused. The description says why
REVISION_FAILED502The revision couldn't be raised. Safe to retry
NO_CLAIM500The order is missing what a revision needs. Contact support with the order id
Files and diagrams
CodeHTTPMeaning
ESX_NOT_PURCHASED403The order doesn't include ESX. The message names POST /api/v1/reports/orders/:id/esx and what it costs; price and currency in the body carry it
ESX_NOT_SUPPORTED404A Rapid Squares order has no ESX
not_ready409Report hasn't completed, so the file doesn't exist yet. Carries the current status
not_available404That file doesn't exist for this kind of report: a Rapid Squares order has no diagrams, and only Rapid Squares has a /photo
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
validation400companyName is missing, an email isn't valid, a colour isn't hex, or text is over its limit
not_found404No such profile on this account. Also what a PDF link with an unknown or foreign ?brand= returns, on an order placed before 22 October 2026
profile_limit409The account already has 500 profiles
BRAND_IN_USE409Deleting a profile that orders were placed for: their reports keep that brand, so it stays. Edit it instead
BRAND_IN_USE409Orders were placed for this profile, so it can't be deleted. Edit it instead
empty_upload400The logo body was empty
too_large413The logo is over 5MB
payload_too_large413The request body is over 6MB
unsupported_type415The logo isn't a PNG, JPEG, WebP, GIF, AVIF or SVG
unreadable_image422The file couldn't be read as an image