定制 vindecodervehicle/php-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vindecodervehicle/php-sdk

最新稳定版本:v1.0.0

Composer 安装命令:

composer require vindecodervehicle/php-sdk

包简介

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

README 文档

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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固