The Guide


A guided tour of OKAPI

The aim of this tutorial to provide an insight to the user about the various OKAPI endpoints and product data.

Catalog Endpoints

List all countries

A good place to begin is the /countries endpoint which lists all the countries for which OKAPI offers the possibilty of configuring an automobile.

GET
https://api.productdata.volkswagenag.com/v3/countries
Authorization Bearer {access_token}
Accept application/json

List all brands

The next step could be to see the Brands which are available for the country you would choose from the previous step.

GET
https://api.productdata.volkswagenag.com/v3/catalog/{country_code}/brands
Authorization Bearer {access_token}
Accept application/json

List all models for a brand

After choosing a brand, the next step would be choosing a model of the brand. All the models of the brand available in your chosen country can be seen using the following endpoint.

GET
https://api.productdata.volkswagenag.com/v3/catalog/{country_code}/brands/{brand_id}/models
Authorization Bearer {access_token}
Accept application/json

By brand and country

List the types of a model

Once the Model is chosen, the choices of the Automobile has been narrowed down. The next step would be to choose a type for the chosen Model.

GET
https://api.productdata.volkswagenag.com/v3/catalog/{country_code}/models/{model_id}/types
Authorization Bearer {access_token}
Accept application/json

By country and model

List the options of a type

The chosen type can then be customised with options available for the type. Some typical options available for a type are exterior color, interior color, wheels, radio, service gurantee etc.

GET
https://api.productdata.volkswagenag.com/v3/catalog/{country_code}/types/{type_id}/options
Authorization Bearer {access_token}
Accept application/json

By type

Buildabilty Endpoints

Check if the chosen options with type is buildable

With the chosen type, and the options it must now be checked if the given configuration is buildable and distinct. The buildable part tells you if the current combination of options is allowed (=buildable) or leads to a conflict (=not buildable). You can assume that there is at least one orderable vehicle with the chosen options but there might be more than one. This means that a buildable configuration is not necessarily complete and can be ordered. This piece of information is carried by the distinct status. If a configuration is distinct it means that all necessary decisions are made so the vehicle could be ordered and produced.

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/check
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json

Recover configuration back to a buildable state

If it is determined that the given configuration is not buildable, you can choose to recover it back to a buildable state. The recover endpoint heals the configuration and returns one possible buildable configuration. It would always return the buildable configuration with the least no. of changes involved.

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/recover
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json

List the available options for the configuration

Once the configuration is determined to be buildable, we can proceed to see what other options can be further added to the configuration. To list the available options, the configure endpoint can be used. The valid ones lead directly to a buildable configuration, in order to use the invalid ones, the conflicting options must be deselected (by recover or solutions you find out which)

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/configure
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json

Complete a partial configuration and makes it distinct

Completes a partial configuration and makes it distinct. The response will define a new configuration that includes the given options as well as additional options that are required to make the configuration distinct. Note: The service follows the logic that the smallest amount of options are being added. Within this rule the returned options are random so the response may vary.

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/resolve
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json

Additional Information Endpoints

Get WLTP information

Once the configuration is distinct, you can proceed to find the WLTP and NEDC values of the given configuration.

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/wltp
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json

Get images of the configuration

Another interesting endpoint offered by OKAPI is the images endpoint, where as the name says, you can get urls to the images of your configuration. However, currently not all brands are supported by this endpoint. Your experience may vary based on the choice of your brand.

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/images
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json

Get information about orderable configuration

Once you are satisfied with the configuration, you can proceed to check the order endpoint. Here, you get additional information for the given distinct configuration. The returned object includes the current vehicle configuration as well as an additional data attribute which contains price, standard equipment and technical information. The standard equipment list is market specific and includes all options which are classified as standard equipment. The technical data content is market specific and may include information about vehicle dimensions, weights, performance figures and other sales-relevant properties.

POST
https://api.productdata.volkswagenag.com/v3/operation/{country_code}/order
Authorization Bearer {access_token}
Content-Type application/json
Accept application/json