- Get an API key. Ask us to add your company as a partner. We will generate a sandbox key first and a live key when you are ready. A key is shown only once, so store it safely.
- Make your first call. Put your key in an environment variable called
VINHISTORY_KEY, which every example in these docs reads, then list the brands:
curl https://www.vinservicehistory.com/api/v1/brands \
-H "Authorization: Bearer $VINHISTORY_KEY" \
-H "Accept: application/json"
$client = new GuzzleHttp\Client([
'base_uri' => 'https://www.vinservicehistory.com/api/v1/',
'headers' => [
'Authorization' => 'Bearer '.getenv('VINHISTORY_KEY'),
'Accept' => 'application/json',
],
]);
echo $client->get('brands')->getBody();
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://www.vinservicehistory.com/api/v1/brands"))
.header("Authorization", "Bearer " + System.getenv("VINHISTORY_KEY"))
.header("Accept", "application/json")
.build();
System.out.println(client.send(request, HttpResponse.BodyHandlers.ofString()).body());
import os
import requests
response = requests.get(
"https://www.vinservicehistory.com/api/v1/brands",
headers={
"Authorization": f"Bearer {os.environ['VINHISTORY_KEY']}",
"Accept": "application/json",
},
)
print(response.json())
- Build against the sandbox. Order a few test reports and handle every outcome (see Sandbox).
- Go live. Swap in your live key and use real brand slugs (see Going live checklist).
Tip: Always send
Accept: application/json. Without it, errors may come back as web pages instead of JSON.