Sorry, you need to enable JavaScript to visit this website.

Common Routing Parameters

 

Product version: 1.0
Last edit: 2019.02.07

On this page

Purpose

This document provides fundamental route planning parameters that can be used in the:

Please be aware that this document does not specify the complete Request or Response format.

  • To maintain forward compatibility you must be able to process responses with additional non-documented data fields.
  • Our deprecation policy only covers the documented subset of these formats.

Types

The following data table describes a subset of the types that can be used in the Calculate Route and Calculate Reachable Range services.

Types subset
Type Description
point
string
Latitude, longitude pair (in EPSG:4326 projection), with the following constraints:

  • Latitude values must be in the range [-90, +90].
  • Longitude values must be in the range [-180, +180].

Example: 52.37245,4.89406

dateTime
string
A date and time specified in RFC 3339 format with an optional time zone offset.
Example:

  • 1996-12-19T16:39:57
  • 1996-12-19T16:39:57-08:00
CombustionConstantSpeedConsumptionPair
string (contains a pair of two, comma-separated floats)
Comma-separated speedInkmh,consumptionInLitersPerHundredkm pair with the following constraint: The speedInkmh values must be in the range [0.0, 255.0].
Example: 15.5,10.0
ElectricConstantSpeedConsumptionPair
string (contains a pair of two, comma-separated floats)
Comma-separated speedInkmh,consumptionInkWhPerHundredkm pairs with the following constraint: The speedInkmh values must be in the range [0.0, 255.0].
Example: 15.5,8.0

Request data

Headers
The following data table describes HTTP request headers of particular interest to the Calculate Route and Calculate Reachable Range service clients.

  • Required headers must be used or the call will fail.
  • Optional headers may be used.
  • If there is a default value that will be assumed when an optional header is not used, it is shown in the table.
  • The order of Request headers is not important.
Optional headers
Header Description
Accept-Encoding Requests that the response be compressed.
Value: gzip
Content-Type Specifies the MIME type of the body of the Request.
Note: This header is required for POST Requests.
Values:

  • application/xml
  • application/json
Tracking-ID Specifies an identifier for the Request.

  • The value should be unique for each Request.
  • The value must match the regular expression '^[a-zA-Z0-9-]{1,100}$'.
  • If specified, the same value is sent back in the similar-named Response header.
  • Otherwise, a generated value may be sent back.

Value: See the regular expression format above.

Base path parameters

Parameter subset
The following data table describes a subset of the parameters that can be used in the Calculate Route and Calculate Reachable Range services.

  • Required headers must be used or the call will fail.
  • Optional headers may be used.
  • If there is a default value that will be assumed when an optional header is not used, it is shown in the table.
Required parameters
Parameter Description
baseURL
string
Base URL for calling the API.
Value: api.tomtom.com
Optional parameters
Parameter Description
contentType
string
The content type of the Response structure.
Default value: xml
Other values:

  • json
  • jsonp

Note: If the content type is jsonp, a callback method can be specified in the query parameters.

Request parameters

Request parameters are presented in two sections:

Section 1. Common Routing Parameters
This section presents a set of loosely connected parameters that influence the operation of the routing algorithm. While some of them are associated, the majority can be used independently of the others.

  • Required parameters must be used or the call will fail.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
Required parameters
Parameter Description
key
string
Authorization key to access the API.
Value: Your valid API Key.
Optional parameters
Parameter Description
callback
string
Specifies the jsonp callback method.
Only used when contentType is jsonp.
Default value: callback
report
string
Specifies which data should be reported for diagnosis purposes.

  • Possible values are: effectiveSettings.
  • Reports the effective parameters or data used when calling the API.
  • In the case of defaulted parameters, the default will be reflected where the parameter was not specified by the caller.

Default value: effectiveSettings

departAt
string
The date and time of departure from the origin point.

  • Departure times apart from now must be specified as a dateTime.
  • When a time zone offset is not specified, it will be assumed to be that of the origin point.
  • The departAt value must be in the future.
  • The departAt parameter cannot be used in conjunction with arriveAt.

Default value: now
Other value: dateTime

arriveAt
string
The date and time of arrival at the destination point.

  • It must be specified as a dateTime.
  • When a time zone offset is not specified it will be assumed to be that of the destination point.
  • The arriveAt value must be in the future.
  • The arriveAt parameter cannot be used in conjunction with:
    • departAt
    • minDeviationDistance
    • minDeviationTime
  • It cannot be used in calculateReachableRange Requests.

Value: dateTime

routeType
string
The type of route requested. Notes on specific values:

  • fastest: Returns the fastest route.
  • shortest: Returns the shortest route by distance.
  • eco: Routes that balance economy and speed.
  • thrilling Routes that include interesting or challenging roads and use as few motorways as possible.
    • You can choose the level of turns included and also the degree of hilliness.
    • See the hilliness and windingness parameters to set this.
    • There is a limit of 900km on routes planned with routeType=thrilling.

Default value: fastest
Other values:

  • shortest
  • eco
  • thrilling
traffic
boolean
Possible values are:

  • true: Do consider all available traffic information during routing.
  • false: Ignore current traffic data during routing.

Note that although the current traffic data is ignored during routing, the effect of historic traffic on effective road speeds is still incorporated.
Default value: true

avoid
string
Specifies something that the route calculation should try to avoid when determining the route and can be used multiple times. Possible values are:

  • tollRoads: Avoids toll roads.
  • motorways: Avoids motorways.
  • ferries: Avoids ferries.
  • unpavedRoads: Avoids unpaved roads.
  • carpools: Avoids routes that require use of carpool (HOV/High Occupancy Vehicle) lanes.
  • alreadyUsedRoads:
    • Avoids using the same road multiple times.
    • This is most useful in conjunction with routeType=thrilling.

Note: In calculateReachableRange requests, the value alreadyUsedRoads must not be used.
Values:

  • tollRoads
  • motorways
  • ferries
  • unpavedRoads
  • carpools
  • alreadyUsedRoads
travelMode
string
The mode of travel for the requested route.

  • Note that the requested travelMode may not be available for the entire route.
  • Where the requested travelMode is not available for a particular section, the travelMode element of the Response for that section will be "other".

Note that travel modes bus, motorcycle, taxi, and van are in BETA functionality. Full restriction data is not available in all areas.
In calculateReachableRange requests, the values bicycle and pedestrian must not be used.
Default value: car
Other values:

  • truck
  • taxi
  • bus
  • van
  • motorcycle
  • bicycle
  • pedestrian
hilliness
string
Degree of hilliness for a thrilling route. Note: This parameter can only be used in conjunction with routeType=thrilling.
Default value: normal
Other values:

  • low
  • high
windingness
string
Level of turns for thrilling route. Note: This parameter can only be used in conjunction with routeType=thrilling.
Default value: normal
Other values:

  • low
  • high
vehicleMaxSpeed
integer
Maximum speed of the vehicle in kilometers/hour.

  • A value of 0 means that an appropriate value for the vehicle will be determined and applied during route planning.
  • A non-zero value may be overridden during route planning.

Value: 0

vehicleWeight
integer
Weight of the vehicle in kilograms.

  • If a detailed Consumption model is specified, refer to the following Consumption model parameters section for the documentation of vehicleWeight.
  • If a detailed Consumption model is not specified, and the value of vehicleWeight is non-zero, then weight restrictions are considered.
  • In all other cases, this parameter is ignored.

Default value: 0

vehicleAxleWeight
integer
Weight per axle of the vehicle in kilograms. Note: A value of 0 means that weight restrictions per axle are not considered.
Default value: 0
vehicleLength
float
Length of the vehicle in meters. A value of 0 means that length restrictions are not considered.
Default value: 0
vehicleWidth
float
Width of the vehicle in meters. A value of 0 means that width restrictions are not considered.
Default value: 0
vehicleHeight
float
Height of the vehicle in meters. A value of 0 means that height restrictions are not considered.
Default value: 0
vehicleCommercial
boolean
Vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.
Default value: false
vehicleLoadType
string
Types of cargo that may be classified as hazardous materials and restricted from some roads. Available vehicleLoadType values are:

  • US Hazmat classes 1 through 9
  • Plus generic classifications for use in other countries.

Use these for routing in the USA:

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

Important note:

When using multiple instances of USHazmatClass values with the optional vehicleLoadType parameter in a Request, always pair each USHazmatClass value with the vehicleLoadType parameter name. This will ensure that your Request is successful. For example:

&vehicleLoadType=USHazmatClass1
&vehicleLoadType=USHazmatClass2
&vehicleLoadType=USHazmatClass3

Use these for routing in all other countries:

  • otherHazmatExplosive: Explosives
  • otherHazmatGeneral: Miscellaneous
  • otherHazmatHarmfulToWater: Harmful to water

Note: vehicleLoadType can be specified multiple times.

  • This parameter is not considered for travelMode pedestrian or bicycle.

Values:

  • USHazmatClass1
  • USHazmatClass2
  • USHazmatClass3
  • USHazmatClass4
  • USHazmatClass5
  • USHazmatClass6
  • USHazmatClass7
  • USHazmatClass8
  • USHazmatClass9
  • otherHazmatExplosive
  • otherHazmatGeneral
  • otherHazmatHarmfulToWater

Section 2. Consumption model parameters
Routing provides a set of parameters for a detailed description of a vehicle-specific Consumption model.

  • These parameters can be specified in a calculateRoute Request.
  • They must be specified in a calculateReachableRange Request.

Depending on the value of vehicleEngineType, we support two principal Consumption models:

  • Combustion consumption model
  • Electric consumption model

Note:

  • Specifying parameters that belong to different models in the same request is an error.
  • A Consumption model cannot be used with the travelMode values of bicycle and pedestrian.
Parameter constraints
In both Consumption models, explicitly specifying some parameters requires specifying some others as well. These dependencies are:

  • All parameters require constantSpeedConsumption* to be specified by the user.
    • It is an error to specify any other Consumption model parameter (with the exception of vehicleWeight) if constantSpeedConsumption* is not specified.
  • accelerationEfficiency and decelerationEfficiency must always be specified as a pair (i.e., both or none).
    • If accelerationEfficiency and decelerationEfficiency are specified, the product of their values must not be greater than 1 (to prevent perpetual motion).
  • uphillEfficiency and downhillEfficiency must always be specified as a pair (i.e., both or none).
    • If uphillEfficiency and downhillEfficiency are specified, the product of their values must not be greater than 1 (to prevent perpetual motion).
  • If *Efficiency parameters are specified by the user, then vehicleWeight must also be specified.
    • When vehicleEngineType is combustion, fuelEnergyDensityInMJoulesPerLiter must be specified as well.
  • maxChargeInkWh and currentChargeInkWh must always be specified as a pair (i.e., both or none).

Note that if only constantSpeedConsumption* is specified, no other consumption aspects are taken into account, i.e., slopes and vehicle acceleration are not considered for consumption computations.

Selecting the Consumption model
There are two available Consumption models: Combustion and Electric.

  • A model is selected by specifying the corresponding constantSpeedConsumption* parameter and possibly further parameters that belong to the same model.
  • The chosen model must match the value of the vehicleEngineType parameter.
Optional parameter
Parameter Description
vehicleEngineType
string
The engine type of the vehicle.

  • When a detailed Consumption model is specified, it must be consistent with the value of vehicleEngineType.

Default value: combustion
Other value: electric

The Combustion consumption model

Details
The Combustion consumption model is used when vehicleEngineType value is set to combustion.
The following data table describes all of the parameters that can be specified in a request using the Combustion model.

  • Required parameters must be used or the call will fail.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
  • The order of parameters in a request is not important.
 
Required parameters
Parameter Description
constantSpeedConsumptionInLitersPerHundredkm
Colon-delimited list of CombustionConstantSpeedConsumptionPair
Specifies the speed-dependent component of consumption.

  • Provided as an unordered list of speed/consumption-rate pairs.
  • The list defines points on a consumption curve.
  • Consumption rates for speeds not in the list are found as follows:
    • By linear interpolation, if the given speed lies in between two speeds in the list.
    • By linear extrapolation otherwise, assuming a constant (ΔConsumption/ΔSpeed) determined by the nearest two points in the list.
  • The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed.
    • If it only contains a single point, then the consumption rate of that point is used without further processing.
  • Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed.
    • This ensures that extrapolation does not lead to negative consumption rates.
  • Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
  • The minimum and maximum values described here refer to the valid range for the consumption values (expressed in l/100km).

Values: Colon-delimited list of CombustionConstantSpeedConsumptionPair
Minimum value: 0.01
Maximum value: 100000.0

Optional parameters
Parameter Description
vehicleWeight
integer
Weight of the vehicle in kilograms.

  • This is the same parameter as documented in the previous "Common Routing Parameters" section.
  • Note: It is mandatory if any of the *Efficiency parameters are set.
  • It must be strictly positive when used in the context of the Consumption model.
  • Weight restrictions are considered.

Minimum value: 1

currentFuelInLiters
float
Specifies the current supply of fuel in liters.
Minimum value: 0.0
auxiliaryPowerInLitersPerHour
float
Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour.

  • It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.

Minimum value: 0.0

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

  • It is used in conjunction with the *Efficiency parameters for conversions between saved or consumed energy and fuel.
  • For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.
  • This parameter must be used/required if any *Efficiency parameter is set.

Minimum value: 0.0

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

  • ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter.
  • Note: This must be paired with decelerationEfficiency.

Minimum value: 0.0
Maximum value: 1/decelerationEfficiency

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

  • ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter.
  • Note: This must be paired with accelerationEfficiency.

Minimum value: 0.0
Maximum value: 1/accelerationEfficiency

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

  • ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter.
  • Note: This must be paired with downhillEfficiency.

Minimum value: 0.0
Maximum value: 1/downhillEfficiency

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

  • ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter.
  • Note: This must be paired with uphillEfficiency.

Minimum value: 0.0
Maximum value: 1/uphillEfficiency

The Electric Consumption model

Details
The Electric Consumption model is used when vehicleEngineType is set to electric.
The following data table describes all of the parameters that can be specified in a request using the Electric model.

  • Required parameters must be used or the call will fail.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
  • The order of parameters in a request is not important.
Required parameters
Parameter Description
constantSpeedConsumptionInkWhPerHundredkm
Colon-delimited list of ElectricConstantSpeedConsumptionPair
Specifies the speed-dependent component of consumption.

  • Provided as an unordered list of speed/consumption-rate pairs.
  • The list defines points on a consumption curve.
  • Consumption rates for speeds not in the list are found as follows:
    • By linear interpolation, if the given speed lies in between two speeds in the list.
    • By linear extrapolation otherwise, assuming a constant (&ΔConsumption/&ΔSpeed) determined by the nearest two points in the list.
  • The list must contain between 1 and 25 points (inclusive), and may not contain duplicate points for the same speed.
    • If it only contains a single point, then the consumption rate of that point is used without further processing.
  • Consumption specified for the largest speed must be greater than or equal to that of the penultimate largest speed.
    • This ensures that extrapolation does not lead to negative consumption rates.
  • Similarly, consumption values specified for the two smallest speeds in the list cannot lead to a negative consumption rate for any smaller speed.
  • The minimum and maximum values described here refer to the valid range for the consumption values (expressed in kWh/100km).

Value type: Colon-delimited list of ElectricConstantSpeedConsumptionPair.
Minimum value: 0.01
Maximum value: 100000.0

vehicleWeight
integer
This is the same parameter as documented in the previously defined Common Routing Parameters section.

  • Note: This is only required if any *Efficiency parameter is set.
  • It must be strictly positive when used in the context of the Consumption model.
  • Weight restrictions are considered.

Minimum value: 1

Optional parameters
Parameter Description
currentChargeInkWh
float
Specifies the current electric energy supply in kilowatt hours (kWh).
Note: Requires maxChargeInkWh to be set.
Minimum value: 0.0
Maximum value: maxChargeInkWh
maxChargeInkWh
float
Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle's battery.
Note: Requires currentChargeInkWh to be set.
Minimum value: currentChargeInkWh
auxiliaryPowerInkW
float
Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW).

  • It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.

Minimum value: 0.0

accelerationEfficiency
float
Specifies the efficiency of converting electric energy to kinetic energy when the vehicle accelerates (i.e., KineticEnergyGained/ElectricEnergyConsumed).

  • Note: It must be paired with decelerationEfficiency.

Minimum value: 0.0
Maximum value: 1/decelerationEfficiency

decelerationEfficiency
float
Specifies the efficiency of converting kinetic energy to electric energy when the vehicle decelerates (i.e., ElectricEnergyGained/KineticEnergyLost)

  • Note: It must be paired with accelerationEfficiency.

Minimum value: 0.0
Maximum value: 1/accelerationEfficiency

uphillEfficiency
float
Specifies the efficiency of converting electric energy to potential energy when the vehicle gains elevation (i.e., PotentialEnergyGained/ElectricEnergyConsumed).

  • Note: It must be paired with downhillEfficiency.

Minimum value: 0.0
Maximum value: 1/downhillEfficiency

downhillEfficiency
float
Specifies the efficiency of converting potential energy to electric energy when the vehicle loses elevation (i.e, ElectricEnergyGained/PotentialEnergyLost).

  • Note: It must be paired with uphillEfficiency.

Minimum value: 0.0
Maximum value: 1/uphillEfficiency

Sensible Values of Consumption Parameters

Details
It is possible that a particular set of consumption parameters is rejected, even though it might fulfill all the explicit requirements specified above.

  • This will happen when the value of a specific parameter, or a combination of values of several parameters, is deemed to lead to unreasonable magnitudes of consumption values.
  • If that happens, it most likely indicates an input error, as proper care is taken to accommodate all sensible values of consumption parameters.
  • In case a particular set of consumption parameters is rejected, the accompanying error message will contain a textual explanation of the reason(s).
Example
To give the feeling of the magnitudes of reasonable parameter values, the following data table provides an example of sensible values for the Combustion and Electric models.
Parameter Sensible values by model
constantSpeedConsumptionInLitersPerHundredkm
Colon-delimited list of CombustionConstantSpeedConsumptionPair
  • Combustion model: 50,6.3:130,11.5
  • Electric model: -
constantSpeedConsumptionInkWhPerHundredkm
Colon-delimited list of ElectricConstantSpeedConsumptionPair
  • Combustion model: -
  • Electric model: 50,8.2:130,21.3
vehicleWeight
integer
  • Combustion model: 1600
  • Electric model: 1900
currentFuelInLiters
integer
  • Combustion model: 55
  • Electric model: -
currentChargeInkWh
float
  • Combustion model: -
  • Electric model: 43
maxChargeInkWh
float
  • Combustion model: -
  • Electric model: 85
auxiliaryPowerInLitersPerHour
float
  • Combustion model: 0.2
  • Electric model: -
auxiliaryPowerInkW
float
  • Combustion model: -
  • Electric model: 1.7
fuelEnergyDensityInMJoulesPerLiter
float
  • Combustion model: 34.2
  • Electric model: -
accelerationEfficiency
float
  • Combustion model: 0.33
  • Electric model: 0.66
decelerationEfficiency
float
  • Combustion model: 0.83
  • Electric model: 0.91
uphillEfficiency
float
  • Combustion model: 0.27
  • Electric model: 0.74
downhillEfficiency
float
  • Combustion model: 0.51
  • Electric model: 0.73

POST data parameters

Details
Some parameters can be provided using the HTTP POST method.

  • The POST data can be in either XML or JSON format, see the [Content-Type] header.
  • All POST data parameters are optional.
  • It is an error to use the HTTP POST method if no POST data parameters are provided.
There is an upper limit on the total size of the POST data.

  • Exceeding this limit results in a response with Response Code 400, indicating invalid POST data.
  • The client must not rely on the exact value of this limit.
  • The current limit is 30 MB.
Compressed POST data is not supported.

  • Requests with compressed POST data results in a response with Response Code 415.
When using XML format for the POST data, the root element must be <postData>.
The following table describes a subset of the parameters that can be used in the Calculate Route and Calculate Reachable Range services.
XML parameter Description
<avoidVignette> This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which all toll roads with vignettes are to be avoided.

  • Toll roads with vignettes in countries not in the list are unaffected.
  • Note: It is an error to specify both <avoidVignette> and <allowVignette>.
<allowVignette> This is a list of 3-character, ISO 3166-1, alpha-3 country codes of countries in which toll roads with vignettes are allowed.

  • Specifying <avoidVignette> with some countries X is equivalent to specifying <avoidVignette> with all countries but X.
  • Specifying <allowVignette> with an empty list is the same as avoiding all toll roads with vignettes.
  • Note: It is an error to specify both <avoidVignette> and <allowVignette>.
<avoidAreas> This is a list of shapes to avoid for planning routes.

  • Supported shapes include <rectangles>.
  • It can contain one of each supported shapes element.
<rectangles> This is a list of <rectangle> elements.

  • The maximum number of <rectangle> elements is ten.
<rectangle> This is an axis-aligned rectangle, defined as <southWestCorner> and <northEastCorner>.

  • The maximum size of a rectangle is about 160x160 km.
  • It cannot cross the 180th meridian.
  • It must be between -80 and +80 degrees of latitude.
<southWestCorner> The south-west corner of a rectangle, defined as a latitude longitude pair (point).
<northEastCorner> The north-east corner of a rectangle, defined as a latitude longitude pair (point).
XML Request content example
 
<postData>
  <avoidVignette>
    AUS,CHE
  </avoidVignette>
  <avoidAreas>
    <rectangles>
      <rectangle>
        <southWestCorner latitude="48.81851" longitude="2.26593"/>
        <northEastCorner latitude="48.90309" longitude="2.41115"/>
      </rectangle>
    </rectangles>
  </avoidAreas>
</postData>
JSON Request content example
 
{
  "avoidVignette": [
    "AUS",
    "CHE"
  ],
  "avoidAreas": {
    "rectangles": [
      {
        "southWestCorner": {"latitude": 48.81851, "longitude": 2.26593},
        "northEastCorner": {"latitude": 48.90309, "longitude": 2.41115}
      }
    ]
  }
}

Response data

Response headers
The following data table describes HTTP Response headers of particular interest to Calculate Route and Calculate Reachable Range service clients.

Header Description
Access-Control-Expose-Headers The service whitelists Response headers that browsers are allowed to access.
Value: Content-Length
Access-Control-Allow-Origin The service allows cross-origin resource sharing.
Value: * (wildcard)
Content-Encoding The service supports HTTP compression, if requested by the client.
Value: gzip
Content-Type The format of the Response.

  • The service supports specifying the desired Response format.
  • See the contentType parameter.

Values:

  • application/xml; charset=utf-8
  • application/json; charset=utf-8
  • application/javascript; charset=utf-8
Cache-Control The Cache-Control general-header field is used to specify directives that must be obeyed by all caching mechanisms along the Request/Response chain.

  • It is supported by HTTP/1.1 clients.
  • It may not be supported by HTTP/1.0 clients.

Values:

  • no-cache
  • no-transform
Pragma The Pragma general-header field is used to specify directives that might apply to any recipient along the Request/Response chain.

  • It is supported by HTTP/1.0 clients.

Value: no-cache

Tracking-ID This is an identifier for the Request.

  • If Tracking-ID was specified in the Request headers, it contains the same value.
  • Otherwise may contain a generated value.

Response codes
The following table describes HTTP Response codes of particular interest to Calculate Route and Calculate Reachable Range service clients.
Code Meaning and possible causes
200 OK: A route or range was calculated and the body of the Response contains the data for a successful Response.
400 Bad request: One or more parameters were:

  • Incorrectly specified.
  • Are mutually exclusive.
  • The points in the route request are not connected by the road network.
  • The points in the request are not near enough to a road.
403 Permission, capacity, or authentication issues:

  • Forbidden
  • Not authorized
  • Account inactive
  • Account over queries per second limit
  • Account over rate limit
  • Rate limit exceeded
404 Not Found: The requested resource could not be found, but it may be available again in the future.
405 Method Not Allowed: The client used a HTTP method other than GET or POST.

408 Request timeout.
414 Requested uri is too long.
415 Unsupported Media Type.
500 An error occurred while processing the request. Please try again later.
502 Internal network connectivity issue.
503 Service currently unavailable.
504 Internal network connectivity issue or a request that has taken too long to complete.
596 Service not found.

You are here