
A VIN entered into a dealer tool, marketplace or fleet application can contain a transcription error before it ever reaches a decoding workflow. By the end of this guide, you can send a VIN to the Vehicle API validation endpoint, read its check_digit result, and handle errors and usage limits without mistaking validation for a vehicle history check.
What the check-digit endpoint validates
The VIN validation endpoint checks the VIN format and its check digit under ISO 3779. The ninth character of the VIN is the check digit. Vehicle API computes the validation locally, without an upstream call.
The example in this article uses 1HGCM82633A004352, a control VIN for a 2003 Honda Accord. It is useful for testing the request and response, but it is not the VIN of the vehicle your user is entering. Replace it with the submitted VIN in your application.
A successful check is a useful input-quality signal, not proof that a VIN was issued, belongs to a particular vehicle or describes its condition. The result does not include title, accident or ownership history, and it is not a vehicle history report.
Send the request and read the response
Submit the VIN to POST https://vehicles-api.com/api/v1/vin/validate as JSON. Authenticate with the X-API-Key header, using your own key in place of YOUR_API_KEY. Authorization Bearer also works, but the example below uses the API key header.
curl -X POST "https://vehicles-api.com/api/v1/vin/validate" -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{"vin":"1HGCM82633A004352"}'
The official response for the control VIN is:
{
"status": "success",
"source": "local",
"data": {
"vin": "1HGCM82633A004352",
"valid": true,
"check_digit": "3"
}
}
The response uses the Vehicle API envelope: status identifies the outcome, source identifies the source, and data contains the result. The fields relevant to this request are:
status:successin this example. Check it before treating the payload as a validation result.source:local, consistent with validation being computed without an upstream call.data.vin: the VIN represented in the result. Use it to associate the response with the submitted input.data.valid: the Boolean validation result. The control VIN returnstrue.data.check_digit: the check-digit value, returned as a string. The example value is"3".
There are no measurement units, currencies or timestamps in this response. In particular, check_digit is a character value, not a quantity to sum, round or format as a measurement. Keep the exact JSON key check_digit when reading it.
Call the same endpoint from Python
This example uses the requests package. It reads the success envelope, surfaces an API error if one is returned, and checks the HTTP response before using data. Replace the key and control VIN with values supplied by your application.
import requests
url = "https://vehicles-api.com/api/v1/vin/validate"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
}
response = requests.post(
url,
headers=headers,
json={"vin": "1HGCM82633A004352"},
timeout=7,
)
try:
payload = response.json()
except ValueError:
response.raise_for_status()
raise RuntimeError("Expected a JSON response")
if payload.get("status") == "error":
error = payload.get("error") or {}
raise RuntimeError(
f"API error {error.get('code')}: {error.get('message')}"
)
response.raise_for_status()
if payload.get("status") != "success":
raise RuntimeError("Unexpected response status")
data = payload["data"]
print("Source:", payload["source"])
print("VIN:", data["vin"])
print("Valid:", data["valid"])
print("Check digit:", data["check_digit"])
The timeout is an application setting, not an API limit. In a deployed service, load the key from a secure configuration source rather than embedding it in code, and avoid exposing it to browser clients or logs.
The sample raises an exception for an API error rather than treating it as a failed VIN check. That distinction matters: an error envelope means the request did not produce a usable validation result. It is different from receiving a successful envelope whose valid value indicates the result of validation.
Use validation in a vehicle-data workflow
Run the check when a user submits a VIN or before a downstream process relies on it. Keep the validation outcome with the submitted value so your application can distinguish an input that was checked from one that was not. If the request fails, let the user or calling service retry rather than silently marking the VIN invalid.
For a successful result, use valid as the decision field and check_digit when the character itself is useful to the interface or audit trail. Do not derive the result solely from the presence of check_digit, and do not treat source: local as a decoded vehicle attribute.
Validation and decoding answer different questions. Vehicle API VIN decoding can return attributes such as year, make, model, trim, engine, transmission and assembly plant from NHTSA vPIC. Decoding works worldwide but is fullest for US-market vehicles; a successful check-digit result does not guarantee that every decoded attribute will be available.
Handle null fields explicitly when using decoded data. A null attribute means the response does not provide a value for that field; it is not a zero, an empty specification or a negative validation result. Show it as unavailable or leave it unset, and avoid making decisions that require the missing attribute until you have another suitable source.
For repeated work on the same VIN, cache decoded VIN data according to your application’s freshness needs. Keep that cache separate from the check-digit result: decoding supplies vehicle attributes, while this endpoint validates format and the check digit. Validation is computed locally, but your application should still account for its requests when managing API usage.
Other Vehicle API data has different coverage. Recalls, owner complaints and NCAP crash ratings cover US-market vehicles only and are matched by make, model and year; they are not a check of the individual vehicle’s history. Dutch plate data comes from RDW open data and never includes a VIN, so a plate result cannot supply the VIN for this validation request.
For an agent integration, Vehicle API also provides an MCP server. The same distinction applies: use a check-digit result as validation, not as evidence of vehicle ownership or history.
Handle errors and usage limits
When Vehicle API returns an error, the envelope has status set to error and includes error.code and error.message. Capture the code for application handling and use the message for diagnosis. Check the current Documentation for the applicable error codes rather than assuming every failure means the VIN is invalid.
Also handle network failures, timeouts and responses that cannot be parsed as JSON. These are operational failures, not validation outcomes. If you retry, do so deliberately: repeated attempts still create traffic and may affect your available usage.
Plan for both rate limits and a monthly quota. A rate limit controls request frequency, while a monthly quota concerns usage over the billing period; handle either kind of limit without converting it into a vehicle-data result. Check your plan and current documentation for the applicable limits, and monitor usage before deploying batch validation.
FAQ
Does a valid check digit prove the vehicle is genuine?
No. It indicates the result of the format and ISO 3779 check-digit validation, not whether the VIN was issued or belongs to the vehicle being offered.
Is the check digit a number?
In the JSON response, check_digit is a string. The official control VIN returns "3"; preserve the field as a character value rather than treating it as a measurement.
Does validation call NHTSA?
No. The endpoint computes format and check-digit validation locally, and the example reports source: local. VIN decoding is a separate operation that draws on NHTSA vPIC.
Can I validate a VIN from a Dutch plate result?
Dutch plate data never includes a VIN. Obtain the VIN separately before submitting it to the validation endpoint.
Register to start the 7-day free trial and test the endpoint with your own key. Every plan includes the trial; Starter is $19 per month.
