{
  "openapi": "3.1.1",
  "info": {
    "title": "overenie.digital API",
    "version": "1.0.0",
    "summary": "Read-only vehicle lookup API",
    "description": "Search canonical vehicle records by license plate, VIN or registration-document number. Expanded projections are requested explicitly with include and require the matching scope. Dates use ISO 8601. Every documented field in a returned projection is present; unknown values are null. Errors use RFC 9457 Problem Details.",
    "contact": {"name": "overenie.digital", "url": "https://overenie.digital/kontakt"}
  },
  "externalDocs": {"description": "Developer documentation and examples", "url": "/api"},
  "servers": [{"url": "/api/v1", "description": "Current host"}],
  "security": [{"ApiKey": []}, {"Bearer": []}],
  "tags": [
    {"name": "Vehicles", "description": "Canonical vehicle lookups. A successful lookup consumes one monthly credit."},
    {"name": "Account", "description": "Current API plan, effective scopes and usage. Does not consume monthly lookup credit."}
  ],
  "x-scope-catalog": [
    {
      "code": "vehicle.basic",
      "status": "available",
      "included_in_free": true,
      "description": "Vehicle identification, every known national registration plate and basic parameters: VIN, make, model, category, body, fuel, color, displacement, power, maximum weight, seats, doors, gearbox and first-registration years.",
      "excludes": ["theft records", "odometer history", "listings", "photos"]
    },
    {
      "code": "vehicle.technical",
      "status": "available",
      "included_in_free": false,
      "description": "Reviewed technical projection with exact registration dates, dimensions, weights, axles, wheelbase, engine data, consumption, noise and emissions."
    },
    {
      "code": "vehicle.theft",
      "status": "available",
      "included_in_free": false,
      "description": "Runs an explicit cached verification against the Slovak, Czech, Slovenian, Romanian and Hungarian theft registers. Returns an overall status and a separate authoritative status, timestamp, cache flag and reviewed public records for each database."
    },
    {
      "code": "vehicle.odometer",
      "status": "available",
      "included_in_free": false,
      "description": "Adds the odometer object with chronological observations: value in kilometres, public marketplace name, publication time and capture time."
    },
    {
      "code": "vehicle.listings",
      "status": "available",
      "included_in_free": false,
      "description": "Adds the listings object with historical public marketplace name and URL, observation dates, price, currency and screenshot-availability metadata. Seller personal data is excluded."
    },
    {
      "code": "vehicle.photos",
      "status": "available",
      "included_in_free": false,
      "description": "Adds the photos object with moderated active vehicle images, public URL, title, creation time and dimensions."
    },
    {
      "code": "vehicle.listing_photos",
      "status": "available",
      "included_in_free": false,
      "description": "Adds the listing_photos object with historical marketplace images, public marketplace name, dimensions and a signed URL valid for 24 hours."
    },
    {
      "code": "vehicle.vin_occurrences",
      "status": "available",
      "included_in_free": false,
      "description": "Paginated source occurrences of the VIN in national databases. Strong VIN occurrences are marked as the same vehicle; weak VIN occurrences are only possible matches."
    },
    {
      "code": "vehicle.inspections",
      "status": "available",
      "included_in_free": false,
      "description": "Paginated technical and emissions inspections already linked to the vehicle, newest first. Current coverage is primarily Czech. Returns the inspection country, date, kind, result code, recorded odometer and next inspection date when known."
    }
  ],
  "paths": {
    "/vehicles/license-plates/{country}/{licensePlate}": {
      "get": {
        "tags": ["Vehicles"],
        "summary": "Find vehicles by license plate",
        "description": "Returns every canonical vehicle associated with the normalized license plate. The data field is always an array because a plate can be associated with more than one historical vehicle record. If configured, a Czech plate missing locally is checked with external Czech sources. A temporary upstream error or throttle with no result returns HTTP 503 without consuming a monthly credit.",
        "operationId": "findVehicleByLicensePlate",
        "x-required-scope": "vehicle.basic",
        "parameters": [
          {"$ref": "#/components/parameters/CountryPath"},
          {"name": "licensePlate", "in": "path", "required": true, "description": "License plate without spaces, for example BL001AA. Case and hyphens are normalized.", "schema": {"type": "string", "minLength": 2, "maxLength": 16, "pattern": "^[A-Za-z0-9-]+$"}, "example": "BL001AA"},
          {"$ref": "#/components/parameters/Page"},
          {"$ref": "#/components/parameters/PerPage"},
          {"$ref": "#/components/parameters/Include"}
        ],
        "responses": {
          "200": {"$ref": "#/components/responses/Vehicles"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/Unauthorized"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "422": {"$ref": "#/components/responses/InvalidRequest"}, "429": {"$ref": "#/components/responses/Limited"}, "500": {"$ref": "#/components/responses/ServerError"}, "503": {"$ref": "#/components/responses/Unavailable"}
        }
      }
    },
    "/vehicles/vins/{vin}": {
      "get": {
        "tags": ["Vehicles"],
        "summary": "Find vehicles by VIN",
        "description": "Returns the canonical vehicle matching a normalized VIN. A standard 17-character VIN is a global vehicle identity and is not country-bound. The country query parameter is required only for weak or non-standard VIN values. Each vehicle includes every known registration plate; their order does not identify the currently used plate.",
        "operationId": "findVehicleByVin",
        "x-required-scope": "vehicle.basic",
        "parameters": [
          {"name": "vin", "in": "path", "required": true, "description": "Vehicle identification number.", "schema": {"type": "string", "minLength": 4, "maxLength": 100, "pattern": "^[A-Za-z0-9-]+$"}, "example": "WBAUG31050PU29216"},
          {"name": "country", "in": "query", "required": false, "description": "Required only for a weak or non-standard VIN; ignored for strong VIN identity.", "schema": {"type": "string", "enum": ["SK", "CZ", "SI", "RO", "HU"]}, "example": "SK"},
          {"$ref": "#/components/parameters/Page"},
          {"$ref": "#/components/parameters/PerPage"},
          {"$ref": "#/components/parameters/Include"}
        ],
        "responses": {
          "200": {"$ref": "#/components/responses/Vehicles"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/Unauthorized"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "422": {"$ref": "#/components/responses/InvalidRequest"}, "429": {"$ref": "#/components/responses/Limited"}, "500": {"$ref": "#/components/responses/ServerError"}, "503": {"$ref": "#/components/responses/Unavailable"}
        }
      }
    },
    "/vehicles/registration-documents/{country}/{number}": {
      "get": {
        "tags": ["Vehicles"],
        "summary": "Find vehicles by registration-document number",
        "description": "Returns vehicles associated with a normalized registration-document number. The document number is used only for lookup and is not included in the basic public response.",
        "operationId": "findVehicleByRegistrationDocument",
        "x-required-scope": "vehicle.basic",
        "parameters": [
          {"$ref": "#/components/parameters/CountryPath"},
          {"name": "number", "in": "path", "required": true, "description": "Registration-document number without spaces.", "schema": {"type": "string", "minLength": 2, "maxLength": 64, "pattern": "^[A-Za-z0-9-]+$"}, "example": "EIC72630"},
          {"$ref": "#/components/parameters/Page"},
          {"$ref": "#/components/parameters/PerPage"},
          {"$ref": "#/components/parameters/Include"}
        ],
        "responses": {
          "200": {"$ref": "#/components/responses/Vehicles"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/Unauthorized"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "422": {"$ref": "#/components/responses/InvalidRequest"}, "429": {"$ref": "#/components/responses/Limited"}, "500": {"$ref": "#/components/responses/ServerError"}, "503": {"$ref": "#/components/responses/Unavailable"}
        }
      }
    },
    "/vehicles/{vehicleId}/theft": {
      "get": {
        "tags": ["Vehicles"],
        "summary": "Verify a vehicle in national theft registers",
        "description": "Checks Slovakia, Czechia, Slovenia, Romania and Hungary independently. SK and CZ results use the persistent freshness cache before contacting the authoritative service; SI, RO and HU use imported national datasets. A successful request consumes one monthly credit.",
        "operationId": "checkVehicleTheft",
        "x-required-scope": "vehicle.theft",
        "parameters": [
          {"name": "vehicleId", "in": "path", "required": true, "description": "The 24-character public vehicle ID returned by a lookup.", "schema": {"type": "string", "pattern": "^[a-f0-9]{24}$"}}
        ],
        "responses": {
          "200": {"$ref": "#/components/responses/VehicleTheft"}, "401": {"$ref": "#/components/responses/Unauthorized"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "422": {"$ref": "#/components/responses/InvalidRequest"}, "429": {"$ref": "#/components/responses/Limited"}, "500": {"$ref": "#/components/responses/ServerError"}, "503": {"$ref": "#/components/responses/Unavailable"}
        }
      }
    },
    "/vehicles/{vehicleId}/{collection}": {
      "get": {
        "tags": ["Vehicles"],
        "summary": "Read a paginated vehicle data collection",
        "description": "Returns one independently paginated high-volume collection for a vehicle returned by a lookup. Each collection requires its matching scope and one successful page consumes one monthly credit. Use this endpoint instead of a large include response when traversing history.",
        "operationId": "getVehicleCollection",
        "x-required-scope-by-collection": {
          "vin_occurrences": "vehicle.vin_occurrences",
          "odometer": "vehicle.odometer",
          "listings": "vehicle.listings",
          "photos": "vehicle.photos",
          "listing_photos": "vehicle.listing_photos",
          "inspections": "vehicle.inspections"
        },
        "parameters": [
          {"name": "vehicleId", "in": "path", "required": true, "description": "The 24-character public vehicle ID returned by a lookup.", "schema": {"type": "string", "pattern": "^[a-f0-9]{24}$"}},
          {"name": "collection", "in": "path", "required": true, "description": "Requested collection and its required scope.", "schema": {"type": "string", "enum": ["vin_occurrences", "odometer", "listings", "photos", "listing_photos", "inspections"]}},
          {"$ref": "#/components/parameters/Page"},
          {"$ref": "#/components/parameters/PerPage"}
        ],
        "responses": {
          "200": {"$ref": "#/components/responses/VehicleCollection"}, "401": {"$ref": "#/components/responses/Unauthorized"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"$ref": "#/components/responses/NotFound"}, "422": {"$ref": "#/components/responses/InvalidRequest"}, "429": {"$ref": "#/components/responses/Limited"}, "500": {"$ref": "#/components/responses/ServerError"}, "503": {"$ref": "#/components/responses/Unavailable"}
        }
      }
    },
    "/usage": {
      "get": {
        "tags": ["Account"],
        "summary": "Get current plan, scopes and usage",
        "description": "Returns the authenticated key name, assigned plan, account-level monthly quota, rate limit and effective scopes. This call is rate limited but does not consume monthly vehicle-lookup credit.",
        "operationId": "getApiUsage",
        "responses": {
          "200": {"$ref": "#/components/responses/Usage"}, "400": {"$ref": "#/components/responses/BadRequest"}, "401": {"$ref": "#/components/responses/Unauthorized"}, "403": {"$ref": "#/components/responses/Forbidden"}, "429": {"$ref": "#/components/responses/Limited"}, "500": {"$ref": "#/components/responses/ServerError"}, "503": {"$ref": "#/components/responses/Unavailable"}
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {"type": "apiKey", "in": "header", "name": "X-API-Key", "description": "Preferred authentication header. Never send it together with Authorization."},
      "Bearer": {"type": "http", "scheme": "bearer", "bearerFormat": "ovd_live_…", "description": "Alternative Bearer authentication. Never send it together with X-API-Key."}
    },
    "parameters": {
      "CountryPath": {"name": "country", "in": "path", "required": true, "description": "Supported registration country.", "schema": {"type": "string", "enum": ["SK", "CZ", "SI", "RO", "HU"]}, "example": "SK"},
      "Page": {"name": "page", "in": "query", "required": false, "description": "One-based result page. Pages after the last available page return an empty data array with pagination metadata.", "schema": {"type": "integer", "minimum": 1, "maximum": 1000000, "default": 1}},
      "PerPage": {"name": "per_page", "in": "query", "required": false, "description": "Number of canonical vehicles or collection records returned per page.", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}},
      "Include": {"name": "include", "in": "query", "required": false, "description": "Comma-separated expanded projections. Each value requires its matching scope. Theft verification, VIN occurrences and STK/EK inspections use dedicated endpoints.", "schema": {"type": "string", "examples": ["technical", "technical,odometer", "listings,photos,listing_photos"]}}
    },
    "headers": {
      "RequestId": {"description": "Unique request identifier to include in support requests.", "schema": {"type": "string", "pattern": "^[a-f0-9]{32}$"}},
      "QuotaLimit": {"description": "Monthly successful-lookup quota.", "schema": {"type": "integer", "minimum": 0}},
      "QuotaRemaining": {"description": "Successful lookups remaining after this response.", "schema": {"type": "integer", "minimum": 0}},
      "QuotaReset": {"description": "ISO 8601 timestamp when the active quota period ends.", "schema": {"type": "string", "format": "date-time"}},
      "RetryAfter": {"description": "Seconds until the request may be retried.", "schema": {"type": "integer", "minimum": 1}}
    },
    "schemas": {
      "Vehicle": {
        "type": "object",
        "required": ["id", "country", "registrations", "basic"],
        "additionalProperties": false,
        "properties": {
          "id": {"type": "string", "minLength": 24, "maxLength": 24, "description": "Opaque stable public identifier. It is not an internal database ID.", "example": "b407e1b2ba57ac8929d653c4"},
          "country": {"type": ["string", "null"], "pattern": "^[A-Z]{2}$", "description": "Lookup registration context; null for a country-neutral strong VIN lookup.", "example": "SK"},
          "registrations": {"type": "array", "description": "Every normalized registration plate associated with the canonical vehicle. The deterministic order does not imply chronology or identify the currently used plate.", "items": {"$ref": "#/components/schemas/VehicleRegistration"}},
          "basic": {"$ref": "#/components/schemas/VehicleBasic"},
          "technical": {"$ref": "#/components/schemas/VehicleTechnical"},
          "odometer": {"$ref": "#/components/schemas/VehicleOdometer"},
          "listings": {"$ref": "#/components/schemas/VehicleListings"},
          "photos": {"$ref": "#/components/schemas/VehiclePhotos"},
          "listing_photos": {"$ref": "#/components/schemas/VehicleListingPhotos"}
        }
      },
      "VehicleBasic": {
        "type": "object",
        "description": "Reviewed basic projection. All properties are present; an unknown value is null.",
        "required": ["vin", "brand", "model", "year_of_production", "vehicle_category", "vehicle_type", "body_type", "fuel", "fuel_code", "color", "volume_ccm", "power_kw", "weight_max", "seats", "doors", "gearbox", "first_registration_year", "first_registration_local_year"],
        "additionalProperties": false,
        "properties": {
          "vin": {"type": ["string", "null"], "example": "WBAUG31050PU29216"},
          "brand": {"type": ["string", "null"], "example": "BMW"},
          "model": {"type": ["string", "null"], "example": "118 d"},
          "year_of_production": {"type": ["integer", "null"], "minimum": 1800, "maximum": 3000},
          "vehicle_category": {"type": ["string", "null"], "example": "M1"},
          "vehicle_type": {"type": ["string", "null"]},
          "body_type": {"type": ["string", "null"], "example": "AB hatchback 5dv."},
          "fuel": {"type": ["string", "null"], "description": "Stable lower-case fuel identifier.", "example": "diesel"},
          "fuel_code": {"type": ["integer", "null"], "minimum": 1, "description": "Original normalized numeric fuel code when available.", "example": 2},
          "color": {"type": ["string", "null"], "example": "Strieborná metalíza svetlá"},
          "volume_ccm": {"type": ["integer", "null"], "minimum": 0, "description": "Engine displacement in cm³.", "example": 1995},
          "power_kw": {"type": ["integer", "null"], "minimum": 0, "description": "Power rounded to whole kW.", "example": 89},
          "weight_max": {"type": ["integer", "null"], "minimum": 0, "description": "Maximum permissible weight in kg."},
          "seats": {"type": ["integer", "null"], "minimum": 0},
          "doors": {"type": ["integer", "null"], "minimum": 0},
          "gearbox": {"type": ["string", "null"]},
          "first_registration_year": {"type": ["integer", "null"], "minimum": 1800, "maximum": 3000, "example": 2005},
          "first_registration_local_year": {"type": ["integer", "null"], "minimum": 1800, "maximum": 3000}
        }
      },
      "VehicleTechnical": {
        "type": "object",
        "description": "Present only when requested with include=technical and allowed by vehicle.technical scope. Once present, every property is included and an unknown value is null.",
        "required": ["factory_mark", "condition", "weight_operational", "weight_permissible_kg", "axle_type", "axle_number", "places_total", "places_standing", "places_sleep", "gearbox_gears", "engine_manufacturer", "engine_min_rpm", "wheel_track_1", "wheel_track_2", "wheel_track_3", "wheel_track_4", "wheelbase", "max_roof_load", "tank_volume", "length", "width", "height", "loading_area_length", "loading_area_width", "power_weight_ratio", "consumption", "consumption_city", "consumption_city_out", "consumption_combined", "noise_standing", "noise_revolutions", "noise_driving", "emissions_co2", "emissions_co2_city", "emissions_co2_city_out", "first_registration_date", "first_registration_local_date"],
        "additionalProperties": false,
        "properties": {
          "factory_mark": {"type": ["string", "null"]}, "condition": {"type": ["string", "null"]},
          "weight_operational": {"type": ["number", "null"]}, "weight_permissible_kg": {"type": ["number", "null"]},
          "axle_type": {"type": ["string", "null"]}, "axle_number": {"type": ["number", "null"]},
          "places_total": {"type": ["number", "null"]}, "places_standing": {"type": ["number", "null"]}, "places_sleep": {"type": ["number", "null"]},
          "gearbox_gears": {"type": ["number", "null"]}, "engine_manufacturer": {"type": ["string", "null"]}, "engine_min_rpm": {"type": ["number", "null"]},
          "wheel_track_1": {"type": ["number", "null"]}, "wheel_track_2": {"type": ["number", "null"]}, "wheel_track_3": {"type": ["number", "null"]}, "wheel_track_4": {"type": ["number", "null"]}, "wheelbase": {"type": ["number", "null"]},
          "max_roof_load": {"type": ["number", "null"]}, "tank_volume": {"type": ["number", "null"]}, "length": {"type": ["number", "null"]}, "width": {"type": ["number", "null"]}, "height": {"type": ["number", "null"]},
          "loading_area_length": {"type": ["number", "null"]}, "loading_area_width": {"type": ["number", "null"]}, "power_weight_ratio": {"type": ["number", "null"]},
          "consumption": {"type": ["number", "null"]}, "consumption_city": {"type": ["number", "null"]}, "consumption_city_out": {"type": ["number", "null"]}, "consumption_combined": {"type": ["number", "null"]},
          "noise_standing": {"type": ["number", "null"]}, "noise_revolutions": {"type": ["number", "null"]}, "noise_driving": {"type": ["number", "null"]},
          "emissions_co2": {"type": ["number", "null"]}, "emissions_co2_city": {"type": ["number", "null"]}, "emissions_co2_city_out": {"type": ["number", "null"]},
          "first_registration_date": {"type": ["string", "null"], "format": "date", "example": "2005-09-01"},
          "first_registration_local_date": {"type": ["string", "null"], "format": "date"}
        },
        "example": {
          "factory_mark": "BMW 118 d",
          "condition": null,
          "weight_operational": 1420,
          "weight_permissible_kg": 1840,
          "axle_type": null,
          "axle_number": 2,
          "places_total": 5,
          "places_standing": 0,
          "places_sleep": 0,
          "gearbox_gears": 6,
          "engine_manufacturer": "BMW",
          "engine_min_rpm": 4000,
          "wheel_track_1": 1484,
          "wheel_track_2": 1497,
          "wheel_track_3": null,
          "wheel_track_4": null,
          "wheelbase": 2660,
          "max_roof_load": 75,
          "tank_volume": 51,
          "length": 4227,
          "width": 1751,
          "height": 1430,
          "loading_area_length": null,
          "loading_area_width": null,
          "power_weight_ratio": 0.063,
          "consumption": null,
          "consumption_city": 6.7,
          "consumption_city_out": 4.2,
          "consumption_combined": 5.1,
          "noise_standing": 78,
          "noise_revolutions": 3000,
          "noise_driving": 70,
          "emissions_co2": 136,
          "emissions_co2_city": null,
          "emissions_co2_city_out": null,
          "first_registration_date": "2005-09-01",
          "first_registration_local_date": "2010-05-19"
        }
      },
      "VehicleTheftRecord": {
        "type": "object",
        "description": "Reviewed public theft-register record. Every property is present; an unknown value is null.",
        "required": ["license_plate", "vin", "registration_country", "manufacturer", "model", "vehicle_type", "color", "stolen_at"],
        "additionalProperties": false,
        "properties": {
          "license_plate": {"type": ["string", "null"]},
          "vin": {"type": ["string", "null"]},
          "registration_country": {"type": ["string", "null"]},
          "manufacturer": {"type": ["string", "null"]},
          "model": {"type": ["string", "null"]},
          "vehicle_type": {"type": ["string", "null"]},
          "color": {"type": ["string", "null"]},
          "stolen_at": {"type": ["string", "null"], "format": "date"}
        }
      },
      "VehicleTheftCheck": {
        "type": "object",
        "required": ["database_country", "status", "checked_at", "cached", "records"],
        "additionalProperties": false,
        "properties": {
          "database_country": {"type": "string", "enum": ["SK", "CZ", "SI", "RO", "HU"]},
          "status": {"type": "string", "enum": ["found", "not_found", "unavailable"]},
          "checked_at": {"type": "string", "format": "date-time"},
          "cached": {"type": "boolean"},
          "records": {"type": "array", "items": {"$ref": "#/components/schemas/VehicleTheftRecord"}}
        }
      },
      "VehicleTheft": {
        "type": "object",
        "description": "Authoritative verification result. unavailable is never treated as not_found.",
        "required": ["status", "checks"],
        "additionalProperties": false,
        "properties": {
          "status": {"type": "string", "enum": ["found", "not_found", "unavailable"]},
          "checks": {"type": "array", "minItems": 5, "maxItems": 5, "items": {"$ref": "#/components/schemas/VehicleTheftCheck"}}
        },
        "example": {
          "status": "found",
          "checks": [{
            "database_country": "SK",
            "status": "found",
            "checked_at": "2026-09-28T16:20:00+02:00",
            "cached": true,
            "records": [{"license_plate": "ZA749JM", "vin": "TMAJ3811ALJ892285", "registration_country": "Slovenská republika", "manufacturer": "HYUNDAI", "model": "TUCSON", "vehicle_type": "OSOBNÉ VOZIDLO", "color": "Šedá metalíza tmavá", "stolen_at": "2026-09-24"}]
          }, {
            "database_country": "CZ", "status": "not_found", "checked_at": "2026-09-28T16:20:01+02:00", "cached": false, "records": []
          }, {
            "database_country": "SI", "status": "not_found", "checked_at": "2026-09-28T15:00:00+02:00", "cached": false, "records": []
          }, {
            "database_country": "RO", "status": "not_found", "checked_at": "2026-09-28T15:00:02+02:00", "cached": true, "records": []
          }, {
            "database_country": "HU", "status": "not_found", "checked_at": "2026-09-28T15:00:03+02:00", "cached": true, "records": []
          }]
        }
      },
      "VehicleOdometerRecord": {
        "type": "object",
        "description": "Odometer observation. Every property is present; an unknown value is null.",
        "required": ["odometer_km", "portal", "published_at", "captured_at"],
        "additionalProperties": false,
        "properties": {
          "odometer_km": {"type": ["integer", "null"], "minimum": 0},
          "portal": {"type": ["string", "null"], "description": "Public marketplace name, never an internal source identifier."},
          "published_at": {"type": ["string", "null"], "format": "date-time"},
          "captured_at": {"type": ["string", "null"], "format": "date-time"}
        }
      },
      "VehicleOdometer": {
        "type": "object",
        "description": "Present only when requested with include=odometer and allowed by vehicle.odometer scope. Records are returned newest first.",
        "required": ["count", "records"],
        "additionalProperties": false,
        "properties": {
          "count": {"type": "integer", "minimum": 0},
          "records": {"type": "array", "items": {"$ref": "#/components/schemas/VehicleOdometerRecord"}}
        },
        "example": {
          "count": 2,
          "records": [
            {"odometer_km": 182450, "portal": "Inzertný portál", "published_at": "2025-04-03T12:00:00+02:00", "captured_at": "2025-04-04T11:12:13+02:00"},
            {"odometer_km": 164820, "portal": "Inzertný portál", "published_at": "2023-08-18T09:30:00+02:00", "captured_at": "2023-08-18T10:02:41+02:00"}
          ]
        }
      },
      "VehicleListingRecord": {
        "type": "object",
        "description": "Reviewed public listing projection. Every property is present; an unknown value is null.",
        "required": ["id", "portal", "url", "published_at", "captured_at", "price", "currency", "screenshot_available"],
        "additionalProperties": false,
        "properties": {
          "id": {"type": ["string", "null"], "minLength": 24, "maxLength": 24, "description": "Opaque identifier, not an internal database ID."},
          "portal": {"type": ["string", "null"], "description": "Public marketplace name."},
          "url": {"type": ["string", "null"], "format": "uri"},
          "published_at": {"type": ["string", "null"], "format": "date-time"},
          "captured_at": {"type": ["string", "null"], "format": "date-time"},
          "price": {"type": ["number", "null"], "minimum": 0},
          "currency": {"type": ["string", "null"], "pattern": "^[A-Z]{3}$"},
          "screenshot_available": {"type": "boolean", "description": "Indicates stored evidence; it does not grant access to the screenshot binary."}
        }
      },
      "VehicleListings": {
        "type": "object",
        "description": "Present only when requested with include=listings and allowed by vehicle.listings scope. Seller contacts and private listing data are never returned.",
        "required": ["count", "records"],
        "additionalProperties": false,
        "properties": {
          "count": {"type": "integer", "minimum": 0},
          "records": {"type": "array", "items": {"$ref": "#/components/schemas/VehicleListingRecord"}}
        },
        "example": {
          "count": 1,
          "records": [{
            "id": "1284ae6c39d170c13eb2d732",
            "portal": "Inzertný portál",
            "url": "https://example.com/listing/1284ae6c",
            "published_at": "2025-04-03T12:00:00+02:00",
            "captured_at": "2025-04-04T11:12:13+02:00",
            "price": 10999.9,
            "currency": "EUR",
            "screenshot_available": false
          }]
        }
      },
      "VehiclePhotoRecord": {
        "type": "object",
        "description": "Moderated active vehicle photo. Every property is present; an unknown value is null.",
        "required": ["id", "title", "created_at", "width", "height", "url"],
        "additionalProperties": false,
        "properties": {
          "id": {"type": ["string", "null"], "minLength": 24, "maxLength": 24, "description": "Opaque identifier, not an internal database ID."},
          "title": {"type": ["string", "null"]},
          "created_at": {"type": ["string", "null"], "format": "date-time"},
          "width": {"type": ["integer", "null"], "minimum": 1},
          "height": {"type": ["integer", "null"], "minimum": 1},
          "url": {"type": ["string", "null"], "format": "uri"}
        }
      },
      "VehiclePhotos": {
        "type": "object",
        "description": "Present only when requested with include=photos and allowed by vehicle.photos scope. Only moderated active direct vehicle photos are returned.",
        "required": ["count", "records"],
        "additionalProperties": false,
        "properties": {
          "count": {"type": "integer", "minimum": 0},
          "records": {"type": "array", "items": {"$ref": "#/components/schemas/VehiclePhotoRecord"}}
        },
        "example": {
          "count": 1,
          "records": [{
            "id": "07a22e48b2b00a5fa975391c",
            "title": "Predný pohľad",
            "created_at": "2024-01-02T03:04:05+01:00",
            "width": 1600,
            "height": 1200,
            "url": "https://overenie.digital/images/vozidlo/fotografia/91"
          }]
        }
      },
      "VehicleListingPhotoRecord": {
        "type": "object",
        "description": "Historical marketplace image. Every property is present; an unknown value is null.",
        "required": ["id", "portal", "published_at", "width", "height", "url", "expires_at"],
        "additionalProperties": false,
        "properties": {
          "id": {"type": ["string", "null"], "minLength": 24, "maxLength": 24, "description": "Opaque identifier, not an internal database ID."},
          "portal": {"type": ["string", "null"], "description": "Public marketplace name."},
          "published_at": {"type": ["string", "null"], "format": "date-time"},
          "width": {"type": ["integer", "null"], "minimum": 1},
          "height": {"type": ["integer", "null"], "minimum": 1},
          "url": {"type": ["string", "null"], "format": "uri", "description": "Signed media URL."},
          "expires_at": {"type": ["string", "null"], "format": "date-time", "description": "Expiration time of the signed URL."}
        }
      },
      "VehicleListingPhotos": {
        "type": "object",
        "description": "Present only when requested with include=listing_photos and allowed by vehicle.listing_photos scope. At most 24 newest records are returned and count is the number of records in this preview. Use the paginated collection endpoint for the exact total.",
        "required": ["count", "records"],
        "additionalProperties": false,
        "properties": {
          "count": {"type": "integer", "minimum": 0},
          "records": {"type": "array", "maxItems": 24, "items": {"$ref": "#/components/schemas/VehicleListingPhotoRecord"}}
        },
        "example": {
          "count": 1,
          "records": [{
            "id": "b882ec29d1272fca983a2725",
            "portal": "Inzertný portál",
            "published_at": "2025-04-03T12:00:00+02:00",
            "width": 1280,
            "height": 720,
            "url": "https://overenie.digital/images/vozidlo/inzerat/fotografia/92?expires=1790620200&signature=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
            "expires_at": "2026-09-28T20:30:00+02:00"
          }]
        }
      },
      "VehicleRegistration": {
        "type": "object",
        "description": "A normalized plate associated with the vehicle in a national database. It is not marked as current because the source data cannot establish that reliably.",
        "required": ["database_country", "license_plate"],
        "additionalProperties": false,
        "properties": {
          "database_country": {"type": "string", "pattern": "^[A-Z]{2}$"},
          "license_plate": {"type": "string", "minLength": 1}
        }
      },
      "VehicleVinOccurrenceRecord": {
        "type": "object",
        "description": "A source occurrence of a VIN in a national vehicle database. vehicle_id is an opaque public identifier. brand and model preserve the raw national-source values; use the main Vehicle.basic object for the best merged profile.",
        "required": ["database_country", "vehicle_id", "license_plate", "vin", "vin_kind", "identity_relation", "brand", "model"],
        "additionalProperties": false,
        "properties": {
          "database_country": {"type": ["string", "null"], "pattern": "^[A-Z]{2}$"},
          "vehicle_id": {"type": ["string", "null"], "minLength": 24, "maxLength": 24},
          "license_plate": {"type": ["string", "null"]},
          "vin": {"type": ["string", "null"]},
          "vin_kind": {"type": ["string", "null"], "enum": ["strong", "weak", null]},
          "identity_relation": {"type": "string", "enum": ["same_vehicle", "possible_match"]},
          "brand": {"type": ["string", "null"], "description": "Raw manufacturer value from this national source record."},
          "model": {"type": ["string", "null"], "description": "Raw model value from this national source record; it may be a generic value such as JINÉ."}
        }
      },
      "VehicleEnvelope": {
        "type": "object", "required": ["data", "meta"], "additionalProperties": false,
        "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Vehicle"}}, "meta": {"$ref": "#/components/schemas/VehicleMeta"}}
      },
      "VehicleCollectionRecord": {
        "oneOf": [
          {"$ref": "#/components/schemas/VehicleVinOccurrenceRecord"},
          {"$ref": "#/components/schemas/VehicleOdometerRecord"},
          {"$ref": "#/components/schemas/VehicleListingRecord"},
          {"$ref": "#/components/schemas/VehiclePhotoRecord"},
          {"$ref": "#/components/schemas/VehicleListingPhotoRecord"},
          {"$ref": "#/components/schemas/VehicleInspectionRecord"}
        ]
      },
      "VehicleInspectionRecord": {
        "type": "object",
        "required": ["country", "inspected_at", "kind", "result_code", "odometer_km", "next_inspection_date"],
        "additionalProperties": false,
        "properties": {
          "country": {"type": ["string", "null"], "pattern": "^[A-Z]{2}$", "description": "Country where the inspection was performed."},
          "inspected_at": {"type": ["string", "null"], "format": "date"},
          "kind": {"type": "string", "enum": ["technical", "emission", "technical_and_emission"]},
          "result_code": {"type": ["string", "null"], "pattern": "^([0-9]{1,3}|passed|failed|conditional)$", "description": "Numeric code from Czech ISTP, a supported standard result code, or null."},
          "odometer_km": {"type": ["integer", "null"], "minimum": 0},
          "next_inspection_date": {"type": ["string", "null"], "format": "date", "description": "Next inspection date according to this record."}
        },
        "example": {"country": "CZ", "inspected_at": "2025-09-12", "kind": "technical_and_emission", "result_code": "1", "odometer_km": 175432, "next_inspection_date": "2027-09-12"}
      },
      "VehicleCollectionEnvelope": {
        "type": "object", "required": ["data", "meta"], "additionalProperties": false,
        "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/VehicleCollectionRecord"}}, "meta": {"$ref": "#/components/schemas/VehicleMeta"}}
      },
      "VehicleTheftEnvelope": {
        "type": "object",
        "required": ["data", "meta"],
        "additionalProperties": false,
        "properties": {"data": {"$ref": "#/components/schemas/VehicleTheft"}, "meta": {"$ref": "#/components/schemas/Meta"}}
      },
      "Usage": {
        "type": "object", "required": ["key", "plan", "quota", "rate_limit", "scopes"], "additionalProperties": false,
        "properties": {
          "key": {"type": "object", "required": ["name"], "additionalProperties": false, "properties": {"name": {"type": "string", "example": "Production backend"}}},
          "plan": {"type": "object", "required": ["code", "name"], "additionalProperties": false, "properties": {"code": {"type": "string", "example": "free"}, "name": {"type": "string", "example": "Free"}}},
          "quota": {"type": "object", "required": ["period", "limit", "used", "remaining"], "additionalProperties": false, "properties": {"period": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$", "example": "2026-09"}, "period_start": {"type": "string", "format": "date-time", "description": "Starts the paid quota period."}, "period_end": {"type": "string", "format": "date-time", "description": "End of the paid quota period (exclusive)."}, "limit": {"type": "integer", "example": 30}, "used": {"type": "integer", "example": 7}, "remaining": {"type": "integer", "example": 23}}},
          "rate_limit": {"type": "object", "required": ["requests_per_minute"], "additionalProperties": false, "properties": {"requests_per_minute": {"type": "integer", "description": "Requests per minute shared by all API keys of the account.", "example": 5}}},
          "scopes": {"type": "array", "items": {"type": "string"}, "example": ["vehicle.basic"]}
        }
      },
      "UsageEnvelope": {"type": "object", "required": ["data", "meta"], "additionalProperties": false, "properties": {"data": {"$ref": "#/components/schemas/Usage"}, "meta": {"$ref": "#/components/schemas/Meta"}}},
      "Meta": {
        "type": "object", "required": ["request_id", "api_version", "generated_at"], "additionalProperties": false,
        "properties": {"request_id": {"type": "string", "pattern": "^[a-f0-9]{32}$"}, "api_version": {"type": "string", "const": "1.0"}, "generated_at": {"type": "string", "format": "date-time"}}
      },
      "VehicleMeta": {
        "type": "object",
        "required": ["request_id", "api_version", "generated_at", "pagination"],
        "additionalProperties": false,
        "properties": {
          "request_id": {"type": "string", "pattern": "^[a-f0-9]{32}$"},
          "api_version": {"type": "string", "const": "1.0"},
          "generated_at": {"type": "string", "format": "date-time"},
          "pagination": {"$ref": "#/components/schemas/Pagination"}
        }
      },
      "Pagination": {
        "type": "object",
        "required": ["page", "per_page", "total", "pages", "returned", "has_previous", "has_next"],
        "additionalProperties": false,
        "properties": {
          "page": {"type": "integer", "minimum": 1},
          "per_page": {"type": "integer", "minimum": 1, "maximum": 100},
          "total": {"type": "integer", "minimum": 0},
          "pages": {"type": "integer", "minimum": 0},
          "returned": {"type": "integer", "minimum": 0, "maximum": 100},
          "has_previous": {"type": "boolean"},
          "has_next": {"type": "boolean"}
        }
      },
      "Problem": {
        "type": "object", "required": ["type", "title", "status", "detail", "code", "request_id"],
        "properties": {"type": {"type": "string", "format": "uri"}, "title": {"type": "string"}, "status": {"type": "integer"}, "detail": {"type": "string"}, "instance": {"type": "string"}, "code": {"type": "string"}, "request_id": {"type": "string"}, "details": {"type": "object", "additionalProperties": true}},
        "example": {"type": "https://overenie.digital/api#vehicle_not_found", "title": "Vehicle not found", "status": 404, "detail": "No vehicle was found for the supplied identifier.", "instance": "/api/v1/vehicles/license-plates/SK/XX000XX", "code": "vehicle_not_found", "request_id": "b38bc53a3fd74f9d9139719249b16b6"}
      }
    },
    "responses": {
      "Vehicles": {
        "description": "A page of matching canonical vehicles. The data array can be empty when a requested page is after the final page. Consumes one monthly lookup credit.",
        "headers": {"X-Request-ID": {"$ref": "#/components/headers/RequestId"}, "X-Quota-Limit": {"$ref": "#/components/headers/QuotaLimit"}, "X-Quota-Remaining": {"$ref": "#/components/headers/QuotaRemaining"}, "X-Quota-Reset": {"$ref": "#/components/headers/QuotaReset"}},
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VehicleEnvelope"}}}
      },
      "VehicleCollection": {
        "description": "A page from one vehicle collection. Consumes one monthly lookup credit.",
        "headers": {"X-Request-ID": {"$ref": "#/components/headers/RequestId"}, "X-Quota-Limit": {"$ref": "#/components/headers/QuotaLimit"}, "X-Quota-Remaining": {"$ref": "#/components/headers/QuotaRemaining"}, "X-Quota-Reset": {"$ref": "#/components/headers/QuotaReset"}},
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VehicleCollectionEnvelope"}}}
      },
      "VehicleTheft": {
        "description": "Independent SK, CZ, SI and RO theft-register checks. Consumes one monthly lookup credit.",
        "headers": {"X-Request-ID": {"$ref": "#/components/headers/RequestId"}, "X-Quota-Limit": {"$ref": "#/components/headers/QuotaLimit"}, "X-Quota-Remaining": {"$ref": "#/components/headers/QuotaRemaining"}, "X-Quota-Reset": {"$ref": "#/components/headers/QuotaReset"}},
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VehicleTheftEnvelope"}}}
      },
      "Usage": {
        "description": "Current plan and account usage. Does not consume monthly lookup credit.",
        "headers": {"X-Request-ID": {"$ref": "#/components/headers/RequestId"}, "X-Quota-Limit": {"$ref": "#/components/headers/QuotaLimit"}, "X-Quota-Remaining": {"$ref": "#/components/headers/QuotaRemaining"}, "X-Quota-Reset": {"$ref": "#/components/headers/QuotaReset"}},
        "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UsageEnvelope"}}}
      },
      "BadRequest": {"description": "Both supported authentication headers were sent.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "Unauthorized": {"description": "API key is missing or invalid.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "Forbidden": {"description": "The key, account, plan or required scope is not active.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "NotFound": {"description": "No vehicle was found. Does not consume monthly lookup credit.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "InvalidRequest": {"description": "Identifier, country, include or pagination parameter has an unsupported value. Does not consume monthly lookup credit.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "Limited": {"description": "Per-minute rate limit or monthly quota was exceeded.", "headers": {"Retry-After": {"$ref": "#/components/headers/RetryAfter"}, "X-Request-ID": {"$ref": "#/components/headers/RequestId"}}, "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "ServerError": {"description": "Unexpected server error. Include X-Request-ID when contacting support.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}},
      "Unavailable": {"description": "Public API is disabled or its secure runtime configuration is incomplete.", "content": {"application/problem+json": {"schema": {"$ref": "#/components/schemas/Problem"}}}}
    }
  }
}
