Documentation

Add ESX to an order

POST /api/v1/reports/orders/:id/esx: add the Xactimate ESX to an order already placed, before or after delivery, charged once from your balance.

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.

POST /api/v1/reports/orders/:id/esx

Adds the Xactimate .esx to an order you've already placed, for your account's ESX price ($5 list). It works before the report is delivered, in which case the ESX is ready when the report is, and after.

The charge comes from your balance like the report's, and the order keeps it: if the order is later cancelled, the report and the ESX are refunded together. An order can only have ESX added once, so calling this twice, or from two places at the same time, charges once. Every order placed before ESX became an option already has it.

Parameters

None, and no request body. There's no need for an Idempotency-Key: a repeat call is already safe.

Request
curl -X POST "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/esx" \
  -H "Authorization: Bearer rq_live_sk_..."
Response

201 Created when the ESX was added. order is the whole order, the same as GET /reports/orders/:id returns, so you can replace what you stored.

{
  "upgrade": { "item": "esx", "amount": 5, "currency": "usd", "charged": true },
  "order": {
    "orderId": "rq_ord_8f3a21c9d4e07b16",
    "status": "completed",
    "report": { "type": "residential", "esxIncluded": true, ... },
    "billing": {
      "amount": 15,
      "currency": "usd",
      "method": "account_balance",
      "holdReference": "rq_ord_8f3a21c9d4e07b16",
      "items": [
        { "item": "report", "amount": 10 },
        { "item": "esx", "amount": 5 }
      ],
      "refunded": false,
      "released": false
    },
    "files": [
      { "name": "report.pdf", "url": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/pdf" },
      { "name": "report.xml", "url": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/xml" },
      { "name": "report.esx", "url": "https://api.roofquery.com/api/v1/reports/orders/rq_ord_8f3a21c9d4e07b16/esx" }
    ],
    ...
  }
}

200 OK when the order already had its ESX: the same body with "amount": 0 and "charged": false. Nothing was taken.

With a sandbox key the ESX is added for free: "amount": 0, "charged": false. files is empty until the report is delivered.

Errors
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
ESX_NOT_SUPPORTED409A Rapid Squares order: it never has an ESX

Every code is under Errors.