API v2 Documentation

With this API you can integrate the B&C Consulting tuning data such as stages, power & torque (original & modified), prices, etc, on your website or application. We provide a restful API, which basically means you send the proper HTTP verb to the URIs in our documentation below and you’ll receive a JSON response containing the data you need.

Notice: We do not provide technical assistance on how to implement the API in your website or application. The API documentation should be straightforward and easy to use for any experienced programmer who has worked with restful API’s before.

API Base URL

All api endpoints must be prefixed with the api base url.

https://tuning-api.bcconsulting.lu/api/*

IP Address Restrictions

Your server’s public IP must be set, meaning the server from where you’ll make the API calls from. In case you have ordered the API subscription from the B&C Consulting website, you can set 3 IPs per API token in your profile

Security

All api endpoints are secured by https.

Authentication

  • This API uses an Api Bearer Token for authentication,

  • The Api Token MUST be provided in the Authorization header,

  • The Api Token MUST be provided for each request,

In case you have ordered the API subscription from the B&C Consulting website, you can find the API token in your profile.

Example Header

Authorization: Bearer Z8QimJKQpIgrqdCTUsFtgM8WRhID01BJriPhHzLKVuavZ279e21

Standard API calls

Vehicles Collection

List All Vehicles

This api call lists all vehicle types present in the tuning database.

GET /api/vehicles

Parameters

No paramters required

Response

application/json

[
    ...
    {
        "id": 1,
        "name": "Cars"
    },
    ...
]

Vehicle

View a Vehicle

This api call shows the details of the vehicle type requested.

GET /api/vehicles/{vehicle_id}

Parameters

vehicle_id

ID of the Vehicle Type

Response

application/json

    {
        "id": 1,
        "name": "Cars"
    }

Brands Collection

List All Vehicle Brands

This api call lists all brands for the requested vehicle type.

GET /api/vehicles/{vehicle_id}/brands

Parameters

vehicle_id

ID of the Vehicle Type

Response

application/json

[
    ...
    {
        "id": 5,
        "name": "BMW"
    },
    ...
]

Vehicle Brand

View a Brand

This api call shows the details of the brand requested.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

Response

application/json

    {
        "id": 5,
        "name": "BMW"
    }

Models Collection

List All Vehicle Models

This api call lists all models for the requested brand.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

Response

application/json

[
    ...
    {
        "id": 5359,
        "name": "Serie 4"
    },
    ...
]

Vehicle Model

View a Model

This api call shows the details of the model requested.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

Response

application/json

    {
        "id": 5359,
        "name": "Serie 4"
    }

Modelyears Collection

List All Vehicle Modelyears

This api call lists all modelyears for the requested model.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/years

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

Response

application/json

[
    ...
    {
        "id": 8163,
        "name": "F32\/33 LCI",
        "long_name": "F32\/33 LCI - 05\/2016 -> ...",
        "start_year": 2016,
        "start_month": 5,
        "end_year": null,
        "end_month": null
    },
    ...
]

Vehicle Modelyear

View a Modelyear

This api call shows the details of the modelyear requested.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/years/{year_id}

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

year_id

ID of the Vehicle Modelyear

Response

application/json

    {
        "id": 8163,
        "name": "F32\/33 LCI",
        "long_name": "F32\/33 LCI - 05\/2016 -> ...",
        "start_year": 2016,
        "start_month": 5,
        "end_year": null,
        "end_month": null
    }

Powertrains Collection

List All Powertrains

This api call lists all powertrains for the requested modelyear.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/years/{year_id}/powertrains

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

year_id

ID of the Vehicle Modelyear

Response

application/json

[
    ...
    {
        "id": 8618,
        "name": null,
        "flag": null,
        "engine": {
            "id": 5567,
            "name": "114d",
            "code": "N47D16",
            "power": 95,
            "torque": 235,
            "fuel_type": "diesel"
        }
    },
    ...
]

Powertrain

View a Powertrain

This api call shows the details of the powertrain requested.

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/years/{year_id}/powertrains/{powertrain_id}

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

year_id

ID of the Vehicle Modelyear

powertrain_id

ID of the Powertrain

Response

application/json

    {
        "id": 7895,
        "name": null,
        "flag": null,
        "engine": {
            "id": 5130,
            "name": "114d - 04/15 > ...",
            "code": "B37",
            "power": 95,
            "torque": 220,
            "fuel_type": "diesel",
            "stages": [
                {
                    "id": 6912,
                    "name": "Stage 1",
                    "power": "150",
                    "torque": "330",
                    "price": 490
                }
            ]
        },
        "gearbox": null,
        "options": {
            "nl": [
                "Start-Stop Deactivation",
                "EGR OFF",
                "DPF OFF"
            ],
            "fr": [
                "Start-Stop Deactivation",
                "EGR OFF",
                "DPF OFF"
            ],
            "en": [
                "Start-Stop Deactivation",
                "EGR OFF",
                "DPF OFF"
            ],
            "de": [
                "Start-Stop Deactivation",
                "EGR OFF",
                "DPF OFF"
            ],
            "es": [
                "Desactivación del sistema \"Start-stop\"",
                "EGR OFF",
                "DPF OFF"
            ]
        }
    }

Premium API calls

View a Brand Logo

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/logo/{version}/{format}

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

version

Logo version ('dark' or 'light')

format

Logo format ('medium', 'small' or 'large')

Response

image/*

Model Miniature

View a Model Miniature

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/miniature

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

Response

image/*

Modelyear Miniature

View a Modelyear Miniature

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/years/{year_id}/miniature

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

year_id

ID of the Vehicle Modelyear

Response

image/*

Powertrain Miniature

View a Powertrain Miniature

GET /api/vehicles/{vehicle_id}/brands/{brand_id}/models/{model_id}/years/{year_id}/powertrains/{powertrain_id}/miniature

Parameters

vehicle_id

ID of the Vehicle Type

brand_id

ID of the Vehicle Brand

model_id

ID of the Vehicle Model

year_id

ID of the Vehicle Modelyear

powertrain_id

ID of the Powertrain

Response

image/*