Vehicle identity

Decode a VIN

Last updated:

One VIN in, refs, grains, and links out, for any vehicle, including the Canadian VINs other decoders stop short on.

curl "https://api.cardog.app/v2/vin/2T3R1RFV7MW180266" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26"

One VIN in, one identity card out: display names to render, entity refs to store, the two VIN grains, and links to this vehicle's market instrument, recalls, and live listings. Two credits per VIN, batch or single.

This is a separate product from the free American decoder because of coverage. NHTSA's vPIC is built from US regulatory submissions, so a Canadian-market vehicle often decodes to a make and a model and then stops: no trim, sometimes no engine, sometimes nothing at all for a model line that never went on sale in the United States. We decode 99.77% of Canadian VINs to trim level. Every fact comes back keyed to a ref, so the decode output joins directly against specs, listings, market quotes, and recalls without a name-matching step.

The response:

Example

10 keys
"response": {
"vin": "2T3R1RFV7MW180266",
"valid": true,
"year": 2021,
"make": "Toyota",
"model": "RAV4",
"trim": "XLE HV",
"refs": {
"make": "make:toyota",
"model": "model:toyota/rav4",
"modelYear": "model-year:toyota/rav4/2021",
"bodyStyle": "body-style:sport-utility-vehicle-suv-multi-purpose-vehicle-mpv",
"fuelType": "fuel-type:gasoline",
"driveType": "drive-type:4wd-4-wheel-drive-4x4",
"transmission": null,
"electrificationLevel": null,
"vehicleType": null,
"country": null
},
"nano": "nano:2T3R1RFVMW",
"squish": "squish:2T3R1RFVM",
"links": {
"instrument": "/v2/vin/2T3R1RFV7MW180266/instrument",
"recalls": "/v2/vin/2T3R1RFV7MW180266/recalls",
"listings": "/v2/vin/2T3R1RFV7MW180266/listings"
}
}

Store the refs. The display names are for your UI. The refs are for your database. Write make:toyota into the column, not "Toyota". Every other endpoint takes the ref, and it will still mean Toyota in five years. null in any ref field means the fact is not derivable for this VIN.

What comes back

Exploded line drawing of a generic SUV: the body lifted above the engine, the transmission and the chassis with its axles and wheels.
  1. 1Bodyrefs.bodyStyle
  2. 2Enginerefs.fuelType; the full sheet at links.specs
  3. 3Transmissionrefs.transmission, null when not derivable
  4. 4Driverefs.driveType
  • valid is the decoder's verdict. false means no identity: every field below it is null and every ref is null. The API never fills an unresolved VIN from adjacent data.
  • year, make, model, trim are display names. Render these and join on the refs. trim is the catalogue trim this VIN's own pattern resolves to. A seller's listing text ships separately in observedTrim, tagged and dated.
  • refs are the join keys, one per domain. Every other endpoint takes them. They follow the ref grammar.
  • nano and squish are the two VIN grains, covered below.
  • links are server-relative paths to this VIN's related resources. Follow them instead of building URLs by hand.

The capture above is trimmed. The live card also carries provenance (authorityTier for the identity facts, trimAuthorityTier on the trim), and links grows as the decode resolves: per-ref entity links, plus specs, quote, and safety once the model year is known. The full spec sheet is one link away at links.specs. On the MCP surface, the identify_vehicle tool summarizes it into a specHighlights block. The complete response shape is in the VIN reference.

null means not derivable

A null in any identity field is a statement about the VIN, not a gap in our lookup. It means this VIN's pattern does not derive that fact. It is not a withheld fuzzy match, and it will not turn into a guess on retry. The refs also cohere as a set: a model ref only ships under the make ref beside it, and a pairing that cannot hold together goes null rather than travel as a plausible-looking join key. That is what makes a decode safe in a pipeline. Every non-null ref can be written straight into a column with no validation pass.

Batch

Same contract, up to 1,000 VINs per call:

curl -X POST "https://api.cardog.app/v2/vin/batch" \
  -H "x-api-key: $CARDOG_API_KEY" \
  -H "Cardog-Version: 2026-10-26" \
  -H "content-type: application/json" \
  -d '{"vins":["2T3R1RFV7MW180266","1HGCM82633A123456"]}'

The batch is accepted as a whole and each item resolves on its own. One malformed VIN fails its own row with the standard error envelope and never the batch. Results come back in request order, with a meta block counting requested, decoded, and failed. Metered per VIN: N VINs is N decode units.

The TypeScript SDK is the same surface, typed:

import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: process.env.CARDOG_API_KEY });
const identity = await client.v2.vin.getByVin("2T3R1RFV7MW180266");

// Store the refs, render the names.
await db.vehicles.update(id, {
  makeRef: identity.refs.make,          // "make:toyota"
  modelYearRef: identity.refs.modelYear, // "model-year:toyota/rav4/2021"
  squish: identity.squish,               // "squish:2T3R1RFVM"
});

Why Canadian VINs are hard

vPIC is the decoder everyone starts with, and inside its boundary it is good: free, public, and correct for US-market vehicles, because it is built from the submissions US regulation requires. The boundary is the border. A trim configuration sold only in Canada has no US submission behind it, so the pattern is absent and the decode returns a make, usually a model, and stops. A model line that never went on sale in the United States can return nothing at all.

We treat VIN patterns as a registry to maintain, Canadian-market patterns included. Decode coverage is 99.77% of Canadian VINs at trim level.

VIN structure is the same on both sides of the border. For WMI, check digits, and year codes, the arithmetic half of decoding, see VIN structure.

The grains: squish and nano

Two keys in the identity card are pure projections of the VIN itself:

  • squish is WMI + VDS + year, with the plant left out. It is the market grain: two VINs with the same squish are the same configuration, which is why a squish is a valid instrument for market quotes.
  • nano is the squish plus the plant code (VIN positions 1–8, 10 and 11), plus positions 12–14 when position 3 is 9, because for a small-volume manufacturer those complete the manufacturer identifier. It is the build grain, and the dedup and comparables key.

Because both are projections, you can derive them offline from any VIN with @cardog/entities, with no API calls and no network:

import { squishFromVin, nanoFromVin } from "@cardog/entities";

const vin = "2T3R1RFV7MW180266";

squishFromVin(vin); // "2T3R1RFVM"  : the market grain (WMI + VDS + year)
nanoFromVin(vin);   // "2T3R1RFV*MW": the build grain (+ plant, check digit masked)

The key you compute offline is the key the API returns. The identity card ships it in ref form (squish:2T3R1RFVM, nano:2T3R1RFVMW: the ref leaves out the masked check digit), from the same grammar. You can index a table on the squish grain before you ever call us.

From identity to everything else

The identity card is the entry point to the rest of the graph. Every card carries a links block that maps a relation name to a server-relative path, so related resources are one request away:

  • instrument: the market instrument this VIN trades as, and from it the live quote
  • recalls: Transport Canada and NHTSA campaigns for this VIN. See Recalls by VIN.
  • listings: live listings of this vehicle

Follow the links instead of building URLs by hand.

Errors

Every non-2xx response is one envelope. A malformed VIN:

Example

5 keys
"response": {
"code": "invalid_vin",
"message": "Not a valid VIN: 2T3R1RFV7MW18026",
"hint": "A VIN is 17 characters, A–Z (no I/O/Q) and 0–9. If the vehicle is real and we have it wrong, report it at POST /v2/feedback",
"docs_url": "https://cardog.app/docs/errors/invalid_vin.md",
"links": {
"feedback": "/v2/feedback"
}
}

code is a value you can dispatch on, hint says what to do next, and docs_url is fetchable markdown with the full correction recipe, so there is no HTML to parse. links.feedback is where to report a VIN we have wrong, which costs nothing. In a batch, the same envelope appears on the failing row's error field while the rest of the batch decodes. The complete code list is in Errors.