Migration
How to migrate from NHTSA vPIC to Cardog
Last updated:
Move a vPIC DecodeVinValues call to Cardog by changing the URL: add ?profile=vpic and an API key, and keep the response shape your code already reads.
Moving a vPIC DecodeVinValues call to Cardog is a URL change and an API key. Add ?profile=vpic to GET /v2/vin/{vin} and the answer comes back in vPIC's own DecodeVinValues envelope, so the code that reads Results[0].Make keeps working. What you gain: Canadian VINs decoded to trim, batches of 1,000 instead of 50, and one key for Cardog's specs, Transport Canada and NHTSA recalls and Canadian market prices when you want the next answer.
This guide is written by Cardog. Every claim about vPIC links to NHTSA's own public page, and we checked those pages on 2026-10-26. vPIC is NHTSA's public decoder; Cardog runs its own decoder and, with ?profile=vpic, answers in vPIC's response shape.
The short version
- Get a Cardog API key and send it as the
x-api-keyheader (orAuthorization: Bearer crdg_…), and pinCardog-Version: 2026-10-26. Unauthenticated calls to/v2get a 401. - Replace
https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/{vin}?format=jsonwithhttps://api.cardog.app/v2/vin/{vin}?profile=vpic.format=jsonandmodelyearare accepted, so you can leave them on. - For batches, replace
DecodeVINValuesBatchwithPOST https://api.cardog.app/v2/vin/batch?profile=vpic. It accepts vPIC's own form body,data=VIN1;VIN2, and up to 1,000 VINs a request. - Keep your parsing. The body is vPIC's
DecodeVinValuesenvelope (Count,Message,SearchCriteria,Results), pinned to vPIC 4.10.
# before
curl "https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/2T3R1RFV7MW180266?format=json"
# after
curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266?profile=vpic" \
-H "x-api-key: $CARDOG_API_KEY" \
-H "Cardog-Version: 2026-10-26"
# batch, vPIC's own form body
curl -X POST "https://api.cardog.app/v2/vin/batch?profile=vpic" \
-H "x-api-key: $CARDOG_API_KEY" \
-H "Cardog-Version: 2026-10-26" \
--data "data=2T3R1RFV7MW180266;5YJ3E1EA7KF317000"What comes back
vPIC's flat decode returns Count, Message, SearchCriteria and a Results array holding one object per VIN, with every value a string (NHTSA, sample response). With ?profile=vpic, Cardog returns that envelope with the 154 result keys of vPIC 4.10, in vPIC's key order.
- Every value is a string.
""means no value, as it does on vPIC. - Values read as vPIC prints them.
MakereadsTOYOTA,BodyClassreads vPIC's body class text, and a key that does not apply to a vehicle type prints vPIC's own "Not Applicable" value for that type. - The batch envelope is
DecodeVINValuesBatch's: one row per VIN, in request order, withSearchCriteriaempty as vPIC sends it.
ErrorCode
ErrorCode | When |
|---|---|
0 | Cardog names the build and the check digit computes. |
1 | The check digit does not compute. Cardog still decodes the build and fills the row. |
8 | Cardog cannot name the build. AdditionalErrorText carries Cardog's reason codes, such as UNSEEN_BUILD. |
6 or 400 | The input is not a VIN (wrong length or characters outside the VIN set), answered with a row as vPIC answers it. |
Cardog never returns 7. ErrorText holds vPIC's own wording for each code.
The response headers
The body is vPIC's, so Cardog's notes on the answer ride in four headers:
| Header | What it says |
|---|---|
Cardog-Profile | vpic@4.10: the profile and the vPIC release the shape is pinned to. |
Cardog-Profile-Keys-Sha256 | The sha256 of the pinned 154-key list, so you can assert the shape you built against. |
Cardog-Profile-Gaps | The number of pinned keys this release never fills. |
Cardog-Profile-Empty | The number of fillable keys that are empty in this response (summed over rows on a batch). |
Log Cardog-Profile and Cardog-Profile-Keys-Sha256 with each call and your integration can tell if the shape ever moves.
Verify before you switch
Pick 20 to 50 VINs you already decode with vPIC, including a few recent model years, a truck, a trailer and one you know is bad. Call both and compare the keys your product reads:
const vpic = await fetch(
`https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/${vin}?format=json`
).then((r) => r.json());
const ours = await fetch(`https://api.cardog.app/v2/vin/${vin}?profile=vpic`, {
headers: { "x-api-key": process.env.CARDOG_API_KEY!, "Cardog-Version": "2026-10-26" },
}).then((r) => r.json());
for (const key of ["ModelYear", "Make", "Model", "Trim", "BodyClass", "DisplacementL", "ErrorCode"]) {
const a = vpic.Results[0][key] ?? "";
const b = ours.Results[0][key] ?? "";
if (a !== b) console.log(vin, key, { vpic: a, cardog: b });
}Some numbers differ only in format (3.0 against 3), so compare numbers as numbers.
If you would rather have Cardog's native identity card, with refs that join to specs, recalls and market data, drop ?profile=vpic and read GET /v2/vin/{vin} as documented in the API docs.
What Cardog adds
- Canadian VINs to trim. We decode 99.77% of Canadian VINs to trim level (Decode a Canadian VIN).
- Builds from every market. Our own VIN patterns name builds such as Tesla China and Berlin builds, BYD and NIO.
- Refs that join. Without the profile, the same decode returns
refs,nanoandsquish, which tie a VIN to model-year specs, safety, market quotes and listings. - Canadian recalls on the same VIN.
GET /v2/vin/{vin}/recallsreturns campaigns with anauthorityof"tc"(Transport Canada) or"nhtsa". - One key for every product. The key you send for the decode also reads specs, recalls, window stickers, listings and market prices.
- Bigger batches.
POST /v2/vin/batchtakes up to 1,000 VINs, and a malformed VIN fails only its own row.
FAQ
Do I have to change my parsing code?
No. With ?profile=vpic the body is vPIC's DecodeVinValues envelope, pinned to vPIC 4.10, with every value a string and "" for no value.
Does Cardog check the check digit?
Yes. A VIN whose check digit does not compute comes back with ErrorCode 1, and Cardog still decodes the build.
What happens to a VIN Cardog cannot name?
The row comes back with ErrorCode 8 and Cardog's reason codes, such as UNSEEN_BUILD, in AdditionalErrorText.
Can I send vPIC's batch body as is?
Yes. POST /v2/vin/batch?profile=vpic takes vPIC's form body, data=VIN1;VIN2, as well as {"vins": [...]}, up to 1,000 VINs a request.
How is a decode billed?
The same as the call without the profile: two credits per VIN. A single GET /v2/vin/{vin}?profile=vpic bills two credits on any 200 answer, including ErrorCode 8. A batch bills two credits for each row Cardog names. An input that is not a VIN (ErrorCode 6 or 400) and a 400 cost nothing. See /pricing.
Related
- Cardog vs NHTSA vPIC
- NHTSA vPIC alternatives
- Best VIN decoder APIs (2026)
- API docs
- Other migration guides
- Pricing
Sources
Checked on 2026-10-26:
- NHTSA vPIC API: https://vpic.nhtsa.dot.gov/api/
- NHTSA vPIC sample flat decode (the example URL on that page): https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVinValues/5UXWX7C5*BA?format=json&modelyear=2011
If something here is wrong, tell us and we will fix it.
Was this helpful?