{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carstat-app/json-schema/carstat-app-vin-specs-response-schema.json",
  "title": "vin_specs_response",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carstat-app-vehicle-specifications-api-openapi.yml#/components/schemas/vin_specs_response",
  "type": "object",
  "properties": {
    "vin": {
      "type": "string",
      "description": "The VIN that was decoded, upper-cased."
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Non-fatal VIN validation warnings, if any."
    },
    "make": {
      "type": [
        "string",
        "null"
      ],
      "description": "Manufacturer decoded from the VIN"
    },
    "model": {
      "type": [
        "string",
        "null"
      ],
      "description": "Model decoded from the VIN, normalised to the name used in the catalog. Some manufacturers encode a specific trim where the catalog lists the wider model line; this field is then the model line the specifications were found under, and the trim is available from the VIN decoding endpoint. Null when the VIN identifies the manufacturer but not a specific model."
    },
    "year": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Model year decoded from VIN position 10"
    },
    "match_confidence": {
      "type": "string",
      "enum": [
        "exact",
        "narrowed",
        "ambiguous"
      ],
      "description": "How precisely the VIN resolved to a single trim: 'exact' (one candidate remains), 'narrowed' (reduced but several remain), or 'ambiguous' (the VIN does not distinguish the remaining trims). A successful response always contains at least one candidate; when none can be found the endpoint returns 404. A VIN cannot encode trim/options for most makes, so a single result is not guaranteed."
    },
    "matched_on": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Decoded signals that discriminated between trims, e.g. engine_code, cylinders, displacement, fuel, body, drive_type."
    },
    "best_match": {
      "type": [
        "object",
        "null"
      ],
      "description": "The single most likely modification specification for the VIN (top-ranked candidate)."
    },
    "candidates": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Matching modification specifications, narrowed to the trims consistent with the decoded VIN."
    }
  },
  "required": [
    "vin",
    "errors",
    "make",
    "model",
    "year",
    "candidates",
    "match_confidence",
    "matched_on",
    "best_match"
  ]
}