{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/housingfax-com/json-schema/housingfax-com-resolve-building-output-schema.json",
  "title": "ResolveBuildingOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/housingfax-com-api-openapi.json#/components/schemas/ResolveBuildingOutput",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "agent-api-1.3.0"
    },
    "language": {
      "type": "string",
      "enum": [
        "es",
        "en",
        "de",
        "nl",
        "fr"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "resolved",
        "select_unit",
        "not_found",
        "unconfirmed"
      ]
    },
    "evaluationScope": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "building",
            "dwelling"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "building": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "cadastralReference": {
              "type": "string",
              "pattern": "^[A-Z0-9]{14,20}$"
            },
            "rc14": {
              "type": "string",
              "pattern": "^[A-Z0-9]{14}$"
            },
            "address": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "postalCode": {
              "type": "string",
              "pattern": "^\\d{5}$"
            },
            "municipality": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "province": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "use": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "surfaceAreaM2": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "constructionYear": {
              "type": "integer",
              "minimum": 1000,
              "maximum": 2100
            },
            "stair": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "floor": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "door": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            }
          },
          "required": [
            "cadastralReference",
            "rc14"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "candidates": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cadastralReference": {
            "type": "string",
            "pattern": "^[A-Z0-9]{14,20}$"
          },
          "rc14": {
            "type": "string",
            "pattern": "^[A-Z0-9]{14}$"
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "postalCode": {
            "type": "string",
            "pattern": "^\\d{5}$"
          },
          "municipality": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "province": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "use": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "surfaceAreaM2": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "constructionYear": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 2100
          },
          "stair": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          },
          "floor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          },
          "door": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          }
        },
        "required": [
          "cadastralReference",
          "rc14"
        ],
        "additionalProperties": false
      }
    },
    "availableNumbers": {
      "maxItems": 40,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 16
      }
    },
    "resolutionToken": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{43}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "resolutionExpiresInSeconds": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "ieeAvailability": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "available",
            "none",
            "not_integrated",
            "unverified"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "availableTiers": {
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "free",
          "simple",
          "complete"
        ]
      }
    },
    "notice": {
      "type": "string",
      "minLength": 1,
      "maxLength": 600
    }
  },
  "required": [
    "contract",
    "language",
    "status",
    "evaluationScope",
    "building",
    "candidates",
    "resolutionToken",
    "resolutionExpiresInSeconds",
    "ieeAvailability",
    "availableTiers",
    "notice"
  ],
  "additionalProperties": false
}