{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chaletiste-fr/json-schema/chaletiste-fr-product-schema.json",
  "title": "Product",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chaletiste-fr-openapi.json#/components/schemas/Product",
  "type": "object",
  "required": [
    "id",
    "title",
    "url",
    "verified_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Identifiant stable du modèle (slug de l'URL de la fiche)."
    },
    "title": {
      "type": "string",
      "description": "Marque + nom du modèle."
    },
    "name": {
      "type": "string",
      "description": "Nom du modèle tel que publié par la marque."
    },
    "variant": {
      "type": [
        "string",
        "null"
      ],
      "description": "Variante relevée (épaisseur, référence)."
    },
    "brand": {
      "type": "object",
      "description": "{id, name, url} de la marque."
    },
    "category": {
      "type": "object",
      "description": "{id, name} de la catégorie Chaletiste."
    },
    "subcategory": {
      "type": "string",
      "description": "Sous-catégorie : abri, chalet-loisirs, chalet-bureau, pool-house, studio-jardin, chalet-habitable, maison-bois-kit, fuste-rondins, tiny-house, lodge."
    },
    "habitable": {
      "type": "boolean",
      "description": "Conçu pour être habité."
    },
    "url": {
      "type": "string",
      "description": "Fiche HTML sur chaletiste.fr."
    },
    "md_url": {
      "type": "string",
      "description": "Version markdown de la fiche."
    },
    "api_url": {
      "type": "string",
      "description": "Cette fiche en JSON."
    },
    "summary": {
      "type": "string",
      "description": "Phrase-réponse citable résumant les quatre chiffres."
    },
    "price_eur": {
      "type": [
        "number",
        "null"
      ],
      "description": "Prix TTC constaté du kit, en euros."
    },
    "price_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Date du relevé de prix."
    },
    "price_note": {
      "type": [
        "string",
        "null"
      ],
      "description": "Précision sur le prix (promotion, contenu)."
    },
    "price_per_m2_eur": {
      "type": [
        "number",
        "null"
      ],
      "description": "Prix TTC divisé par la surface, arrondi à l'euro."
    },
    "retailer": {
      "type": [
        "string",
        "null"
      ],
      "description": "Marchand chez qui le prix a été relevé."
    },
    "buy_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Lien vers la page du marchand (peut être un lien d'affiliation)."
    },
    "official_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Page officielle de la marque."
    },
    "surface_m2": {
      "type": [
        "number",
        "null"
      ],
      "description": "Surface annoncée en m²."
    },
    "surface_note": {
      "type": [
        "string",
        "null"
      ],
      "description": "Ce que mesure la surface (intérieure, hors tout)."
    },
    "footprint_m2": {
      "type": [
        "number",
        "null"
      ],
      "description": "Emprise au sol (largeur × profondeur), celle qui compte pour l'urbanisme."
    },
    "dimensions_m": {
      "type": "object",
      "description": "Dimensions en mètres.",
      "properties": {
        "width": {
          "type": [
            "number",
            "null"
          ]
        },
        "depth": {
          "type": [
            "number",
            "null"
          ]
        },
        "height": {
          "type": [
            "number",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "wall_thickness_mm": {
      "type": [
        "number",
        "null"
      ],
      "description": "Épaisseur des parois en millimètres."
    },
    "wall_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "Type de paroi (madrier massif, double madrier, ossature isolée…)."
    },
    "wood": {
      "type": [
        "string",
        "null"
      ],
      "description": "Essence de bois."
    },
    "treatment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Traitement du bois."
    },
    "roof": {
      "type": [
        "string",
        "null"
      ],
      "description": "Toiture et couverture."
    },
    "floor_included": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Plancher inclus dans le kit."
    },
    "glazing": {
      "type": [
        "string",
        "null"
      ],
      "description": "Menuiseries et vitrage."
    },
    "insulation": {
      "type": [
        "string",
        "null"
      ],
      "description": "Isolation fournie."
    },
    "kit_level": {
      "type": [
        "string",
        "null"
      ],
      "description": "Niveau de kit : kit brut, kit madriers, hors d'eau hors d'air, livré monté, clé en main."
    },
    "included": {
      "type": [
        "string",
        "null"
      ],
      "description": "Contenu du kit."
    },
    "foundations": {
      "type": [
        "string",
        "null"
      ],
      "description": "Fondations fournies ou recommandées."
    },
    "delivered_assembled": {
      "type": "boolean",
      "description": "Livré monté ou clé en main (pas de montage à prévoir)."
    },
    "assembly": {
      "type": "object",
      "description": "{hours, text, people, estimated, basis, source} : temps de montage. estimated = true : estimation Chaletiste (ratio h/m² de modèles comparables), jamais présentée comme donnée du fabricant.",
      "properties": {
        "hours": {
          "type": [
            "number",
            "null"
          ]
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "people": {
          "type": [
            "string",
            "number",
            "null"
          ]
        },
        "estimated": {
          "type": "boolean"
        },
        "basis": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "delivery": {
      "type": "object",
      "properties": {
        "days_min": {
          "type": [
            "number",
            "null"
          ]
        },
        "days_max": {
          "type": [
            "number",
            "null"
          ]
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "permit": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "aucune",
            "dp",
            "pc"
          ]
        },
        "label": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "warranty": {
      "type": [
        "string",
        "null"
      ],
      "description": "Garantie annoncée."
    },
    "origin": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pays de fabrication."
    },
    "photo": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL de la photo (propriété de la marque, voir photo_credit)."
    },
    "photo_credit": {
      "type": [
        "string",
        "null"
      ],
      "description": "Crédit de la photo."
    },
    "similar_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Identifiants de modèles similaires (même catégorie, surface proche)."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "URL des sources consultées."
    },
    "verified_at": {
      "type": "string",
      "format": "date",
      "description": "Date de la dernière vérification de la fiche."
    }
  }
}