Service version: 1
Last edit: 2022.08.25

Purpose

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

Main map versions

The following data table shows the supported date ranges and recommended map versions.

Date Range Support

Map Version

2008.01.01 - 2019.01.31 2016.12
2019.02.01 - 2020.12.31 2018.12
2021.01.01 - 2021.12.31 2020.12
2022.01.01 - 2022.12.31 2021.12
2023.01.01 - 2023.12.31 2022.12
... ...

Main map versions are using already map-matched data which reduces calculation time and delivers your data faster. This can also deliver your results on a bigger scale. You're also able to perform reports on a stable map version across many months in the same year.

Additional map versions

If needed you can select other map versions. This option is available only for the latest 2 years of data (this is a moving time window) Besides the mentioned 1 - year cadence of the main map version switched every year, we allow the use of other minor map versions released each quarter. For example, when asking for a date range between January and February 2020, you can use the 2020.03 map version. In most cases, this will take a little longer to deliver such a result due to the additional map-matching process.

Request data

HTTPS method: POST

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

URL format

https://{baseURL}/traffic/trafficstats/maps/{versionNumber}?key={Your_API_Key}

Request parameters

The following table 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.

Required parameters Description
baseURL
string
Base URL for calling the API.
Value: api.tomtom.com
versionNumber
string
Service version number.
Value: The current value is 1.
key
string
Authorization key for access to the API.
Value: Your valid API Key.

POST body request parameters - JSON

The following parameters refer to the POST request body written in JSON.

Parameter Description
geometry
object

Geometry of the network in GeoJSON format.


Values: Supported geometry types are Polygon and MultiPolygon. See RFC 7946.

dateRange
object

Ranges of dates for calculations, this affects the list of available maps.


Values: It consists of the dateRange object from and to values in YYYY-MM-DD format.

POST body request example - JSON

1{
2 "geometry": {
3 "type": "Polygon",
4 "coordinates": [
5 [
6 [19.433904442477314, 51.817044485417625],
7 [19.407226981038946, 51.784535147052594],
8 [19.42841202394746, 51.7401001934999],
9 [19.471959056587565, 51.72430675993962],
10 [19.500205780461073, 51.73135374291081],
11 [19.500205780461073, 51.75831652893055],
12 [19.493144099496106, 51.80904062983166],
13 [19.44959706685603, 51.8194696155619],
14 [19.433904442477314, 51.817044485417625]
15 ]
16 ]
17 },
18 "dateRange": {
19 "from": "2019-01-01",
20 "to": "2020-01-31"
21 }
22}

Required headers

Header

Value

Content-Type

application/json

Response data

Response example - JSON

1{
2 "maps": ["2018.12", "2019.03", "2019.06", "2019.09", "2019.12"]
3}