{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carhunt-fr/json-schema/carhunt-fr-changes-response-schema.json",
  "title": "ChangesResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carhunt-fr-synchronisation-api-openapi.yml#/components/schemas/ChangesResponse",
  "properties": {
    "changes": {
      "items": {
        "$ref": "#/$defs/ListingChangeOut"
      },
      "type": "array",
      "title": "Changes"
    },
    "unknown_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Unknown Ids"
    },
    "sync_until": {
      "type": "string",
      "format": "date-time",
      "title": "Sync Until"
    },
    "tracking_started_at": {
      "type": "string",
      "format": "date-time",
      "title": "Tracking Started At"
    },
    "vehicle_units_charged": {
      "type": "integer",
      "title": "Vehicle Units Charged"
    }
  },
  "type": "object",
  "required": [
    "changes",
    "unknown_ids",
    "sync_until",
    "tracking_started_at",
    "vehicle_units_charged"
  ],
  "$defs": {
    "ListingChangeOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "last_modified_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Modified At"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive",
            "deleted"
          ],
          "title": "Status"
        },
        "listing": {
          "anyOf": [
            {
              "$ref": "#/$defs/ListingOut"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "id",
        "last_modified_at",
        "status",
        "listing"
      ],
      "title": "ListingChangeOut"
    },
    "ListingOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "make": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Make"
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version",
          "description": "Libellé de version brut de l'annonce"
        },
        "finition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Finition",
          "description": "Finition normalisée (ex. « R-Line ») — disponible sur ~2/3 des annonces"
        },
        "year": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Year"
        },
        "mileage": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mileage"
        },
        "price": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price"
        },
        "energy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Energy"
        },
        "gearbox": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gearbox"
        },
        "horsepower": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Horsepower"
        },
        "seller_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Seller Type",
          "description": "'pro' | 'private' | null (inconnu) — capturé depuis le 2026-07-17, couverture croissante au fil des re-scrapes"
        },
        "department": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Department"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "deal_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deal Score",
          "description": "Score de sous-cote 0-100 (50 = prix médian marché, plus haut = meilleure affaire)"
        },
        "photo_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Photo Url"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source",
          "description": "Site annonceur d'origine"
        },
        "source_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Url",
          "description": "Lien direct vers l'annonce d'origine"
        },
        "first_seen": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "First Seen",
          "description": "Découverte de l'annonce par CarHunt (base du paramètre `since`)"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updated At"
        }
      },
      "type": "object",
      "required": [
        "id"
      ],
      "title": "ListingOut",
      "description": "Une annonce. `source_url` pointe vers l'annonce chez l'annonceur d'origine."
    }
  }
}