{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swathapi-com/json-schema/swathapi-com-swath-report-schema.json",
  "title": "SwathReport",
  "description": "Swath Report: properties inside the swath, highest exposure first",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swathapi-com-openapi.json#/components/schemas/SwathReport",
  "type": "object",
  "properties": {
    "storm_id": {
      "type": "string"
    },
    "swath_id": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "hail",
        "wind"
      ]
    },
    "verified_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "mesh_max_in": {
      "type": [
        "number",
        "null"
      ]
    },
    "total": {
      "type": "integer",
      "description": "Total matching properties across all pages"
    },
    "count": {
      "type": "integer",
      "description": "Properties in this page"
    },
    "offset": {
      "type": "integer"
    },
    "coverage": {
      "$ref": "#/$defs/Coverage"
    },
    "billing": {
      "$ref": "#/$defs/ReportBilling"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ReportProperty"
      }
    }
  },
  "$defs": {
    "Coverage": {
      "type": "object",
      "description": "Parcel-data coverage metadata for this report run",
      "properties": {
        "tiles_fetched": {
          "type": "integer",
          "description": "Vendor tiles fetched live during this call"
        },
        "parcels_fetched": {
          "type": "integer",
          "description": "Parcels fetched live during this call"
        },
        "vendor": {
          "type": "string",
          "description": "Parcel data source label"
        },
        "vendor_fetch": {
          "type": "string",
          "enum": [
            "live",
            "skipped_free_plan"
          ],
          "description": "Whether live vendor fetches ran (free plan is cached-only)"
        }
      }
    },
    "Exposure": {
      "type": "object",
      "properties": {
        "hail_in": {
          "type": [
            "number",
            "null"
          ],
          "description": "Max radar hail size at this parcel, inches"
        },
        "score": {
          "type": [
            "number",
            "null"
          ],
          "description": "0 at the 1.00\" detection threshold up to 1.0 at >= 3.00\" hail"
        }
      }
    },
    "ReportBilling": {
      "type": "object",
      "description": "Actual credits billed for this report call (per-record pricing)",
      "properties": {
        "credits": {
          "type": "integer",
          "description": "Credits billed: properties_returned × 1 + fresh_fetched × fresh_surcharge_per_record, minimum applied"
        },
        "properties_returned": {
          "type": "integer",
          "description": "Properties in this page — 1 credit each"
        },
        "fresh_fetched": {
          "type": "integer",
          "description": "Records fetched fresh from the parcel vendor during this call"
        },
        "fresh_surcharge_per_record": {
          "type": "integer",
          "description": "Credits per fresh-fetched record (25 at current rates)"
        },
        "minimum": {
          "type": "integer",
          "description": "Per-request billing floor (10 credits)"
        }
      }
    },
    "ReportProperty": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "parcel_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "year_built": {
          "type": [
            "integer",
            "null"
          ]
        },
        "sqft": {
          "type": [
            "number",
            "null"
          ]
        },
        "roof_material": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reserved — not populated yet, always null."
        },
        "roof_age_est": {
          "type": [
            "number",
            "null"
          ],
          "description": "Estimated roof age in years"
        },
        "roof_age_source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Which input produced roof_age_est. Currently always 'year_built' — permit-derived roof ages are on the roadmap, not in the data yet."
        },
        "last_roof_permit": {
          "type": [
            "string",
            "null"
          ],
          "description": "YYYY-MM-DD of the last roofing permit. Reserved — not populated yet, always null."
        },
        "owner_occupied": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "assessed_value": {
          "type": [
            "number",
            "null"
          ],
          "description": "Assessed value, USD"
        },
        "lat": {
          "type": [
            "number",
            "null"
          ]
        },
        "lng": {
          "type": [
            "number",
            "null"
          ]
        },
        "exposure": {
          "$ref": "#/$defs/Exposure"
        }
      }
    }
  }
}