The Guide


Operations

These intent resources provide some basic functionality to interact with consumer provided configurations.

Check a given configuration

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

Check the buildability for a given configuration.
The response contains the information whether the given configuration is buildable and distinct. When the Parameter "complete" is set, the response also contains the information wether the configuration is complete. The Defintion of complete is explained beneath at this location: Status “complete” of Configuration
A configuration is buildable if the configuration defines an assortment of options, that can be contained in one or more vehicles which can be produced

So what do we mean if we talk about a distinct configuration: If you provide a partial configuration, and the combination of options is buildable, there might be several options, on how a car could be build.

A distinct configuration defines enough options to make out just one vehicle. We will always try to autocomplete a partial configuration, but in order to identify a single buildable vehicle we need as many options as it takes that there could be just one version of a vehicle left: In the example the selection of the red hubcap just leaves one option to build that vehicle.

Toggle arrow Example Request with cURL

A distinction can be made between a buildable, a distinct configuration and a complete configuration. A buildable configuration is then given, when all the necessary parameters for a buildable vehicle have been met. With a distinct configuration the condition is that all Options are set as well as these are not indirectly derivable (e.g. missing option, which has no alternatives). A configuration is complete, if all necessary options are set (e.g.options must be selected to a certain product, like for example with a navigation system also the USB socket is needed).

The attribute "complete" indicates whether all customer-selectable options together with the country settings represent a complete order in the configuration. The reverse is also true, if the configuration is distinct but further customer-selectable options would be forced, then this configuration is "complete=false”.

Request
curl \
-X POST \
-H "Authorization: bearer <access_token>" \
-H "Cache-Control: no-cache" \
-H "Content-Type: application/json" \
-d "{ \"brand_id\": \"V\",\"model_id\": \"36c170df-178b-5b46-a3f7-94fc2920e79f\",\"options\": [ {\"id\":\"45f0bc1e-0c9b-5eb7-9608-25d6ccb2a6c0\"}, {\"id\":\"COLOR_EXTERIEUR:0Q0Q\"}, {\"id\":\"COLOR_INTERIEUR:XE\"}, {\"id\":\"PACKET:PSA\"}, {\"id\":\"PACKET:PAF\"}]}" \
https://api.productdata.volkswagenag.com/v3/operation/CH/check
Response
HTTP/2.0 200 OK
Content-Type: application/json
{ "buildable": true, "distinct": false }

WLTP data for a given configuration

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

Request the WLTP values for a configuration. In order to request the WLTP values the given configuration has to be distinct. You can always call the check resource in order to assure that the configuration is distinct, before issuing a call to request the WLTP values.

Toggle arrow Example Request with cURL

Request
curl \
-X POST \
-H "Authorization: bearer <access_token>" \
-H "Cache-Control: no-cache" \
-H "Content-Type: application/json" \
-d "{ \"brand_id\": \"d3f207e5-18d8-5bd2-a5fa-a1acc05629fa\",\"model_id\": \"54ae5960-4c6e-5a50-9f36-c88ab444db21\",\"options\": [ {\"id\":\"e6ce0e6e-d1fa-5857-b857-31101f1b1520\"}, {\"id\":\"947374b8-61df-5217-b42a-35271b3eb695\"}, {\"id\":\"dc7e7c77-ba62-5529-b126-b9b340502f75\"}]}" \
https://api.productdata.volkswagenag.com/v3/operation/CH/wltp
Response
HTTP/1.1 200 OK
Content-Type: application/json

BODY:
[
{
"data_version": "11",
"engine_type": "ICE",
"fuel_types": [
"PETROL"
],
"general_data": {
"values": [
{
"key": "MASS_ACTUAL",
"value": 1077.075,
"unit": "kg"
}
]
},
"calc_algorithm": "RLF",
"tire": {
"front": {
"eeclass": "B",
"category": "C1"
},
"rear": {
"eeclass": "B",
"category": "C1"
}
},
"cycle_modifications": {
"values": []
},
"interpolations": [
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "LOW",
"value": 6.893411017872731,
"unit": "l/100km"
},
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "MEDIUM",
"value": 5.1990300132965865,
"unit": "l/100km"
},
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "HIGH",
"value": 4.828425094020777,
"unit": "l/100km"
},
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "EXTRA_HIGH",
"value": 5.970061373915594,
"unit": "l/100km"
},
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "COMBINED",
"value": 5.59022076225368,
"unit": "l/100km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "LOW",
"value": 156.7438669817635,
"unit": "g/km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "MEDIUM",
"value": 118.14483328190443,
"unit": "g/km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "HIGH",
"value": 109.70216236113592,
"unit": "g/km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "EXTRA_HIGH",
"value": 135.69813961073,
"unit": "g/km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "COMBINED",
"value": 127.06325787413448,
"unit": "g/km"
}
],
"nedc": {
"values": [
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "COMBINED",
"value": 4.8,
"unit": "l/100km"
},
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "EXTRAURBAN",
"value": 4.1,
"unit": "l/100km"
},
{
"value_type": "CONSUMPTION",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "URBAN",
"value": 6,
"unit": "l/100km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "COMBINED",
"value": 110,
"unit": "g/km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "EXTRAURBAN",
"value": 94,
"unit": "g/km"
},
{
"value_type": "CO2",
"fuel_type": "PETROL",
"energy_management_type": "PURE",
"phase": "URBAN",
"value": 137,
"unit": "g/km"
}
]
},
"energy_efficiency": {
"class_nedc": "C",
"iso": "DEU"
}
}
]

Complete a given configuration

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

To complete a partial configuration to a fully equipped and buildable car, you can use the resolve function of the options endpoint.
We will amplify the given set of options with a selection of options that will make your current partial configuration a distinct one. The request responds with a completed and distinct configuration. The options added to the configuration's set of options will provide just one random example of how a partial configuration might be extended to gather a distinct configuration. If your configuration has already been distinct the response will just contain the given configuration. Please note that your configuration has to be buildable.

Recover a given, not buildable configuration

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

To recover a given configuration that is not buildable, okapi will search for options that are conflicting with your current selection of options but valid options within the model. The request responds with a recovered configuration. If the configuration contains options, that are not valid within the given model, the resource will respond with a 409.

Gather the choices of options of a given configuration

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

At every point within the configuration process you can request the list of choices. A choice contains options that are either valid or invalid within the current configuration. Beside this information a choice defines a category/domain of a given configuration that can be customised with options that are provided.

Ways to prioritize options in operations

OKAPI allows prioritizing the options in the requested configuration. Depending on the use case, options can be sorted into the input-categories listed below. They have different effects on the solutions/configurations you get as response. At /solutions-endpoint you see difference of your input configuration+parameters as add_options and remove_options. Below is a description of each field with an example.

Field Description Example
preferred_options
  • Can only be used in /solutions as query-parameter
  • Idea: send list of options you want for your configuration without preventing buildability
  • Priority: first highest. If no buildable solutions found, then same as one_of
  • Comparison nice_to_have: options are either considered when buildable, or ignored
  • Delimitation 1: if one of these options prevent buildability, they will be IGNORED
v3/operation/DE/solutions?preferred_options=PACKET:WBA+MIK:3D7
nice_to_have
  • Can only be used in /solutions and /solve as query-parameter
  • Priority: lowest of all parameters
  • Comparison preferred_options: options CAN be considered, but there is no guarantee
v3/operation/DE/solutions?nice_to_have=PACKET:WBA+MIK:3D7
one_of
  • Can be used on all POST operation endpoints in custom_conditions
  • Input: Array of lists, which contains options of the same family
  • Idea: One of the options in that list will be choosen, so minimum 2 options is useful
  • Delimitation 1: if these options prevent buildability, they will be IGNORED
  • Delimitation 2: if only one option is given in a list, it has the same effect like given as normal option in configuration
  • Delimitation 3: in combination with force=true query parameter, its possible to get no solutions
{
"custom_conditions": {
"options": {
"one_of": [
[
{
"code": "COLOR_INTERIEUR:TW"
},
{
"code": "COLOR_INTERIEUR:XW"
}
]
]
}
}
}
none_of
  • Can be used on all POST operation endpoints in custom_conditions
  • Input: Array of options, that should NOT be considered
  • Delimitation 1: if restricting these options prevents buildability, they will be IGNORED
  • Delimitation 2: in combination with force=true query parameter, its possible to get no solutions
{
"custom_conditions": {
"options": {
"none_of": [
{
"code": "COLOR_INTERIEUR:TW"
},
{
"code": "COLOR_INTERIEUR:XW"
}
]
}
}
}