{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AutoRadar authorized vehicle feed v1.3",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "id",
      "make",
      "model",
      "price_eur",
      "year",
      "mileage_km",
      "province",
      "city",
      "source_url",
      "image_rights",
      "updated_at",
      "expires_at",
      "rights_basis"
    ],
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1
      },
      "make": {
        "type": "string",
        "minLength": 1
      },
      "model": {
        "type": "string",
        "minLength": 1
      },
      "trim": {
        "type": "string"
      },
      "price_eur": {
        "type": "number",
        "minimum": 0
      },
      "year": {
        "type": "integer",
        "minimum": 1900,
        "maximum": 2100
      },
      "mileage_km": {
        "type": "number",
        "minimum": 0
      },
      "fuel": {
        "type": "string"
      },
      "gearbox": {
        "type": "string"
      },
      "power": {
        "type": "string"
      },
      "region": {
        "type": "string"
      },
      "province": {
        "type": "string",
        "minLength": 1
      },
      "comarca": {
        "type": "string"
      },
      "city": {
        "type": "string",
        "minLength": 1
      },
      "lat": {
        "type": [
          "number",
          "null"
        ],
        "minimum": -90,
        "maximum": 90
      },
      "lng": {
        "type": [
          "number",
          "null"
        ],
        "minimum": -180,
        "maximum": 180
      },
      "source_url": {
        "type": "string",
        "format": "uri"
      },
      "image_url": {
        "type": [
          "string",
          "null"
        ]
      },
      "image_rights": {
        "enum": [
          "owned",
          "dealer_authorized",
          "licensed",
          "ai_concept"
        ]
      },
      "image_license_note": {
        "type": "string"
      },
      "provider_name": {
        "type": "string"
      },
      "provider_reference": {
        "type": "string"
      },
      "updated_at": {
        "type": "string"
      },
      "expires_at": {
        "type": "string"
      },
      "rights_basis": {
        "enum": [
          "provider_contract",
          "provider_terms",
          "licensed_api",
          "owned_inventory",
          "open_license"
        ]
      },
      "condition": {
        "enum": [
          "used",
          "demo",
          "km0",
          "new"
        ]
      },
      "seller_type": {
        "enum": [
          "dealer",
          "professional",
          "manufacturer",
          "authorized_partner"
        ]
      },
      "seller_name": {
        "type": "string"
      },
      "currency": {
        "enum": [
          "EUR"
        ]
      },
      "seller_url": {
        "type": [
          "string",
          "null"
        ]
      },
      "photo_attribution": {
        "type": "string"
      },
      "provider_vehicle_url": {
        "type": [
          "string",
          "null"
        ]
      }
    }
  }
}