Official PHP SDK for the VIN Decoder Vehicle API — decode VINs, browse catalogs, OEM parts, fluids and repair times.

Maintainers

Package info

github.com/JoxMarkes/vindecodervehicle-php-sdk

Documentation

pkg:composer/vindecodervehicle/php-sdk

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-10 09:06 UTC

This package is auto-updated.

Last update: 2026-06-10 10:36:44 UTC


README

CI Latest Version License: MIT PHP Version

Official PHP SDK for the VIN Decoder Vehicle API — decode VINs, browse vehicle catalogs, retrieve OEM parts, fluid capacities, repair times, and engine details.

Español: README en español

Features

  • Decode VIN (first match or all matches)
  • Get vehicle details by carId
  • Fluid capacities and OEM parts
  • Repair times (plan-dependent)
  • Browse brands, models, and variants
  • Engine details by VIN
  • Strongly typed PHP 8.1+ models
  • Full test coverage with PHPUnit

Requirements

  • PHP 8.1 or higher
  • ext-json
  • Guzzle 7.x

Installation

composer require vindecodervehicle/php-sdk

Get your API credentials at vindecodervehicle.com.

Quick Start

<?php

use VinDecoderVehicle\Sdk\VinDecoderClient;

$client = VinDecoderClient::create(
    user: 'YOUR_USER',
    apiKey: 'YOUR_API_KEY',
);

// Decode a VIN
$vehicle = $client->vin()->decode('WF0GXXGAJ69C71882');

echo $vehicle->getFullName(); // BMW 3 Coupe (E92) 316 i
echo $vehicle->make;        // BMW
echo $vehicle->year;        // 2007
echo $vehicle->carId;       // 55565

API Reference

VIN

// First matching vehicle
$vehicle = $client->vin()->decode('WF0GXXGAJ69C71882');

// All matching vehicles
$vehicles = $client->vin()->decodeAll('WF0GXXGAJ69C71882');

// Engine details
$engines = $client->vin()->getEngines('WF0GXXGAJ69C71882');

Vehicle by carId

$vehicle = $client->vehicle()->getById(55565);
$fluids  = $client->vehicle()->getFluidCapacities(55565);
$parts   = $client->vehicle()->getOemParts(55565);
$repairs = $client->vehicle()->getRepairTimes(55565); // plan-dependent

Catalog

$brands   = $client->catalog()->listBrands();
$models   = $client->catalog()->listModels('bmw');
$variants = $client->catalog()->listVariants('bmw', '3-series');

Environment Variables

For the included examples:

export VINDECODER_USER=your_user
export VINDECODER_KEY=your_api_key
php examples/decode-vin.php WF0GXXGAJ69C71882

Error Handling

use VinDecoderVehicle\Sdk\Exception\ApiException;
use VinDecoderVehicle\Sdk\Exception\AuthenticationException;
use VinDecoderVehicle\Sdk\Exception\InvalidArgumentException;

try {
    $vehicle = $client->vin()->decode('INVALID');
} catch (InvalidArgumentException $e) {
    // Invalid VIN format
} catch (AuthenticationException $e) {
    // Invalid user or API key
} catch (ApiException $e) {
    // API error (quota, plan limits, etc.)
    echo $e->getMessage();
    print_r($e->getResponseBody());
}

Available Models

Model Description
Vehicle Decoded vehicle data
Engine Engine details with attributes
FluidCapacity Oil, coolant, brake fluid, etc.
OemPartGroup OEM parts grouped by category
RepairTime Labor hours for repairs
Brand Vehicle brand
VehicleModel Model within a brand
Variant Model variant / trim

Examples

File Description
examples/decode-vin.php Basic VIN decode
examples/catalog-browse.php Browse brands, models, variants
examples/full-workflow.php Complete workflow

Development

git clone https://github.com/JoxMarkes/vindecodervehicle-php-sdk.git
cd vindecodervehicle-php-sdk
composer install
composer test

Official SDKs

Language Package Repository
PHP composer require vindecodervehicle/php-sdk vindecodervehicle-php-sdk
Python pip install vindecodervehicle-sdk vindecodervehicle-python-sdk
Node.js npm install @vindecodervehicle/sdk vindecodervehicle-node-sdk
JavaScript npm install @vindecodervehicle/browser vindecodervehicle-js-sdk

Links

License

This project is licensed under the MIT License.