{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carhunt-fr/json-schema/carhunt-fr-market-out-schema.json",
  "title": "MarketOut",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carhunt-fr-march-api-openapi.yml#/components/schemas/MarketOut",
  "properties": {
    "listing_id": {
      "type": "string",
      "title": "Listing Id"
    },
    "price": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price"
    },
    "market_median": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Market Median",
      "description": "Prix médian du segment (même modèle, ±1 an, tranche de km)"
    },
    "comparable_count": {
      "type": "integer",
      "title": "Comparable Count",
      "description": "Nombre d'annonces comparables utilisées",
      "default": 0
    },
    "savings": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Savings",
      "description": "Écart € vs médiane (positif = sous la cote)"
    },
    "undercut_pct": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Undercut Pct",
      "description": "Écart % vs médiane"
    }
  },
  "type": "object",
  "required": [
    "listing_id"
  ]
}