VIN
Overview
The parser supports all standards of the Vehicle Identification Number (VIN).
Standards differ a little bit from each other. North America standard (used in the USA) is more strict than ISO 3779 standard and the standard used in the European Union. European Union standard doesn’t have to contain information about model year, plant or check digit.
VIN numbers encoded in barcodes
VIN numbers encoded in barcodes (Code39) sometimes contain more than 17 characters. These codes can also be parsed and are handled the following way: For 18 characters the first character is stripped. For 19 characters the first and the last character are stripped. For 20 characters first two and the last character are stripped.
Example
Parsing the following code (without quotes):
"5UXFG2C50DL782277"
will result in the following JSON output:
[
{
"name": "WMI",
"parsed": {
"region": "USA",
"fullCode": "5UX"
"numberOfVehicles": ">2000",
},
"rawString": "5UX"
},
{
"name": "VDS",
"parsed": "FG2C5",
"rawString": "FG2C5"
},
{
"name": "VIS",
"parsed": {
"modelYear" : [1983, 2013],
"plant" : "L",
"wmiSuffix" : null,
"serialNumber" : "782277"
},
"rawString": "DL782277"
},
{
"name" : "metadata",
"parsed" : {
"checksum" : "0",
"passedChecksum": true,
"standard": "northAmerica"
},
"rawString" : ""
}
]
Fields
The following fields are exposed for VIN code:
Data Element ID |
Meaning |
Parsed Content |
---|---|---|
WMI |
World Manufacturer Identifier |
Dictionary with these key/value pairs:
|
VDS |
Vehicle Descriptor Section |
String with vehicle data (contained information depends on manufacturer) |
VIS |
Vehicle Identification Section |
Dictionary with these key/value pairs:
|
Metadata
The metadata field provides more information about the parsing of the input’s fields. The dictionary encoded in the JSON string of the ‘parsed’ field contains the following entries:
Key |
Value Type |
Description |
---|---|---|
checksum |
string |
check digit value |
passedChecksum |
boolean |
true if checksum validation was successful |
standard |
string |
One of the following strings:
|
Parser Options
The parser can be configured by providing a JSON string containing key / value pairs. Currently there is only one option available:
Key |
Value Type |
Description |
---|---|---|
strictMode |
boolean |
Enabling this option allows the parser to fail for invalid checksums. Checksum verification results for the code are indicated using the ‘metadata’ field (with disabled strictMode). |
falsePositiveCompensation |
boolean |
Enabling this option allow the parser to replace certain illegal characters with their non-illegal counterparts (I->1, Q->9, O->0). |