API access uses API Consumers and JWT bearer tokens. Create credentials in your dashboard, keep Client Secrets on your server, and request an audience-specific token before calling this API. See the API access and authentication guidance.
The VINfix API generates one or more suggestions when a problematic VIN is submitted. It is up to the end users to make the final decision on which suggestion to use, or to choose not to use any of the suggestions. Therefore, batch processing without human oversight is not recommended.
Avoid Submitting the Same VIN Multiple Times
Our system deducts one credit from your account balance for each XML result returned, regardless of the outcome. To prevent unnecessary charges, ensure your system has a mechanism to avoid sending the same VIN to the API service more than once.
REST API Description
VINfix API provides programmatic access to two of our state-of-the-art machine learning algorithms.
| Parameter Name | Parameter | Value | Used in Request |
| JWT Bearer Token | Authorization header | Bearer <jwt-token> | Authorization: Bearer <jwt-token> |
| Vehicle Identification Number | VIN | XXXXXXXXXXXXXXXXX | GET https://www.recognition.ws/vinfix/v3?VIN=XXXXXXXXXXXXXXXXX |
| Data Format | format | XML or JSON (default: XML) | GET https://www.recognition.ws/vinfix/v3?VIN=XXXXXXXXXXXXXXXXX&format=JSON |
POST https://identity.vinquery.com/connect/token using an API Consumer with audience vinquery:api:vinfix.Output in XML or JSON
VINfix API 1.0 has now been deprecated. It produces suggestions made by two machine learning algorithms: Algorithm 1 and Algorithm 2.
- Algorithm 1 and Algorithm 2 don't always agree with each other;
- Algorithm 1 usually produces more accurate suggestions than Algorithm 2 does;
- Algorithm 1 always produces at least one suggestion;
- Algorithm 1 usually produces only one suggestion;
- Algorithm 2 often produces more than one suggestions;
- Algorithm 2 could produce no suggestions at all.
- It is recommended that the suggestions from Algorithm 2 should be hidden from end-users by default unless the suggestions from Algorithm 1 were not satifactory and a second opinion was needed.
<VINfix Date="4/22/2015" Version="1.0" Status="SUCCESS" Number="XXXXXXXXXXX123456>
<Algorithm1>
<Item Value="XXXXXXXXXXX123456" Key="Suggestion1"/>
<Item Value="..." Key="..."/>
<Item Value="XXXXXXXXXXX123456" Key="SuggestionM"/>
</Algorithm1>
<Algorithm2>
<Item Value="XXXXXXXXXXX123456" Key="Suggestion1"/>
<Item Value="..." Key="..."/>
<Item Value="XXXXXXXXXXX123456" Key="SuggestionN"/>
</Algorithm2>
</VINfix>
VINfix API 3.0 produces one high-confidence correction result and accepts JWT bearer authentication. It can deliver results in either format: XML or JSON.
API with XML return: GET https://www.recognition.ws/vinfix/v3?VIN=XXXXXXXXXXX123456&format=XML
Authorization: Bearer <jwt-token>
<VINfix>
<Version>3.0</Version>
<Date>3/30/2021 2:03:34 AM</Date>
<Status>SUCCESS</Status>
<Input>XXXXXXXXXXX123456</Input>
<Output>XXXXXXXXXXX123456</Output>
</VINfix>
API with JSON return: GET https://www.recognition.ws/vinfix/v3?VIN=XXXXXXXXXXX123456&format=JSON
Authorization: Bearer <jwt-token>
{
"service": "vinfix",
"version": "3.0",
"date": "3/30/2021 3:36:54 AM",
"status": "SUCCESS",
"input": "XXXXXXXXXXX123456",
"ouput": "XXXXXXXXXXX123456"
}
Error Codes
| Error Code (Key) | Description (Value) |
| 0 | Database Errors. |
| 17 | Insufficient balance for VINfix |
| 18 | Length of VIN too short for VINfix; It must be at least 10 digits. |
| 19 | Invalid VIN number: The last 4 digits of this VIN number must all be numeric. |
| 20 | Invalid VIN number: The last 6 digits of this VIN number must all be numeric. |
| 21 | Invalid VIN number: The 12th digit of this VIN number must be a letter. |
| 22 | Invalid VIN number: The 13th digit of this VIN number must be a letter. |
| 28 | VINfix data model not ready. |
A sample error message returned in XML format:
<VINfix>
<Version>3.0</Version>
<Date>3/30/2021 2:21:09 AM</Date>
<Status>FAILED</Status>
<Input>1F4W3MCB0VA807600</Input>
<Message_Key>0</Message_Key>
<Message>Database Errors.</Message>
</VINfix>
A sample error message returned in JSON format:
{
"service": "vinfix",
"version": "3.0",
"date": "3/30/2021 5:38:03 AM",
"status": "FAILED",
"input": "1F4W3MCB0VA807600",
"message_key": 0,
"message": "Database Errors."
}
VINfix XML Samples
VINfix JSON Samples
Coding Examples (JWT Authentication)
VINfix uses the same JWT-enabled ecosystem flow. Request a token with the VINfix audience and call the VINfix API with the bearer token. Keep API Consumer credentials on your server.
# Request a JWT access token.
TOKEN=$(curl -s -X POST "https://identity.vinquery.com/connect/token" \
-H "Content-Type: application/json" \
-d '{"clientId":"YOUR_CLIENT_ID","clientSecret":"YOUR_CLIENT_SECRET","audience":"vinquery:api:vinfix"}' \
| jq -r '.jwtToken')
# Call the API with the bearer token.
curl -X GET "https://www.recognition.ws/vinfix/v3?VIN=1F4W3MCB0VA807600&format=JSON" \
-H "Authorization: Bearer $TOKEN"
// JavaScript / Node.js server-side example.
const tokenResponse = await fetch("https://identity.vinquery.com/connect/token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
audience: "vinquery:api:vinfix"
})
});
const { jwtToken } = await tokenResponse.json();
const apiResponse = await fetch(
"https://www.recognition.ws/vinfix/v3?VIN=1F4W3MCB0VA807600&format=JSON",
{ headers: { Authorization: `Bearer ${jwtToken}` } }
);
console.log(await apiResponse.json());
import requests
token_response = requests.post(
"https://identity.vinquery.com/connect/token",
json={
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"audience": "vinquery:api:vinfix",
},
)
token_response.raise_for_status()
jwt_token = token_response.json()["jwtToken"]
response = requests.get(
"https://www.recognition.ws/vinfix/v3",
params={"VIN": "1F4W3MCB0VA807600", "format": "JSON"},
headers={"Authorization": f"Bearer {jwt_token}"},
)
response.raise_for_status()
print(response.json())
<?php
$tokenRequest = json_encode([
'clientId' => 'YOUR_CLIENT_ID',
'clientSecret' => 'YOUR_CLIENT_SECRET',
'audience' => 'vinquery:api:vinfix'
]);
$tokenCurl = curl_init('https://identity.vinquery.com/connect/token');
curl_setopt_array($tokenCurl, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => $tokenRequest
]);
$tokenResult = json_decode(curl_exec($tokenCurl), true);
curl_close($tokenCurl);
$apiCurl = curl_init('https://www.recognition.ws/vinfix/v3?VIN=1F4W3MCB0VA807600&format=JSON');
curl_setopt_array($apiCurl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $tokenResult['jwtToken']]
]);
$response = curl_exec($apiCurl);
curl_close($apiCurl);
echo $response;
?>
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
String tokenBody = "{\"clientId\":\"YOUR_CLIENT_ID\",\"clientSecret\":\"YOUR_CLIENT_SECRET\",\"audience\":\"vinquery:api:vinfix\"}";
HttpRequest tokenRequest = HttpRequest.newBuilder()
.uri(URI.create("https://identity.vinquery.com/connect/token"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(tokenBody))
.build();
String tokenJson = client.send(tokenRequest, HttpResponse.BodyHandlers.ofString()).body();
String jwtToken = tokenJson.replaceAll(".*\\\"jwtToken\\\"\\s*:\\s*\\\"([^\\\"]+)\\\".*", "$1");
HttpRequest apiRequest = HttpRequest.newBuilder()
.uri(URI.create("https://www.recognition.ws/vinfix/v3?VIN=1F4W3MCB0VA807600&format=JSON"))
.header("Authorization", "Bearer " + jwtToken)
.GET()
.build();
String response = client.send(apiRequest, HttpResponse.BodyHandlers.ofString()).body();
System.out.println(response);
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
tokenPayload := []byte(`{"clientId":"YOUR_CLIENT_ID","clientSecret":"YOUR_CLIENT_SECRET","audience":"vinquery:api:vinfix"}`)
tokenResp, err := http.Post("https://identity.vinquery.com/connect/token", "application/json", bytes.NewReader(tokenPayload))
if err != nil {
panic(err)
}
defer tokenResp.Body.Close()
var tokenResult struct {
JwtToken string `json:"jwtToken"`
}
if err := json.NewDecoder(tokenResp.Body).Decode(&tokenResult); err != nil {
panic(err)
}
req, err := http.NewRequest("GET", "https://www.recognition.ws/vinfix/v3?VIN=1F4W3MCB0VA807600&format=JSON", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+tokenResult.JwtToken)
apiResp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer apiResp.Body.Close()
body, _ := io.ReadAll(apiResp.Body)
fmt.Println(string(body))
}
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using var http = new HttpClient();
var tokenPayload = "{\"clientId\":\"YOUR_CLIENT_ID\",\"clientSecret\":\"YOUR_CLIENT_SECRET\",\"audience\":\"vinquery:api:vinfix\"}";
var tokenResponse = await http.PostAsync(
"https://identity.vinquery.com/connect/token",
new StringContent(tokenPayload, Encoding.UTF8, "application/json"));
tokenResponse.EnsureSuccessStatusCode();
using var tokenJson = JsonDocument.Parse(await tokenResponse.Content.ReadAsStringAsync());
var jwtToken = tokenJson.RootElement.GetProperty("jwtToken").GetString();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://www.recognition.ws/vinfix/v3?VIN=1F4W3MCB0VA807600&format=JSON");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", jwtToken);
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
