A single VIN field can contradict a seller's story. Two cheap checks catch many mistakes: WMI (positions 1-3) and plant code (position 11).
Why both
WMI points at the manufacturer universe. Plant code is manufacturer-specific. Together they answer "does this VIN belong to the brand and factory story on the listing?"
Pipeline
- Normalize and validate length/charset/check digit.
- Decode via NHTSA vPIC.
- Compare Make/Manufacturer against listing claim.
- Surface PlantCity/PlantState when present.
- Soft-flag mismatches; never auto-ban on sparse fields alone.
type Flag = { code: string; message: string }; function sanityFlags(decoded: { Make?: string; PlantCity?: string }, claimMake: string): Flag[] { const flags: Flag[] = []; if (decoded.Make && claimMake && !decoded.Make.toLowerCase().includes(claimMake.toLowerCase()) && !claimMake.toLowerCase().includes(decoded.Make.toLowerCase())) { flags.push({ code: "make_mismatch", message: "Listing make does not match NHTSA Make for this VIN." }); } if (!decoded.PlantCity) { flags.push({ code: "plant_blank", message: "NHTSA returned no plant city; do not invent one." }); } return flags; } Buyer copy
Show flags as questions ("Ask the seller why..."), not accusations. Pair with a reminder that free decode is not a title/lien/odometer report.
I maintain VIN Lookup, a free VIN decode based on NHTSA data.
