{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buckybuild-com/json-schema/buckybuild-com-site-check-schema.json",
  "title": "SiteCheck",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buckybuild-com-openapi.json#/components/schemas/SiteCheck",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "number",
      "const": 1
    },
    "checkId": {
      "type": "string"
    },
    "answered": {
      "type": "boolean"
    },
    "normalizedAddress": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    },
    "coverage": {
      "type": "object",
      "properties": {
        "resolutionStatus": {
          "type": "string",
          "enum": [
            "live",
            "live_unavailable",
            "published",
            "planned_not_live",
            "geo_division_uncatalogued",
            "unseeded_place",
            "geocode_failed"
          ]
        },
        "eligibilityKnown": {
          "type": "boolean"
        },
        "isLive": {
          "type": "boolean"
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "regionName": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "diagnosis": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "overlayDatasets": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "cityOverlayDatasets": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "inheritedOverlayDatasets": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "resolutionStatus",
        "eligibilityKnown",
        "isLive",
        "city",
        "regionName",
        "countryCode",
        "diagnosis",
        "overlayDatasets",
        "cityOverlayDatasets",
        "inheritedOverlayDatasets",
        "message"
      ],
      "additionalProperties": false
    },
    "parcel": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "parcelExternalId": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lotNumber": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "addressLine": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "areaSqm": {
              "default": null,
              "type": [
                "number",
                "null"
              ]
            },
            "widthM": {
              "default": null,
              "type": [
                "number",
                "null"
              ]
            },
            "depthM": {
              "default": null,
              "type": [
                "number",
                "null"
              ]
            },
            "municipality": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "neighbourhood": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "country": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "centroid": {
              "default": null,
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "lat": {
                      "type": "number",
                      "minimum": -90,
                      "maximum": 90
                    },
                    "lng": {
                      "type": "number",
                      "minimum": -180,
                      "maximum": 180
                    }
                  },
                  "required": [
                    "lat",
                    "lng"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "boundaryGeojson": {
              "default": null,
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "parcelExternalId",
            "lotNumber",
            "addressLine",
            "areaSqm",
            "widthM",
            "depthM",
            "municipality",
            "neighbourhood",
            "country",
            "centroid",
            "boundaryGeojson"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "zoning": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "category": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "bylawSourceUrl": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "permittedUses": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "conditionalUses": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "prohibitedUses": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "code",
            "category",
            "bylawSourceUrl",
            "permittedUses",
            "conditionalUses",
            "prohibitedUses"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "facts": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "value": {
            "type": [
              "number",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "cited",
              "cited_conditional",
              "conditional_unresolved",
              "no_limit_in_bylaw",
              "unverified_default",
              "not_extracted",
              "site_specific_schedule"
            ]
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "value",
          "status",
          "note"
        ],
        "additionalProperties": false
      }
    },
    "citations": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "ruleKey": {
              "type": "string"
            },
            "sectionNumber": {
              "type": "string"
            },
            "sectionTitle": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sectionId": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "ruleKey",
            "sectionNumber",
            "sectionTitle",
            "sectionId"
          ],
          "additionalProperties": false
        }
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "receiptId": {
          "type": "string"
        },
        "requestId": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "operation": {
          "type": "string",
          "enum": [
            "site_check"
          ]
        },
        "currency": {
          "type": "string",
          "const": "USD"
        },
        "charged": {
          "type": "boolean"
        },
        "reason": {
          "type": "string",
          "enum": [
            "charged",
            "plan_allowance",
            "plan_overage",
            "deduplicated",
            "idempotent_replay",
            "not_covered",
            "free"
          ]
        },
        "settlement": {
          "default": "settled",
          "type": "string",
          "enum": [
            "settled",
            "pending"
          ]
        },
        "unitPriceUsd": {
          "type": "string"
        },
        "chargedUsd": {
          "type": "string"
        },
        "balanceUsd": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "unitPriceMicroUsd": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "chargedMicroUsd": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "balanceMicroUsd": {
          "default": null,
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "originalReceiptId": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "dedupeExpiresAt": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "ledgerEntryId": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "lowBalance": {
          "default": false,
          "type": "boolean"
        },
        "allowance": {
          "default": null,
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "limit": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "used": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "remaining": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resetAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "limit",
                "used",
                "remaining",
                "resetAt"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "occurredAt": {
          "type": "string"
        }
      },
      "required": [
        "receiptId",
        "requestId",
        "operation",
        "currency",
        "charged",
        "reason",
        "settlement",
        "unitPriceUsd",
        "chargedUsd",
        "balanceUsd",
        "unitPriceMicroUsd",
        "chargedMicroUsd",
        "balanceMicroUsd",
        "originalReceiptId",
        "dedupeExpiresAt",
        "ledgerEntryId",
        "lowBalance",
        "allowance",
        "occurredAt"
      ],
      "additionalProperties": false
    },
    "generatedAt": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "schemaVersion",
    "checkId",
    "answered",
    "normalizedAddress",
    "coverage",
    "parcel",
    "zoning",
    "facts",
    "citations",
    "usage",
    "generatedAt"
  ],
  "additionalProperties": false
}