ws-configurator-api-sdk-php

Wheel Configurator API is a part of Wheel Fitment API v2. The Wheel Configurator API is a tool that allows users to visualize wheel and tire upgrades on vehicles. It can be integrated into any website or application to enhance the customer shopping experience by allowing them to visualize their vehicle with different wheel options, which can lead to increased sales and customer satisfaction. NOTE: A Configurator Template is a vehicle-specific image prepared for custom rim installation via a URL or file upload. Demo, FAQs,

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v2
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/git_user_id/git_repo_id.git"
    }
  ],
  "require": {
    "git_user_id/git_repo_id": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$template = 56; // int | Numeric ID of the Configurator Template (e.g. `448`)

try {
    $result = $apiInstance->configuratorTemplate($template);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->configuratorTemplate: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$template = 56; // int | Numeric ID of the Configurator Template (e.g. `448`)

try {
    $result = $apiInstance->configuratorTemplateColors($template);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->configuratorTemplateColors: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$template = 56; // int | Numeric ID of the Configurator Template (e.g. `448`)
$url = "url_example"; // string | The rim image URL you want to fit to the specified Configurator Template.   Image requirements:  * the rim should be slightly turned to the side  * min width:250px, min height:250px  Image Example: [link](https://configurator.wheel-size.com/media/public/ENKEI-T6R-Gloss.png) (e.g. `https://configurator.wheel-size.com/media/public/ENKEI-T6R-Gloss.png`)
$file = "/path/to/file"; // \SplFileObject | The rim image you want to fit to the specified Configurator Template.  It can be in multipart HTML form content or raw binary format.
$color = "color_example"; // string | 6 Digit Hex RGB color.  For 'EVOX' type of Configurator Templates use one of OE colors from _**`GET /templates/{template}/colors/`**_For 'manual' type of Configurator Templates it can be any color. (e.g. `1e4b82`)
$brakes = 56; // int | The composite image can be returned without or with a brake disk, black (default) or red caliper color can be specified. Possible values: `0`, `1` and `2`.  Where `0`- no brakes, `1`- black caliper, `2`- red.  If not specified, black caliper color is used. (e.g. `2`)
$rba_level = 56; // int | Rim boundary smoothing level.  As parameter value is increased, the rim boundary blurring width is increased. The value must be odd. If omitted, level `17` is used. (e.g. `17`)

try {
    $apiInstance->configuratorTemplateRimFit($template, $url, $file, $color, $brakes, $rba_level);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->configuratorTemplateRimFit: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$make = "make_example"; // string | Slug of the **`Make`**. A car's **`Make`** is the brand of the vehicle. Use _**`GET /makes/`**_ to get a list of available *`slug`* values. (e.g. `bmw`)
$model = "model_example"; // string | Slug of the **`Model`**. The particular **`Model`** of the brand. Use _**`GET /models/`**_ to get a list of available *`slug`* values. (e.g. `x6`)
$generation = "generation_example"; // string | Slug of the vehicle generation. (e.g. `fd3ae75350`)
$year = "year_example"; // string | Year. Use _**`GET /years/`**_ to get the model years of a specific car make/model  (e.g. `2022`)
$body = "body_example"; // string | Body slug of the vehicle generation. Use _**`GET /generations/`**_ to get list of generations with bodies (e.g. `b7c386cf60`)
$ordering = "ordering_example"; // string | Comma-separated list without spaces. Supported field names: *`make`*, *`model`*
$limit = 50; // int | 
$offset = 0; // int | 

try {
    $result = $apiInstance->configuratorTemplates($make, $model, $generation, $year, $body, $ordering, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->configuratorTemplates: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$make = "make_example"; // string | Slug of the **`Make`**. A car's **`Make`** is the brand of the vehicle. Use _**`GET /makes/`**_ to get a list of available *`slug`* values. (e.g. `bmw`)
$model = "model_example"; // string | Slug of the **`Model`**. The particular **`Model`** of the brand. Use _**`GET /models/`**_ to get a list of available *`slug`* values. (e.g. `x6`)
$year = "year_example"; // string | Year. Use _**`GET /years/`**_ to get the model years of a specific car make/model  (e.g. `2022`)
$ordering = "ordering_example"; // string | Comma-separated list without spaces. Supported field names: *`start`*

try {
    $result = $apiInstance->generations($make, $model, $year, $ordering);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->generations: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$year = "year_example"; // string | Year. Use _**`GET /years/`**_ to get the model years of a specific car make/model  (e.g. `2022`)
$ordering = "slug"; // string | Comma-separated list without spaces. Supported field names: *`slug`*

try {
    $result = $apiInstance->makes($year, $ordering);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->makes: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$make = "make_example"; // string | Slug of the **`Make`**. A car's **`Make`** is the brand of the vehicle. Use _**`GET /makes/`**_ to get a list of available *`slug`* values. (e.g. `bmw`)
$year = "year_example"; // string | Year. Use _**`GET /years/`**_ to get the model years of a specific car make/model  (e.g. `2022`)
$ordering = "ordering_example"; // string | Comma-separated list without spaces. Supported field names: *`slug`*

try {
    $result = $apiInstance->models($make, $year, $ordering);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->models: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: user_key
$config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKey('user_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = WheelSizeApiClient\Configurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('user_key', 'Bearer');

$apiInstance = new WheelSizeApiClient\Configurator\Api\ConfiguratorApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$make = "make_example"; // string | Slug of the **`Make`**. A car's **`Make`** is the brand of the vehicle. Use _**`GET /makes/`**_ to get a list of available *`slug`* values. (e.g. `bmw`)
$model = "model_example"; // string | Slug of the **`Model`**. The particular **`Model`** of the brand. Use _**`GET /models/`**_ to get a list of available *`slug`* values. (e.g. `x6`)
$ordering = "ordering_example"; // string | Comma-separated list without spaces. Supported field names: *`slug`*
$limit = 100; // int | 
$offset = 0; // int | 

try {
    $result = $apiInstance->years($make, $model, $ordering, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfiguratorApi->years: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://api.wheel-size.com/v2/configurator

Class Method HTTP request Description
ConfiguratorApi configuratorTemplate GET /templates/{template}/ Get detailed info about selected Configurator Template ID
ConfiguratorApi configuratorTemplateColors GET /templates/{template}/colors/ Get A List of OE colors with names for a specific Configurator Template ID
ConfiguratorApi configuratorTemplateRimFit PUT /templates/{template}/fit/ Generate an image of the Configurator Template (vehicle) with the specified rim
ConfiguratorApi configuratorTemplates GET /templates/ Get A List of Configurator Templates
ConfiguratorApi generations GET /generations/ Get A List of Car Generations
ConfiguratorApi makes GET /makes/ Get A List of Makes
ConfiguratorApi models GET /models/ Get A List of Models via Different Filters
ConfiguratorApi years GET /years/ Get A List of Years
LatestTemplatesApi latestTemplatesList GET /latest-templates/

Documentation For Models

Documentation For Authorization

user_key

  • Type: API key
  • API key parameter name: user_key
  • Location: URL query string

Author

info@wheel-size.com