{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/taxisfabbrimone-com/json-schema/taxisfabbrimone-com-estimation-schema.json",
  "title": "Estimation",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/taxisfabbrimone-com-openapi.yaml#/components/schemas/Estimation",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "engine": {
      "type": "string"
    },
    "depart": {
      "$ref": "#/$defs/Point"
    },
    "destination": {
      "$ref": "#/$defs/Point"
    },
    "route": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "distance_km": {
          "type": "number",
          "description": "Distance routière (0,1 km près), utilisée pour le tarif au compteur."
        },
        "duration_minutes": {
          "type": "integer"
        },
        "service": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "type": "object",
      "properties": {
        "heure": {
          "type": "string"
        },
        "heure_source": {
          "type": "string",
          "enum": [
            "fournie",
            "heure_actuelle_bruxelles"
          ]
        },
        "tarif_nuit": {
          "type": "boolean"
        },
        "vehicule": {
          "type": "string"
        },
        "sieges_enfant": {
          "type": "integer"
        }
      }
    },
    "pricing": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "forfait",
            "forfait_longue_distance",
            "compteur"
          ]
        },
        "is_range": {
          "type": "boolean"
        },
        "forfait": {
          "type": [
            "object",
            "null"
          ]
        },
        "compteur": {
          "type": [
            "object",
            "null"
          ]
        },
        "supplements": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "amount_eur": {
                "type": "number"
              }
            }
          }
        },
        "supplements_total_eur": {
          "type": "number"
        },
        "currency": {
          "type": "string",
          "const": "EUR"
        }
      }
    },
    "total_eur": {
      "type": [
        "number",
        "null"
      ],
      "description": "Prix total TTC ; null si fourchette (voir total_min_eur/total_max_eur)."
    },
    "total_min_eur": {
      "type": "number"
    },
    "total_max_eur": {
      "type": "number"
    },
    "price_display": {
      "type": "string",
      "description": "Prix tel qu'affiché par le calculateur."
    },
    "calculation_explanation": {
      "type": "string"
    },
    "estimation_text": {
      "type": "string"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Point": {
      "type": "object",
      "properties": {
        "input": {
          "type": "string",
          "description": "Texte reçu."
        },
        "address": {
          "type": "string",
          "description": "Adresse retenue par le géocodage (à vérifier)."
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "geocoding_source": {
          "type": "string",
          "enum": [
            "photon",
            "lieu_forfaitaire"
          ]
        },
        "forfait_place": {
          "type": [
            "string",
            "null"
          ],
          "description": "Lieu de la grille forfaitaire reconnu (aéroport, gare...)."
        }
      }
    }
  }
}