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.
The aim of this tutorial to provide an insight to the user about the various OKAPI endpoints and product data.
A good place to begin is the /countries endpoint which lists all the countries for which OKAPI offers the possibilty of configuring an automobile.
Authorization | Bearer {access_token} |
Accept | application/json |
The next step could be to see the Brands which are available for the country you would choose from the previous step.
Authorization | Bearer {access_token} |
Accept | application/json |
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.
Authorization | Bearer {access_token} |
Accept | application/json |
By brand and country
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.
Authorization | Bearer {access_token} |
Accept | application/json |
By country and model
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.
Authorization | Bearer {access_token} |
Accept | application/json |
By type
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.
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |
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.
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |
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)
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |
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.
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |
Once the configuration is distinct, you can proceed to find the WLTP and NEDC values of the given configuration.
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |
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.
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |
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.
Authorization | Bearer {access_token} |
Content-Type | application/json |
Accept | application/json |