dealerkit-api
This library work with DealerKit API - https://dealerkit.co, (*1)
You can decode vehicle identification numbers, see usage statistics and getting basic billing information, (*2)
composer.phar require "dealerkit/decoder-api":"~1.0.0"
, (*3)
Basic usage
Before you start using API you need to register and go into your profile for getting api key. Next create basic object of DealerKitApi class, (*4)
$token = '{your-personal-token}';
$client = new DealerKitApi($token);
1. VIN lookup
Basic usage for decoding vin:, (*5)
$vin = '1N6AD07U46C418468';
$data = $client->getVinLookup($vin);
Success result:, (*6)
{
"success": true,
"query": "1N6AD07U46C418468",
"specification": {
"year": "2006",
"make": "Nissan",
"model": "Frontier",
"trim": "Nismo Crew Cab 2WD",
"made_in": "UNITED STATES",
"style": "CREW CAB PICKUP 4-DR",
"engine": "4.0L V6 DOHC 24V",
"transmission": "5-Speed Automatic",
"drive_type": "RWD",
"tank_size": "21.10",
"city_mileage": "16",
"highway_mileage": "20",
"anti_brake_system": "4-Wheel ABS",
"steering_type": "R&P",
"standard_seating": "5",
"optional_seating": "No data",
"length": "205.50",
"width": "72.80",
"height": "70.10"
}
}
2. Get usage statistics
$data = $client->getUsageStatistics();
Success result:, (*7)
{
"success": true,
"decoded_total": 3121,
"decoded_today": 127
}
$data = $client->getBillingInfo();
Success result:, (*8)
{
"success": true,
"billing_plan": {
"name": "Mega",
"price": 159.99,
"price_req": 0.01,
"price_currency": "USD"
}
}
The popular errors:
Token incorrect. Please, that the token is correct and transmitted correctly., (*9)
{
"success": false,
"message": "Your request was made with invalid credentials.",
"code": 401
}
You do not subscribed to billing plan. Please go to billing page and choose plan., (*10)
{
"success": false,
"message": "Billing plan not choosed",
"code": 1
}
We can not write off the money from the card for this temporarily blocked your account, top up the balance or contact the administration., (*11)
{
"success": false,
"message": "Billing plan is inactive",
"code": 2
}