How Vehicle Registration and VIN Lookups Work
Source: `vehicles_controller.rb`
- DVLA lookup requires either a plate number or VIN to perform the search
- Bulk registration lookup only processes vehicles that have been active in the last 2 years and don't already have an existing lookup result; older vehicles are silently skipped without any notification
- CarJam raises a specific
InsufficientQuantityerror when the account doesn't have enough lookup credits remaining - Checka requires a plate number (does not support VIN lookup); Carfax requires a VIN (does not support plate lookup) -- they are complementary, not interchangeable
- Plate and VIN uniqueness validation is case-insensitive, so "ABC123" and "abc123" are treated as the same plate
- MOT history displays a "perform update" prompt if no existing history is found for the vehicle
Support scenarios
- "Bulk registration lookup missed some vehicles" → Bulk lookup only processes vehicles from the last 2 years that don't already have a lookup. Older vehicles are silently skipped. Run individual lookups for specific older vehicles if needed.
- "CarJam lookup says insufficient quantity" → The company's CarJam account has run out of lookup credits. Additional credits need to be purchased from CarJam before lookups can continue.
- "Checka won't accept a VIN" → Checka only supports plate number lookups. For VIN-based lookups, use Carfax instead. These are different services with different input requirements.
- "I entered a plate number but it says it already exists" → Plate uniqueness is case-insensitive. Another vehicle already has this plate number (possibly in different casing). Search for the plate to find the existing record.