Legacy v1
Migrate VIN decoding to v2
Last updated:
Move from /v1/vin to /v2/vin: the calls side by side, what each field became, and how billing changes.
v1 stops answering on December 31st 2027. This page shows how to move a VIN integration to v2 before then. Your API key stays the same.
What changes in one minute
- The address changes from
/v1/vinto/v2/vin. - The answer is flat.
make,modelandyearsit at the top level, not undercomponents.vehicle. - Every fact also comes as a stable ID under
refs, for examplemake:honda. Use these for joins, not the display names. - A VIN we cannot name returns
valid: falsewith a list ofreasons, not a free text error. A VIN that is not shaped like a VIN returns a 400 error. - v2 does not test the check digit. If you relied on
components.checkDigit, you now need your own check. - Billing moves from requests to credits. A batch is billed per decoded VIN.
The calls side by side
One VIN
# v1
curl "https://api.cardog.app/v1/vin/corgi/2HGFC1F95HH204816" \
-H "x-api-key: your-api-key"
# v2
curl "https://api.cardog.app/v2/vin/2HGFC1F95HH204816" \
-H "x-api-key: your-api-key"Many VINs
# v1
curl -X POST "https://api.cardog.app/v1/vin/batch" \
-H "x-api-key: your-api-key" \
-H "content-type: application/json" \
-d '{"vins": ["2HGFC1F95HH204816"]}'
# v2
curl -X POST "https://api.cardog.app/v2/vin/batch" \
-H "x-api-key: your-api-key" \
-H "content-type: application/json" \
-d '{"vins": ["2HGFC1F95HH204816"]}'Both take up to 1,000 VINs in one call.
Which v1 address maps to which v2 address
| v1 | v2 |
|---|---|
GET /v1/vin/{vin} | GET /v2/vin/{vin}. The variants list moves to /v2/specs, see below. |
GET /v1/vin/corgi/{vin} | GET /v2/vin/{vin} |
GET /v1/vin/corgi/v3/{vin} | GET /v2/vin/{vin} |
POST /v1/vin/batch | POST /v2/vin/batch |
POST /v1/vin/batch/corgi | POST /v2/vin/batch |
GET /v1/vin/nano/{vin} | GET /v2/vin/{vin}, then follow links.specsBuild |
POST /v1/vin/batch/nano | POST /v2/vin/batch, then follow links.specsBuild on each result |
POST /v1/vin/image | No v2 replacement yet. Keep using v1 for now. |
The answer, before and after
Both answers below are for the same 2017 Honda Civic, trimmed for length.
Before: v1
Example
5 keysThe pattern lists under vds and vis are emptied here to save space.
GET /v1/vin/{vin} wraps this same object as pass, next to a variants list.
After: v2
Example
18 keysRefs that are null for this car, most of attributes (59 entries in the full
answer) and most of links are left out here.
Where each v1 field went
| v1 field | v2 field | Note |
|---|---|---|
vin | vin | Same. |
valid | valid | When false, the vehicle fields are null and reasons says why. |
components.vehicle.make | make and refs.make | |
components.vehicle.model | model and refs.model | |
components.vehicle.year, components.modelYear.year | year and refs.modelYear | |
components.vehicle.trim | trim | |
components.vehicle.doors | doors | Was the text "4", now the number 4. |
components.vehicle.bodyStyle | refs.bodyStyle | |
components.vehicle.fuelType, components.engine.fuel | refs.fuelType | |
components.vehicle.gvwr | refs.gvwr | |
components.wmi.vehicleType | refs.vehicleType | |
components.wmi.country, components.plant.country | refs.country | |
components.vehicle.manufacturer, components.wmi.manufacturer | attributes.manufacturer.value | |
components.plant.city | attributes.plantCity.value | |
components.engine.model | attributes.engineModel.value | |
errors | reasons | Free text became fixed codes such as UNSEEN_BUILD. |
variants on GET /v1/vin/{vin} | links.specsBuild, links.specs | The catalogue rows moved out of the VIN answer. Follow the link to /v2/specs. |
New in v2
refs: a stable ID for each fact. A ref stays the same when a display name changes.nano: the build code. Vehicles that share it are the same build, so it works as a key for removing duplicates.squish: the configuration key. Market prices are quoted at this level.reasons: why a VIN could not be named. Null whenvalidis true.corgiBuild: which version of the decoder produced the answer.attributes: everything else the decoder found for this build, such as plant, engine and safety equipment. Its contents vary by vehicle, so read the keys you need and do not expect a fixed list.links: paths to the recalls, listings, specs, safety and parts answers for this vehicle.shippingWeight,grossWeight,numberOfWheels,numberOfAxles: at the top level when known.
Gone in v2
components.checkDigit. v2 does not test the check digit at all. A VIN with a wrong check digit still returns its build withvalid: true. If you used this field to catch typing mistakes, compute the check digit yourself before you call.components.vds.patternsandcomponents.vis.patterns, the position by position trace of the decode.components.wmi.code,components.wmi.regionandcomponents.plant.code. The WMI is the first three characters of the VIN and the plant code is character eleven.components.modelYear.sourceandcomponents.modelYear.confidence.metadata:processingTime,confidence,schemaVersion,matchedSchema,totalPatterns.
Batch answers
The wrapper around a batch changed too.
| v1 | v2 |
|---|---|
count | meta.requested |
successful | meta.decoded |
failed | meta.failed |
success, processingTime, avgTimePerVin | Gone. |
results[].result | results[].identity, the same object a single v2 call returns |
results[].ok: true with identity, or false with error |
Results come back in the order you sent the VINs. One bad VIN does not fail the batch. On v1, one VIN that was not 17 characters failed the whole call.
ok: true only means the VIN was shaped like a VIN. To know if it decoded, read identity.valid.
Billing
- v1 counts requests. One call is one request against your monthly limit, and a batch of 1,000 VINs is also one request.
- v2 counts credits. A VIN decode costs 2 credits. A batch costs 2 credits for each VIN that decodes, and VINs that do not decode cost nothing. A single call costs 2 credits whenever it returns an answer, including an answer with
valid: false. A 400 error costs nothing.
So a v1 batch of 1,000 VINs was one request, and the same batch on v2 costs up to 2,000 credits. Check your plan's credit allowance before moving batch work over.
Every v2 answer carries x-credits-rate and x-credits-remaining headers so you can track this. See Credits.
Checklist
- Change the address from
/v1/vinto/v2/vin. - Read
make,model,year,trimanddoorsfrom the top level. - Switch joins and comparisons to
refs. - Handle
valid: falseby readingreasons, and handle a 400invalid_vinerror for a VIN that is not 17 valid characters. - If you used
components.checkDigit, add your own check digit test. - For batches, check
results[].ok, then readresults[].identityand itsvalidfield. - If you used
variants, followlinks.specsBuildorlinks.specs. - Review your credit allowance for batch volume.
Back to all v1 to v2 guides.
Was this helpful?