Route Monitoring
Purpose
The TomTom Route Monitoring API service provides an intuitive and powerful way to monitor strategic routes in real-time. Customers have the ability to pre-define routes important to their businesses getting detailed information on current travel time, current delay time and percentage delay, route distance, live data coverage, and data confidence level. The overall route information can also be checked on a segment level, providing accurate and detailed information of traffic flow dynamics down to short length extensions.
Confirm requested data and assigned ID
Returns a confirmation of requested data and the assigned id for a route.
Request data
HTTPS method: POST
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routes?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routes?key={Your_API_Key}
Request curl example
curl -XPOST 'https://api.tomtom.com/routemonitoring/3/routes?key={Your_API_Key}'
POST body example
1{2 "name": "Test Route",3 "pathPoints": [4 {5 "latitude": 51.76041,6 "longitude": 19.47217 },8 {9 "latitude": 51.76002,10 "longitude": 19.4728111 },12 {13 "latitude": 51.75961,14 "longitude": 19.4731215 }16 ]17}
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
POST request body fields
Field | Description |
---|---|
| Name for a newly created route. |
| Two or more (start, end, and via) points describing a route. Without via points there is no guarantee that the route created using internal routing is the route you want to measure. Use the preview endpoint to check route geometry before creation. Value: Latitude, longitude pair (in EPSG4326 projection), with the following constraints:
|
Deprecated* | Deprecated |
Response data
Example response
1{2 "routeId": 123,3 "routeName": "Test Route",4 "routeStatus": "NEW",5 "routeLength": 161,6 "pathPoints": [7 {8 "latitude": 51.76041,9 "longitude": 19.472110 },11 {12 "latitude": 51.76002,13 "longitude": 19.4728114 },15 {16 "latitude": 51.75959,17 "longitude": 19.4731218 }19 ],20 "routedPathPoints": [21 {22 "latitude": 51.76041,23 "longitude": 19.472124 },25 {26 "latitude": 51.76048,27 "longitude": 19.472728 },29 {30 "latitude": 51.7603,31 "longitude": 19.4727432 },33 {34 "latitude": 51.7599,35 "longitude": 19.4728336 },37 {38 "latitude": 51.75957,39 "longitude": 19.4728940 },41 {42 "latitude": 51.75961,43 "longitude": 19.4731244 }45 ]46}
Response fields
Field | Description |
---|---|
| Unique id of a route. |
| Confirmation of route name. |
| Status of this route (See: Route Statuses at the bottom of this page). |
| Calculated length of a route in meters. |
| Start and end points. |
| Deprecated. |
Listing all of a client's routes
The response contains an array of all routes created with the given API Key and basic information about each of them. It excludes deleted routes (in ARCHIVED status - see: Route Statuses at the bottom of this page).
Request data
HTTPS method: GET
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routes?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routes?key={Your_API_Key}
Request curl example
curl 'https://api.tomtom.com/routemonitoring/3/routes?key={Your_API_Key}'
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
Response data
Response example
1[2 {3 "routeId": 123,4 "routeName": "Test Route",5 "routeStatus": "ACTIVE",6 "routePathPoints": [7 {8 "latitude": 51.76041,9 "longitude": 19.472110 },11 {12 "latitude": 51.75959,13 "longitude": 19.4731214 }15 ],16 "travelTime": 19,17 "typicalTravelTime": 19,18 "delayTime": 2,19 "passable": true,20 "routeLength": 161,21 "completeness": 89,22 "typicalTravelTimeCoverage": 8923 }24]
Response fields
Field | Description |
---|---|
| Unique id of a route. |
| Confirmation of the route name. |
| Status of this route (See: Route Statuses at the bottom of this page). |
| Start and end points. |
| Current travel time in seconds. |
| Typical travel time for the whole route at the given time based on TomTom Speed Profiles data. In case it is not available, the missing bits are replaced with current travel time when possible. When real time data is also not available, we use average historical travel time. |
| Traffic delay in seconds. It is the difference between the travel time calculated using all available traffic information and travel time calculated without the influence of current traffic |
| Is route passable at given time? If the route is impassable, then all values that summarize the entire route are calculated excluding closed section. |
| Calculated length of a route in meters. |
| Percentage of a route that is covered with current traffic flow data. For some local roads current traffic can be unavailable and is not taken into account. |
| Percentage of a route that is covered with Speed Profiles data used to calculate Typical Travel Time. |
Get short data for a given route
The response contains basic information about the active route given in a request path. If the route is not in ACTIVE status, the response lacks traffic information (see: Route Statuses at the bottom of this page).
Request data
HTTPS method: GET
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routes/{routeId}?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routes/123?key={Your_API_Key}
Request curl example
curl 'https://api.tomtom.com/routemonitoring/3/routes/123?key={Your_API_Key}'
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
| The route ID. Value: Example: |
Response data
Response example
1{2 "routeId": 123,3 "routeName": "Test Route",4 "routeStatus": "ACTIVE",5 "routePathPoints": [6 {7 "latitude": 51.76041,8 "longitude": 19.47219 },10 {11 "latitude": 51.75959,12 "longitude": 19.4731213 }14 ],15 "travelTime": 19,16 "typicalTravelTime": 19,17 "delayTime": 2,18 "passable": true,19 "routeLength": 161,20 "completeness": 89,21 "typicalTravelTimeCoverage": 8922}
Response fields
Field | Description |
---|---|
| Unique id of a route. |
| Confirmation of route name. |
| Status of this route (See: Route Statuses at the bottom of this page). |
| Start and end points. |
| Current travel time in seconds. |
| Typical travel time for the whole route at the given time based on TomTom Speed Profiles data. In case it is not available, the missing bits are replaced with current travel time when possible. When real time data is also not available, we use average historical travel time. |
| Traffic delay in seconds. It is the difference between the travel time calculated using all available traffic information and travel time calculated without the influence of current traffic. |
| Is the route passable at the given time? If the route is impassable, then all values that summarize the entire route are calculated excluding the closed section. |
| Calculated length of a route in meters. |
| Percentage of route that is covered with current traffic flow data. For some local roads current traffic can be unavailable and is not taken into account. |
| Percentage of route that is covered with Speed Profiles data used to calculate Typical Travel Time. |
Get detailed data for a given route
The response contains detailed information about the active route given in the request path including data for individual segments. If OpenLR is not available for some local roads, then the data does not include current traffic information.
Request data
HTTPS method: GET
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routes/{routeId}/details?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routes/123/details?key={Your_API_Key}
Request curl example
curl 'https://api.tomtom.com/routemonitoring/3/routes/123/details?key={Your_API_Key}'
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
| The route ID. Value: Example: |
Response data
Response example - JSON
1{2 "routeId": 1,3 "routeName": "Test Route",4 "routeStatus": "ACTIVE",5 "routePathPoints": [6 {7 "latitude": 51.76041,8 "longitude": 19.47219 },10 {11 "latitude": 51.75959,12 "longitude": 19.4731213 }14 ],15 "passable": true,16 "routeLength": 151,17 "travelTime": 21,18 "delayTime": 5,19 "typicalTravelTime": 20,20 "completeness": 91,21 "routeConfidence": 82,22 "typicalTravelTimeCoverage": 100,23 "detailedSegments": [24 {25 "segmentId": 1186178914586853376,26 "segmentIdStr": "1186178914586853376",27 "averageSpeed": 55,28 "typicalSpeed": 51,29 "segmentLength": 26,30 "openLrId": "Cw3YMiTOphpnBAF5ACEaFw==",31 "currentSpeed": 57,32 "relativeSpeed": 98,33 "confidence": 100,34 "openLrLength": 262,35 "shape": [36 {37 "latitude": 51.76041,38 "longitude": 19.472139 },40 {41 "latitude": 51.76045,42 "longitude": 19.4724743 }44 ]45 },46 {47 "segmentId": 1186178914586755072,48 "segmentIdStr": "1186178914586755072",49 "averageSpeed": 54,50 "typicalSpeed": 51,51 "segmentLength": 9,52 "openLrId": "Cw3YMiTOphpnBAF5ACEaFw==",53 "currentSpeed": 57,54 "relativeSpeed": 98,55 "confidence": 100,56 "openLrLength": 262,57 "shape": [58 {59 "latitude": 51.76045,60 "longitude": 19.4724761 },62 {63 "latitude": 51.76046,64 "longitude": 19.472665 }66 ]67 },68 {69 "segmentId": 1186178913858912256,70 "segmentIdStr": "1186178913858912256",71 "averageSpeed": 26,72 "typicalSpeed": 26,73 "segmentLength": 25,74 "openLrId": "Cw3Y4STOtTvtCABn/k87Hw==",75 "currentSpeed": 23,76 "relativeSpeed": 71,77 "confidence": 76,78 "openLrLength": 488,79 "shape": [80 {81 "latitude": 51.76046,82 "longitude": 19.472683 },84 {85 "latitude": 51.76026,86 "longitude": 19.4727787 }88 ]89 },90 {91 "segmentId": 1186178914150940672,92 "segmentIdStr": "1186178914150940672",93 "averageSpeed": 26,94 "typicalSpeed": 25,95 "segmentLength": 40,96 "openLrId": "Cw3Y4STOtTvtCABn/k87Hw==",97 "currentSpeed": 23,98 "relativeSpeed": 71,99 "confidence": 76,100 "openLrLength": 488,101 "shape": [102 {103 "latitude": 51.76026,104 "longitude": 19.47277105 },106 {107 "latitude": 51.7599,108 "longitude": 19.47283109 }110 ]111 },112 {113 "segmentId": 1186178914151202816,114 "segmentIdStr": "1186178914151202816",115 "averageSpeed": 25,116 "typicalSpeed": 24,117 "segmentLength": 37,118 "openLrId": "Cw3Y4STOtTvtCABn/k87Hw==",119 "currentSpeed": 23,120 "relativeSpeed": 71,121 "confidence": 76,122 "openLrLength": 488,123 "shape": [124 {125 "latitude": 51.7599,126 "longitude": 19.47283127 },128 {129 "latitude": 51.75957,130 "longitude": 19.47289131 }132 ]133 },134 {135 "segmentId": 1186178913858781184,136 "segmentIdStr": "1186178913858781184",137 "averageSpeed": 20,138 "typicalSpeed": 19,139 "segmentLength": 14,140 "shape": [141 {142 "latitude": 51.75957,143 "longitude": 19.47289144 },145 {146 "latitude": 51.7596,147 "longitude": 19.47309148 }149 ]150 }151 ]152}
Response fields
Field | Description |
---|---|
| Unique id of a route. |
| Confirmation of route name. |
| Status of this route (See: Route Statuses at the bottom of this page). |
| Start and end points. |
| Current travel time in seconds. |
| Traffic delay in seconds. It is the difference between the travel time calculated using all available traffic information and travel time calculated without the influence of current traffic. |
| Typical travel time for the whole route at the given time based on TomTom Speed Profiles data. In case it is not available, the missing bits are replaced with current travel time when possible. When real time data is also not available, we use average historical travel time. |
| Is the route passable at the given time? If the route is impassable, then all values that summarize the entire route are calculated excluding the closed section. |
| Calculated length of a route in meters. |
| Percentage of the route that is covered with current traffic flow data. For some local roads current traffic can be unavailable and is not taken into account. |
| Average confidence of current traffic data. The confidence is a measure of the quality of the provided travel time and speed. A value of 100 means full confidence, that the response contains the highest quality data. Lower values indicate the degree that the response may vary from the actual conditions on the road. |
| Percentage of the route that is covered with Speed Profiles data used to calculate Typical Travel Time or Typical Speed. |
| An array of segments that make up a whole route and detailed information about current traffic on it. |
| Segment id. |
| String representation of the segmentId field. Can be used to avoid JavaScript parsing problems on frontend applications. |
| The average historical speed on the given segment (in kilometers per hour). |
| Typical speed at the given time based on TomTom Speed Profiles data. |
| The length of a segment (in meters). |
| OpenLR code for segment if available. |
| The current average speed at given segment (in kilometers per hour). |
| Current speed presented as a percentage of the free flow speed. This is the speed expected under ideal conditions (typically at night). |
| The confidence is a measure of the quality of the provided travel time and speed. A value of 100 means full confidence, and that the response contains the highest quality data. Lower values indicate the degree that the response may vary from the actual conditions on the road. |
| Length of a whole OpenLR segment described with the given OpenLR id (in meters). |
| Detailed list of points that define the given route fragment. |
Edit existing route
The request path, request body, and response are identical as in route creation.
Request data
HTTPS method: PUT
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routes/{routeId}?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routes/123?key={Your_API_Key}
Request curl example
curl -XPUT 'https://api.tomtom.com/routemonitoring/3/routes/123?key={Your_API_Key}'
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
| The route ID. Value: Example: |
Remove existing route
The response contains no data. Only the correct status code is a confirmation.
Request data
HTTPS method: DELETE
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routes/{routeId}?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routes/123?key={Your_API_Key}
Request curl example
curl -XDELETE 'https://api.tomtom.com/routemonitoring/3/routes/123?key={Your_API_Key}'
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
| The route ID. Value: Example: |
Route Statuses
Status | Description |
---|---|
| A new route was requested by the user; the route data is processed at the moment. |
| Route is created and fully functional. Only routes in this status should be queried for travel times. |
| Update to the route definition was requested but the route is not updated yet. |
| Map matching failed for the given path points; the route can't be created. These routes should be deleted or updated with new geometry. |
| Route was deleted and is not active anymore. |
Get route preview
The response contains the geometry of a route which can be created for given path points.
Request data
HTTPS method: POST
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values.
Request URL format
https://{baseURL}/routemonitoring/{version}/routing?key={Your_API_Key}
Request URL example
https://api.tomtom.com/routemonitoring/3/routing?key={Your_API_Key}
Request curl example
curl -XPOST 'https://api.tomtom.com/routemonitoring/3/routing?key={Your_API_Key}'
POST body example
1{2 "pathPoints": [3 {4 "latitude": 51.73253,5 "longitude": 19.367126 },7 {8 "latitude": 51.73601,9 "longitude": 19.3657210 }11 ]12}
Request parameters
Required parameters must be used or the call will fail. There are no optional parameters in this endpoint.
Required parameters | Description |
---|---|
| Base URL for calling TomTom services. Value: |
| The version of the service to call. Value: The current version is |
| An API Key valid for the requested service. Value: Your valid |
POST request body fields
Field | Description |
---|---|
| Two or more (start, end, and via) points describing a route. Value: Latitude, longitude pair (in EPSG4326 projection), with the following constraints:
|
Response data
Example response
1{2 "route": [3 {4 "latitude": 51.73252,5 "longitude": 19.367126 },7 {8 "latitude": 51.73423,9 "longitude": 19.3664710 },11 {12 "latitude": 51.73601,13 "longitude": 19.3657314 }15 ],16 "length": 400,17 "mapVersion": "2023.06.006",18 "segments": [19 "1186178914044641281"20 ]21}
Response fields
Field | Description |
---|---|
| Detailed list of points creating the route path. |
| Calculated length of a route in meters. |
| Map version used to generate route. |
| List of map segments used to prepare route. |