{
  "openapi": "3.0.3",
  "info": {
    "title": "VinDecoderCheck VIN Decoder API",
    "description": "Free VIN decoder: make, model, year, plant, body and engine facts decoded from NHTSA vPIC (US public domain), with permanent local caching. Full 17-character VINs and partial VINs of 11+ characters accepted. VINs are never logged. Keyless use is limited per IP per day; a free IPNOVA API key raises the limit.",
    "version": "1.0.0",
    "contact": {
      "email": "hello@ipnova.com",
      "url": "https://vindecodercheck.com/vin-api"
    }
  },
  "servers": [
    {
      "url": "https://vindecodercheck.com"
    }
  ],
  "paths": {
    "/api/vin/{vin}": {
      "get": {
        "summary": "Decode a VIN",
        "description": "17 characters, or a partial VIN of 11 or more. VINs never contain the letters I, O or Q. Fields the decoder cannot determine are omitted from the response.",
        "operationId": "decodeVin",
        "security": [
          {},
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "vin",
            "in": "path",
            "required": true,
            "description": "Vehicle Identification Number, e.g. 1FTFW1ET5DFC10312",
            "schema": {
              "type": "string",
              "minLength": 11,
              "maxLength": 17,
              "example": "1FTFW1ET5DFC10312"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Decoded build facts (fields present only when known)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VinResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Free IPNOVA API key from https://api.ipnova.com (also accepted as ?key= query parameter). Keyless requests share a per-IP daily limit."
      }
    },
    "schemas": {
      "VinResult": {
        "type": "object",
        "description": "Flat object of build facts. Only fields the decoder resolved are present; the full set includes body_class, drive_type, engine_cylinders, displacement_l, fuel_type_primary, transmission_style, doors, gvwr, series and trim.",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "vin": {
            "type": "string",
            "example": "1FTFW1ET5DFC10312"
          },
          "make": {
            "type": "string",
            "example": "FORD"
          },
          "model": {
            "type": "string",
            "example": "F-150"
          },
          "model_year": {
            "type": "string",
            "example": "2013"
          },
          "manufacturer": {
            "type": "string"
          },
          "plant_city": {
            "type": "string"
          },
          "plant_country": {
            "type": "string"
          },
          "vehicle_type": {
            "type": "string"
          },
          "error_text": {
            "type": "string",
            "description": "vPIC decode notes, when the upstream reports any"
          },
          "specs_page": {
            "type": "string",
            "format": "uri",
            "description": "Specs and recalls page on vindecodercheck.com, when the model is on record"
          },
          "recalls_on_record": {
            "type": "integer",
            "description": "Number of recalls on record for the model, when any"
          },
          "source": {
            "type": "string",
            "example": "NHTSA vPIC (US public domain)"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "boolean",
            "example": true
          },
          "reason": {
            "type": "string",
            "enum": [
              "invalid_input",
              "rate_limit",
              "daily_limit",
              "unknown_endpoint",
              "upstream_unavailable"
            ]
          },
          "message": {
            "type": "string"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Error envelope with a machine-readable reason field",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
