{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/immo-spot-com/json-schema/immo-spot-com-batiment-schema.json",
  "title": "Batiment",
  "description": "Bâtiment issu de la Base de Données Nationale des Bâtiments (BDNB — CSTB), à l'échelle du \"groupe de bâtiments\" (unité de la BDNB regroupant les constructions contiguës d'une même opération). L'entrée agrège déjà les données DPE, copropriété, risques, urbanisme et DVF croisées nationalement par le producteur — pas besoin de recouper vous-même parcelle, DPE et copropriété.\n",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/immo-spot-com-api-openapi.yml#/components/schemas/Batiment",
  "type": "object",
  "properties": {
    "batiment_groupe_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Identifiant BDNB du groupe de bâtiments"
    },
    "departement_insee": {
      "type": [
        "string",
        "null"
      ]
    },
    "commune_insee": {
      "type": [
        "string",
        "null"
      ]
    },
    "iris_insee": {
      "type": [
        "string",
        "null"
      ]
    },
    "surface_m2": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Surface au sol du groupe de bâtiments en m²"
    },
    "hauteur": {
      "type": [
        "number",
        "null"
      ],
      "description": "Hauteur maximale des constructions du groupe en mètres (uniquement sur l'endpoint parcelle)"
    },
    "intersection_percent": {
      "type": [
        "number",
        "null"
      ],
      "description": "Part du bâtiment intersectant la parcelle en % (uniquement sur l'endpoint parcelle)"
    },
    "annee_construction": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Année de construction (Fichiers Fonciers)"
    },
    "nb_niveau": {
      "type": [
        "integer",
        "null"
      ]
    },
    "nb_log": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Nombre de logements"
    },
    "mat_mur_txt": {
      "type": [
        "string",
        "null"
      ]
    },
    "mat_toit_txt": {
      "type": [
        "string",
        "null"
      ]
    },
    "usage_niveau_1_txt": {
      "type": [
        "string",
        "null"
      ]
    },
    "usage_principal": {
      "type": [
        "string",
        "null"
      ],
      "description": "Usage principal synthétisé par la BDNB"
    },
    "adresse": {
      "type": [
        "object",
        "null"
      ],
      "description": "Adresse principale (Base Adresse Nationale)",
      "properties": {
        "libelle": {
          "type": [
            "string",
            "null"
          ]
        },
        "fiabilite": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "dpe": {
      "type": [
        "object",
        "null"
      ],
      "description": "DPE représentatif du groupe de bâtiments (logement et/ou tertiaire), et répartition des classes DPE des logements du bâtiment",
      "properties": {
        "representatif_logement": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "classe_bilan_dpe": {
              "type": [
                "string",
                "null"
              ]
            },
            "classe_emission_ges": {
              "type": [
                "string",
                "null"
              ]
            },
            "periode_construction_dpe": {
              "type": [
                "string",
                "null"
              ]
            },
            "annee_construction_dpe": {
              "type": [
                "integer",
                "null"
              ]
            },
            "date_etablissement_dpe": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "surface_habitable_logement": {
              "type": [
                "number",
                "null"
              ]
            },
            "conso_5_usages_ep_m2": {
              "type": [
                "number",
                "null"
              ]
            },
            "emission_ges_5_usages_m2": {
              "type": [
                "number",
                "null"
              ]
            },
            "type_installation_chauffage": {
              "type": [
                "string",
                "null"
              ]
            },
            "type_energie_chauffage": {
              "type": [
                "string",
                "null"
              ]
            },
            "type_installation_ecs": {
              "type": [
                "string",
                "null"
              ]
            },
            "type_energie_ecs": {
              "type": [
                "string",
                "null"
              ]
            },
            "type_isolation_mur_exterieur": {
              "type": [
                "string",
                "null"
              ]
            },
            "type_vitrage": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "tertiaire": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "classe_conso_energie_dpe_tertiaire": {
              "type": [
                "string",
                "null"
              ]
            },
            "classe_emission_ges_dpe_tertiaire": {
              "type": [
                "string",
                "null"
              ]
            },
            "conso_dpe_tertiaire_ep_m2": {
              "type": [
                "number",
                "null"
              ]
            },
            "emission_ges_dpe_tertiaire_m2": {
              "type": [
                "number",
                "null"
              ]
            },
            "categorie_erp_dpe_tertiaire": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "repartition_logements": {
          "type": [
            "object",
            "null"
          ],
          "description": "Nombre de logements du bâtiment par classe DPE (a à g)",
          "properties": {
            "a": {
              "type": "integer"
            },
            "b": {
              "type": "integer"
            },
            "c": {
              "type": "integer"
            },
            "d": {
              "type": "integer"
            },
            "e": {
              "type": "integer"
            },
            "f": {
              "type": "integer"
            },
            "g": {
              "type": "integer"
            }
          }
        }
      }
    },
    "renovation": {
      "type": [
        "object",
        "null"
      ],
      "description": "Potentiel de rénovation énergétique estimé par la BDNB",
      "properties": {
        "eligibilite_geothermie_nappe": {
          "type": [
            "string",
            "null"
          ]
        },
        "eligibilite_geothermie_sonde": {
          "type": [
            "string",
            "null"
          ]
        },
        "potentiel_solaire_thermique_annuel": {
          "type": [
            "number",
            "null"
          ],
          "description": "en kWh/an"
        },
        "favorabilite_geothermie_nappe": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "favorabilite_geothermie_sonde": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "favorabilite_solaire_thermique": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "copropriete": {
      "type": [
        "object",
        "null"
      ],
      "description": "Copropriété correspondante au Registre National des Copropriétés (ANAH)",
      "properties": {
        "l_nom_copro": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "numero_immat_principal": {
          "type": [
            "string",
            "null"
          ]
        },
        "nb_lot_tot": {
          "type": [
            "number",
            "null"
          ]
        },
        "nb_lot_garpark": {
          "type": [
            "number",
            "null"
          ]
        },
        "nb_lot_tertiaire": {
          "type": [
            "number",
            "null"
          ]
        },
        "nb_log": {
          "type": [
            "number",
            "null"
          ]
        },
        "periode_construction_max": {
          "type": [
            "string",
            "null"
          ]
        },
        "l_annee_construction": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "copro_dans_pvd": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Dans le périmètre du programme Petites Villes de Demain"
        }
      }
    },
    "logement_social": {
      "type": [
        "object",
        "null"
      ],
      "description": "Présent uniquement si le bâtiment compte des logements du Répertoire du Parc Locatif Social (RPLS)",
      "properties": {
        "nb_log": {
          "type": [
            "number",
            "null"
          ]
        },
        "classe_ener_principale": {
          "type": [
            "string",
            "null"
          ]
        },
        "classe_ges_principale": {
          "type": [
            "string",
            "null"
          ]
        },
        "accessible_pmr": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "certification": {
      "type": [
        "object",
        "null"
      ],
      "description": "Certification environnementale du bâtiment (HQE, BREEAM...)",
      "properties": {
        "certification_environementale": {
          "type": [
            "string",
            "null"
          ]
        },
        "organisme_certification": {
          "type": [
            "string",
            "null"
          ]
        },
        "annee_certification": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "risques": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "alea_radon": {
          "type": [
            "string",
            "null"
          ]
        },
        "alea_argile": {
          "type": [
            "string",
            "null"
          ]
        },
        "alea_sismique": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "urbanisme": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "monument_historique": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Le bâtiment est lui-même classé/inscrit monument historique"
        },
        "denomination_monument_historique": {
          "type": [
            "string",
            "null"
          ]
        },
        "contrainte_urbanisme_ac1": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Situé dans le périmètre de protection d'un monument historique"
        },
        "zone_plu_bati_patrimonial": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "monument_historique_proche_nom": {
          "type": [
            "string",
            "null"
          ],
          "description": "Monument historique le plus proche (que le bâtiment soit classé ou non)"
        },
        "monument_historique_proche_distance": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Distance en mètres"
        },
        "qpv_nom_quartier": {
          "type": [
            "string",
            "null"
          ],
          "description": "Nom du quartier prioritaire de la politique de la ville si applicable"
        }
      }
    },
    "reseaux": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "distance_reseau_chaud_froid": {
          "type": [
            "string",
            "null"
          ]
        },
        "perimetre_developpement_prioritaire": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "nb_points_livraison_hthd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Nombre de points de livraison haute/très haute tension"
        }
      }
    },
    "equipements_proximite": {
      "type": [
        "array",
        "null"
      ],
      "description": "Types d'équipements publics à proximité (Base Permanente des Équipements)",
      "items": {
        "type": "string"
      }
    },
    "dvf": {
      "type": [
        "object",
        "null"
      ],
      "description": "Mutations DVF agrégées sur le bâtiment",
      "properties": {
        "statistique": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "nb_mutation": {
              "type": [
                "integer",
                "null"
              ]
            },
            "valeur_fonciere_median": {
              "type": [
                "number",
                "null"
              ]
            },
            "valeur_fonciere_moyenne": {
              "type": [
                "number",
                "null"
              ]
            },
            "prix_m2_local_median": {
              "type": [
                "number",
                "null"
              ]
            },
            "prix_m2_local_moyen": {
              "type": [
                "number",
                "null"
              ]
            },
            "prix_m2_terrain_median": {
              "type": [
                "number",
                "null"
              ]
            }
          }
        },
        "derniere_mutation": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "date_mutation": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "valeur_fonciere": {
              "type": [
                "number",
                "null"
              ]
            },
            "prix_m2_local": {
              "type": [
                "number",
                "null"
              ]
            },
            "nb_piece_principale": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        }
      }
    }
  }
}