v1

latestOpenAPI 3.0.02026-07-144229.6 KB
Routing

Calculate Route

Calculates a route between an origin and a destination.

get/routing/{versionNumber}/calculateRoute/{locations}/{contentType}

Path parameters

versionNumber1 required

Service version number. The current value is 1.

locationsstring required

Locations through which the calculated route must pass.

contentType'xml' | 'json' | 'jsonp' required

The content type of the response structure. If the content type is jsonp, a callback method can be specified in the query parameters.

Query parameters

maxAlternativesinteger

Number of alternative routes to be calculated.

alternativeType'anyRoute' | 'betterRoute'

Determines whether the alternative routes to be calculated should be better with respect to the planning criteria provided than the reference route.

minDeviationDistanceinteger

All alternative routes will follow the reference route for the specified minimum number of meters starting from the origin point.

minDeviationTimeinteger

All alternative routes will follow the reference route for the specified minimum number of seconds starting from the origin point.

instructionsType'coded' | 'text' | 'tagged'

If specified, guidance instructions will be returned (if available).

languagestring

The language parameter determines the language of the guidance messages.

computeBestOrderboolean

Re-order the route waypoints to reduce the route length.

routeRepresentation'polyline' | 'none'

Specifies the representation of the set of routes provided as a response.

computeTravelTimeFor'none' | 'all'

Specifies whether to return additional travel times using different types of traffic information (none, historic, live) as well as the default best-estimate travel time.

vehicleHeadinginteger

The directional heading of the vehicle in degrees. Entered in degrees, measured clockwise from north (so north is 0, east is 90, etc.).

sectionTypestring

Specifies which section types are explicitly reported in the route response. Can be specified multiple times.

  • carTrain, ferry, tunnel or motorway
  • pedestrian
  • tollRoad
  • tollVignette
  • country
  • travelMode
  • traffic
callbackstring

Specifies the jsonp callback method.

report'effectiveSettings'

Specifies which data should be reported for diagnosis purposes.

departAtstring

The date and time of departure from the origin point. Departure times apart from <i>now</i> must be specified as a dateTime.

arriveAtstring dateTime

The date and time of arrival at the destination point. It must be specified as a dateTime.

routeType'fastest' | 'shortest' | 'eco' | 'thrilling'

The type of route requested.

trafficboolean

Determines whether current traffic is used in route calculations. Note that information on historic road speeds is always used.

avoidstring

Specifies whether the routing engine should try to avoid specific types of road segment when calculating the route. Can be specified multiple times. Possible values:

  • tollRoads
  • motorways
  • ferries
  • unpavedRoads
  • carpools
  • alreadyUsedRoads
travelMode'car' | 'truck' | 'taxi' | 'bus' | 'van' | 'motorcycle' | 'bicycle' | 'pedestrian'

The mode of travel for the requested route.

hilliness'low' | 'normal' | 'high'

Degree of hilliness for calculating a thrilling route.

windingness'low' | 'normal' | 'high'

Amount that a thrilling route should wind.

vehicleMaxSpeedinteger

Maximum speed of the vehicle in km/hour.

vehicleWeightinteger

Weight of the vehicle in kilograms.

vehicleAxleWeightinteger

Weight per axle of the vehicle in kg.

vehicleLengthnumber float

Length of the vehicle in meters.

vehicleWidthnumber float

Width of the vehicle in meters.

vehicleHeightnumber float

Height of the vehicle in meters.

vehicleCommercialboolean

Indicates that the vehicle is used for commercial purposes. This means it may not be allowed on certain roads.

vehicleLoadTypestring

Indicates what kinds of hazardous materials the vehicle is carrying (if any). This means it may not be allowed on certain roads. Use these for routing in the US:

  • <i>USHazmatClass1</i> Explosives
  • <i>USHazmatClass2</i> Compressed gas
  • <i>USHazmatClass3</i> Flammable liquids
  • <i>USHazmatClass4</i> Flammable solids
  • <i>USHazmatClass5</i> Oxidizers
  • <i>USHazmatClass6</i> Poisons
  • <i>USHazmatClass7</i> Radioactive
  • <i>USHazmatClass8</i> Corrosives
  • <i>USHazmatClass9</i> Miscellaneous

Use these for routing in all other countries:

  • <i>otherHazmatExplosive</i> Explosives
  • <i>otherHazmatGeneral</i> Miscellaneous
  • <i>otherHazmatHarmfulToWater</i> Harmful to water

vehicleLoadType can be specified multiple times. This parameter is currently only considered for <b>travelMode</b>=<i>truck</i>.

vehicleEngineType'combustion' | 'electric'

Engine type of the vehicle.

constantSpeedConsumptionInLitersPerHundredkmstring

Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate pairs.

currentFuelInLitersnumber float

Specifies the current supply of fuel in liters.

auxiliaryPowerInLitersPerHournumber float

Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.

fuelEnergyDensityInMJoulesPerLiternumber float

Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ).

accelerationEfficiencynumber float

Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates (i.e. KineticEnergyGained/ChemicalEnergyConsumed).

decelerationEfficiencynumber float

Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates (i.e. ChemicalEnergySaved/KineticEnergyLost).

uphillEfficiencynumber float

Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation (i.e. PotentialEnergyGained/ChemicalEnergyConsumed).

downhillEfficiencynumber float

Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation (i.e. ChemicalEnergySaved/PotentialEnergyLost).

constantSpeedConsumptionInkWhPerHundredkmstring

Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate pairs.

Response

OK: a route was calculated and the body of the response contains the route description and any other requested data.