What the VIN covers and doesn't
The VIN identifies the vehicle, not its parts. Decoding it gives you make, model, year, trim, engine configuration, assembly plant, model year and factory options affecting the chassis (4x4 vs 4x2, manual vs automatic). That's what the NHTSA API or any commercial API delivers.
What the VIN does NOT tell you: which specific part number you need to replace the front brake pad on THAT vehicle, given that the 2021 model had two different brake suppliers during the model year (Akebono until January, NBK from February). That information lives in the manufacturer's EPC (Electronic Parts Catalog), queried with already-decoded VIN data plus additional rules.
VIN→OEM matching logic, step by step
VIN-to-OEM matching is not a trivial SQL join. It's a cascade applying filters from most specific to most general, where the first match with stock wins. The typical cascade we run in production has 5 levels.
- Level 1 (exact match): (Make + Model + Year + Trim + Engine Code + Production Date Range) → 1 OEM number. Ideal, but requires production date that NHTSA does NOT return.
- Level 2 (trim match): (Make + Model + Year + Trim + Engine Config) → 1-2 OEM numbers. Covers 70% of cases with NHTSA alone.
- Level 3 (engine match): (Make + Model + Year + Engine Config) → 2-4 OEM numbers. For vehicles where trim wasn't decoded.
- Level 4 (model + year): (Make + Model + Year) → 4-8 OEM candidates. Show to user for confirmation.
- Level 5 (fuzzy): (Make + Model + Year ±1) → candidate list tagged 'verify'. Last resort before returning 'not found'.
How matching varies by brand
Every manufacturer has its own parts identification system and its own quirks. Toyota uses Frame Code (an alphanumeric identifying platform + region) combined with Engine Code; without both, match accuracy falls to 60%. GM uses GM Part Number directly with good standardization, but splits models by plant (a Flint-built Silverado vs a Fort Wayne one uses different pads).
BMW and Mercedes are the most complex: they depend on the Bauplan / SA-Code, a list of factory options NHTSA doesn't return. For these, you need the Realoem API (BMW) or Mercedes EPC via authorized dealer. Honda and Hyundai are the friendliest: VIN + year + model + engine config usually suffices.
This per-brand variation is one of the main reasons a well-trained AI agent outperforms a generic finder: it learns what to ask based on the decoded brand and doesn't force the same flow on everything.
SSPL supersessions: the detail that kills quotes
An SSPL supersession (Supersession Service Parts List) is when the manufacturer replaces an OEM number with another, usually because they redesigned the part or changed supplier. The old part becomes obsolete; ordering it returns 'not available' even if your internal catalog still lists it.
The quoting problem: your seller quotes the old number (it shows up first in the catalog), the customer accepts, you go to the supplier and find it superseded. Reopening the quote with the customer at the new price (sometimes 15-30% higher) destroys conversion.
The right solution is to apply the supersession table at the end of matching, before returning the number to the user. The official EPC carries supersessions in real time; aggregators lag 1-3 months. If you use aggregators, maintain your own supersession table for critical parts on your top models.
Catalog sources: official EPC vs aggregators
There are two catalog universes: official EPC (manufacturer's Electronic Parts Catalog) and aggregators (RockAuto, PartsAuthority, CarParts, Mecaweb in LatAm). Official EPC is canonical: real-time supersessions, OEM equivalences, exact fitment. Downside: requires authorized dealer contract or licensed reseller, and many only expose web UIs with no API.
Aggregators offer reasonable REST APIs (RockAuto Affiliate API, PartsAuthority, etc.) and broad coverage, but they lag on supersessions and sometimes have wrong fitment. For official dealers: official EPC is non-negotiable. For independent parts stores and marketplaces: aggregator + your own corrections table works well.
- Official EPC: Toyota TIS, GM GMNA Parts, Ford Motorcraft, Honda PartsLink, BMW Realoem, Mercedes WIS/ASRA.
- US aggregators: RockAuto Affiliate, PartsAuthority, CARID, CarParts.com.
- LatAm aggregators: Mecaweb (MX), AutoZone API (regional), Mercado Libre Motors.
- Hybrid: aggregator as base + official EPC on-demand for critical parts or large quotes.
Production architecture for VIN→OEM
Recommended architecture is a serverless pipeline with two services: vin-decode (covered in the NHTSA tutorial) and parts-match. The latter takes the decoded profile + a part category (brake_pad_front, oil_filter, spark_plug, etc.), applies the matching cascade against your catalog and returns a priority list with OEM numbers, prices and stock.
Cache is critical here but different from the VIN one. Cache key is (vin, part_category) with 7-day TTL, not infinite: stock and price change. For common vehicles (Hilux, Civic, Corolla) and common categories (brakes, oil, filters), cache hit rate exceeds 60%.
- Endpoint: GET /parts/match?vin={VIN}&category={cat} → prioritized OEM + stock + price list.
- Cache key: hash(vin + category), 7-day TTL.
- Background job: revalidate cache when a supplier pushes stock updates.
- Telemetry: log mismatches (category with no match) to improve the catalog.
Real case: Honda Civic 2021 brake pad
Customer sends VIN 1HGBH41JXMN109186 to the agent on WhatsApp and says 'I need front pad'. Step 1: vin-decode returns Honda Civic 2021 EX-L, 2.0L engine, Greensburg assembly. Step 2: parts-match queries Honda PartsLink with (Make=Honda, Model=Civic, Year=2021, Trim=EX-L, Engine=2.0L, Position=front) and gets OEM 45022-TBA-A02 (Akebono ProACT).
Step 3: apply supersession. 45022-TBA-A02 is still current, no super. Step 4: query internal and authorized-supplier stock. 14 units in local stock, USD 89.40 installed. Step 5: return to customer with appointment proposal. The whole flow, no human in the loop, in 1 minute 58 seconds. Observed conversion rate on this flow: 41%, vs 18% on the previous manual flow.