Available Maps

Service version: 1
Last edit: 2022.07.23

Purpose

To check what map versions are available in all Traffic Stats APIs you can simply use this endpoint. Map versions should be selected based on a Date Range provided in the create report POST request.

When asking for data in the last two years (this is a moving time window), a rich selection of maps is available. When requesting data older than 2 years, only 2016.12 and 2018.12 maps can be used, otherwise the request will be rejected.

For example, when asking for a date range between January and February 2020, it is recommended to use the 2020.03 map version. When asking for data from September 2016, it is advised to use the 2016.12 map version.

Request data

HTTPS method: POST

Constants and parameters enclosed in curly brackets { } must be replaced with their values.

URL format

POST
URL request example
https://{baseURL}/traffic/trafficstats/maps/{versionNumber}?key={apiKey}

Required headers

HeaderValue

Content-Type

application/json

Request Parameters

The table below describes all of the parameters that can be used in a request. Required parameters must be used or the call will fail. Optional parameters may be used.

ParameterDescriptionReq'd?Type / ValuesDefault Value
baseURLBase URL for calling the API.Yesapi.tomtom.com
versionNumberService version number. The current value is 1.Yes1
apiKeyAuthorization key for access to the API.YesAPI Key

JSON request parameters

The following JSON parameters refer to the POST request.

ParameterDescriptionReq'd?Type / ValuesDefault Value
geometryGeometry of the network in GeoJSON format. Supported geometry types are Polygon and MultiPolygon. See RFC 7946.YesObject
dateRangeRanges of dates for calculations, this affects the list of available maps. It consists of Date from and Date to in YYYY-MM-DD format.YesObject

JSON example request

POST
Request body - JSON
1{
2 "geometry":{
3 "type":"Polygon",
4 "coordinates":[
5 [
6 [
7 19.433904442477314,
8 51.817044485417625
9 ],
10 [
11 19.407226981038946,
12 51.784535147052594
13 ],
14 [
15 19.42841202394746,
16 51.7401001934999
17 ],
18 [
19 19.471959056587565,
20 51.72430675993962
21 ],
22 [
23 19.500205780461073,
24 51.73135374291081
25 ],
26 [
27 19.500205780461073,
28 51.75831652893055
29 ],
30 [
31 19.493144099496106,
32 51.80904062983166
33 ],
34 [
35 19.44959706685603,
36 51.8194696155619
37 ],
38 [
39 19.433904442477314,
40 51.817044485417625
41 ]
42 ]
43 ]
44 },
45 "dateRange":{
46 "from":"2019-01-01",
47 "to":"2020-01-31"
48 }
49}

Response example

POST
Response body - JSON
1{
2 "maps": [
3 "2018.12",
4 "2019.03",
5 "2019.06",
6 "2019.09",
7 "2019.12"
8 ]
9}