Incident Details (Deprecated)

Service version: 4
Last edit: 2022.08.15

Deprecation notice

April 13, 2021

  • The version 4 of Traffic Incident Details endpoint has been deprecated.
  • This endpoint will be withdrawn following a 12 months deprecation period.
  • The planned withdrawal date is April 13, 2022.
  • Following withdrawal, requests to this endpoint may receive an HTTP 404 error in response.

We recommend using version 5 of the Traffic Incident Details endpoint.

Purpose

This service provides information on traffic incidents whose bounding box intersects with a given bounding box, based on the given Traffic Model ID.

Run this endpoint

You can easily run this and other endpoints. Go to the TomTom API Explorer page and follow the directions.

Clustering

Clustering is the grouping of nearby or overlapping incidents. It is performed when a high density of incidents occurs, usually when the value of a zoom level is low. The clustering algorithm differs slightly between styles.

  • Styles s0, s0-dark, s1, and s2 use the same algorithm.
  • Style night does not group incidents into clusters.

When clustering is performed, the distances between the starting points of the incidents are taken into consideration. The bounding box coordinates of a cluster: bottom-left and top-right, are calculated based on the starting points of the incidents which make up the cluster. If the incident has shape/length, its end point might appear outside of the cluster.

Response creation

The response contains incidents and clusters of incidents belonging to a given bounding box. The following rules must be met to have a particular incident or cluster in the response.

  • If the incident does not have a shape/length, it must be located inside the bounding box.
  • If the incident has a shape/length, its bounds must intersect with the requested bounding box.
  • If at least one incident of a cluster meets these requirements, the whole cluster is qualified as belonging to the bounding box.
  • If a cluster belongs to the requested bounding box, and the expandCluster option is used, all of the incidents from that particular cluster appear in the cluster expansion, not only those belonging to the requested bounding box.

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. The generic request format is as follows.

URL format

get
Request URL
https://{baseURL}/traffic/services/{versionNumber}/incidentDetails/{style}/{boundingBox}/{zoom}/{trafficModelID}/{format}?key={Your_Api_Key}&language={language}&projection={projection}&geometries={geometries}&expandCluster={expandCluster}&originalPosition={originalPosition}&jsonp={jsonp}

Example

get
Request URL example
https://api.tomtom.com/traffic/services/4/incidentDetails/s3/6841263.950712,511972.674418,6886056.049288,582676.925582/11/1335294634919/xml?key={Your_Api_Key}

curl command format

get
Request curl command
curl 'https://{baseURL}/traffic/services/{versionNumber}/incidentDetails/{style}/{boundingBox}/{zoom}/{trafficModelID}/{format}?key={Your_Api_Key}&language={language}&projection={projection}&geometries={geometries}&expandCluster={expandCluster}&originalPosition={originalPosition}&jsonp={jsonp}'

Request parameters

The following table describes all of the parameters that can be used in a request.

  • Parameters and values are case-sensitive.
  • Required parameters must be used or the call will fail.
  • Optional parameters may be used.
Required parametersDescription

baseURL
string

The base URL for calling the API.
Values:

versionNumber
string

The service version number.
Value: The current value is 4.

style
string

The style used with Raster Incident Tiles and Vector Incident Tiles. This has an effect on the coordinates and encoded geometry of traffic incidents in the response.
Values:

  • s0
  • s0-dark
  • s1
  • s2
  • s3
  • night

boundingBox
float

The corners of the area to report on, expressed in the projection specified. These are two latitude-longitude pairs describing corners of the bounding box. The first pair is for the lower-left corner and the second pair for the upper-right corner. All values should be separated by commas. If the width or height exceeds maximum size, it is trimmed to the maximum allowed size. See th Maximum bounding box section for details.
Values: minY,minX,maxY,maxX, or minLat,minLon,maxLat,maxLon.

zoom
integer

This is the zoom level. This will affect traffic incident coordinates and determine which incidents are included in clusters rather than reported separately.
Value: 0..22

trafficModelID
string

The Traffic Model ID is the reference value for the state of traffic at a particular time. It can be obtained from the Viewport API. It is updated every minute, and is valid for two minutes before it times out. An invalid value of the Traffic Model ID or a value equal to -1 always invokes the most recent traffic model. See the Response headers section for more information.
Values: Traffic model ID or -1.

format
string

The content type of the response structure. If the content type is jsonp, a callback method must be specified at the end of the service call.
Values:

  • xml
  • json
  • jsonp

key
string

The authorization key for access to the API.
Value: Your valid API Key.

Optional parametersDescription
language
string

The ISO 639-1 code for the output language. Affects the <c> (cause) and <d> (description) fields in the response.

  • When an invalid language code is provided the response is returned in English.
  • When an incident cause or description does not have a translation, an English description is returned.
  • Languages marked with * (an asterisk) are deprecated.

Default value: en
Other values: ar, ca, cs, da, de, el, en, en-GB, en-US, es, et, fi, fr, he, hu,
id, in*, it, iw*, lt, lv, nb, nl, no, pl, pt, ro, ru, sk, sv, th, tr, zh

projection
string

The projection used to specify the coordinates in the request and response.
Default value: EPSG900913
Other value: EPSG4326

geometries
string

The type of vector geometry added to incidents (returned in the <v> element of the response).

  • original places incidents precisely on the road.
  • shifted moves the incident slightly (depending on the zoom level) to indicate specific road lanes.

If this parameter is not used, the response will not contain a <v> element.
Values: original and shifted

expandCluster
boolean

This separately lists all traffic incidents in a cluster.
Default Value: false
Other value: true

originalPosition
boolean

This returns the original position of the incident (<op>) as well as the one shifted to the beginning of the traffic tube (<p>).
Default Value: false
Other value: true

jsonp
string

Specifies the callback method. Only used where the contentType is jsonp.
Value: An asynchronous or synchronous function.

Maximum bounding box

In an EPSG:900913 projection we use an extent of the world from -20037508.34 to 20037508.34 in each direction. On each zoom level the world is divided into 2zoom x 2zoom tiles. The maximum allowed size of the requested bounding box is a square of size 16 x 16 tiles. For zoom level 5 and greater, the width and height cannot exceed 40075016.68 / 2zoom - 4. An XSD response schema is available for download.

Query with XML cluster

get
Query
https://api.tomtom.com/traffic/services/4/incidentDetails/s3/6841263.950712,511972.674418,6886056.049288,582676.925582/11/1335294634919/xml?key={Your_Api_Key}
get
XML cluster
1<tm id=&quot;1400168040337&quot;>
2 <poi>
3 <id>CLUSTER_581</id>
4 <p>
5 <x>294962.2</x>
6 <y>6535338.8</y>
7 </p>
8 <ic>13</ic>
9 <ty>1</ty>
10 <cbl>
11 <x>294223.5</x>
12 <y>6535005.4</y>
13 </cbl>
14 <ctr>
15 <x>295700.9</x>
16 <y>6535672.3</y>
17 </ctr>
18 <cs>2</cs>
19 <l>7430</l>
20 </poi>
21 <poi>
22 <id>CLUSTER_325</id>
23 <p>
24 <x>314807.6</x>
25 <y>6538765.0</y>
26 </p>
27 <ic>13</ic>
28 <ty>1</ty>
29 <cbl>
30 <x>313078.2</x>
31 <y>6538198.4</y>
32 </cbl>
33 <ctr>
34 <x>316536.9</x>
35 <y>6539331.6</y>
36 </ctr>
37 <cs>3</cs>
38 <l>2850</l>
39 </poi>
40 [...]
41</tm>

Query with expanded cluster

get
Query
https://api.tomtom.com/traffic/services/4/incidentDetails/s3/6841263.950712,511972.674418,6886056.049288,582676.925582/11/1335294634919/xml?key={Your_Api_Key}&language=en&expandCluster=true
get
Expanded XML cluster
1<tm id=&quot;1400168682560&quot;>
2 <poi>
3 <id>TTR826194</id>
4 <p>
5 <x>581415.6</x>
6 <y>6535660.9</y>
7 </p>
8 <ic>6</ic>
9 <ty>3</ty>
10 <cs>0</cs>
11 <d>stationary traffic</d>
12 <f>Rue Joseph Wauters</f>
13 <t>Rue du Pont</t>
14 <l>1100</l>
15 <dl>558</dl>
16 <r>N90</r>
17 </poi>
18 <poi>
19 <id>CLUSTER_244</id>
20 <p>
21 <x>543483.8</x>
22 <y>6537828.8</y>
23 </p>
24 <ic>13</ic>
25 <ty>1</ty>
26 <cbl>
27 <x>543112.0</x>
28 <y>6537745.5</y>
29 </cbl>
30 <ctr>
31 <x>543855.5</x>
32 <y>6537912.2</y>
33 </ctr>
34 <cs>2</cs>
35 <cpoi>
36 <id>TTR775657</id>
37 <p>
38 <x>543855.5</x>
39 <y>6537912.2</y>
40 </p>
41 <ic>9</ic>
42 <ty>1</ty>
43 <cs>0</cs>
44 <d>roadworks</d>
45 <f>Daussoulx - A4 - E411 (A15)</f>
46 <t>Fleurus - N29 (A15)</t>
47 <l>460</l>
48 <dl>12</dl>
49 <r>A15/E42</r>
50 </cpoi>
51 [...]
52 <l>11840</l>
53 </poi>
54 [...]
55</tm>

Query with geometries and original positions

get
Query with geometries and original positions
https://api.tomtom.com/traffic/services/4/incidentDetails/s3/6841263.950712,511972.674418,6886056.049288,582676.925582/10/1335294634919/xml?key={Your_Api_Key}&language=en&originalPosition=true&geometries=original
get
XML
1<tm id=&quot;1400168426640&quot;>
2 <poi>
3 <id>TTL826194</id>
4 <p>
5 <x>581415.6</x>
6 <y>6535660.9</y>
7 </p>
8 <op>
9 <x>581687.8</x>
10 <y>6536208.0</y>
11 </op>
12 <ic>6</ic>
13 <ty>3</ty>
14 <cs>0</cs>
15 <d>stationary traffic</d>
16 <f>Rue Joseph Wauters</f>
17 <t>Rue du Pont</t>
18 <l>1100</l>
19 <dl>558</dl>
20 <r>N90</r>
21 <v>obob@_`}mKcy@zAe_@kc@</v>
22 </poi>
23 <poi>
24 <id>CLUSTER_489</id>
25 <p>
26 <x>545350.3</x>
27 <y>6538010.8</y>
28 </p>
29 <ic>6</ic>
30 <ty>1</ty>
31 <cbl>
32 <x>543311.4</x>
33 <y>6537799.6</y>
34 </cbl>
35 <ctr>
36 <x>547389.1</x>
37 <y>6538221.9</y>
38 </ctr>
39 <cs>2</cs>
40 <l>13450</l>
41 </poi>
42 [...]
43</tm>

Request headers

The following table lists HTTP request headers of particular interest to clients of the Traffic Incident Details API endpoint. Note: There are no required headers in this endpoint.

Optional headersDescription

Accept-Encoding

Contains the content encoding (usually a compression algorithm), that the client is able to understand.
Value: gzip

Tracking-ID

Specifies an identifier for the request. It can be used to trace a call. The value must match the regular expression '^[a-zA-Z0-9-]{1,100}$'. An example of the format that matches this regular expression is a UUID (e.g.,9ac68072-c7a4-11e8-a8d5-f2801f1b9fd1). For details check RFC 4122. If specified, it is replicated in the Tracking-ID response header. It is only meant to be used for support and does not involve tracking of you or your users in any form.
Value: <string>

Response data

Successful response

The Incident Details API endpoint for a valid single request returns a response in XML, JSON, or JSONP format.

XML response body example

The following XML code block demonstrates a successful response from the API server.

Response body example - XML
1<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
2<tm id=&quot;1547074766&quot;>
3 <poi>
4 <id>CLUSTER_33392</id>
5 <p>
6 <x>512354.976551</x>
7 <y>6884986.940485</y>
8 </p>
9 <ic>8</ic>
10 <ty>0</ty>
11 <cbl>
12 <x>511745.745125</x>
13 <y>6884720.789894</y>
14 </cbl>
15 <ctr>
16 <x>513401.986901</x>
17 <y>6885342.552247</y>
18 </ctr>
19 <cs>6</cs>
20 <l>2696</l>
21 </poi>
22 <poi>
23 <id>CLUSTER_33403</id>
24 <p>
25 <x>517237.055551</x>
26 <y>6870392.648994</y>
27 </p>
28 <ic>8</ic>
29 <ty>0</ty>
30 <cbl>
31 <x>515710.491318</x>
32 <y>6867515.929648</y>
33 </cbl>
34 <ctr>
35 <x>517914.903365</x>
36 <y>6871902.425883</y>
37 </ctr>
38 <cs>4</cs>
39 <l>411</l>
40 </poi>
41 <poi>
42 <id>CLUSTER_33402</id>
43 <p>
44 <x>517150.851569</x>
45 <y>6881480.091051</y>
46 </p>
47 <ic>8</ic>
48 <ty>0</ty>
49 <cbl>
50 <x>516350.492186</x>
51 <y>6881120.810646</y>
52 </cbl>
53 <ctr>
54 <x>518692.437802</x>
55 <y>6881832.873844</y>
56 </ctr>
57 <cs>3</cs>
58 <l>1025</l>
59 </poi>
60 <poi>
61 <id>CLUSTER_33423</id>
62 <p>
63 <x>529447.048060</x>
64 <y>6857232.393076</y>
65 </p>
66 <ic>9</ic>
67 <ty>0</ty>
68 <cbl>
69 <x>528826.289152</x>
70 <y>6856307.652093</y>
71 </cbl>
72 <ctr>
73 <x>529833.400081</x>
74 <y>6858338.803512</y>
75 </ctr>
76 <cs>4</cs>
77 <l>1075</l>
78 </poi>
79 <poi>
80 <id>CLUSTER_33435</id>
81 <p>
82 <x>533877.803565</x>
83 <y>6847601.642198</y>
84 </p>
85 <ic>9</ic>
86 <ty>0</ty>
87 <cbl>
88 <x>533583.591781</x>
89 <y>6847294.516114</y>
90 </cbl>
91 <ctr>
92 <x>534179.588277</x>
93 <y>6847972.372258</y>
94 </ctr>
95 <cs>3</cs>
96 <l>1311</l>
97 </poi>
98 <poi>
99 <id>CLUSTER_33446</id>
100 <p>
101 <x>538577.636873</x>
102 <y>6863390.768564</y>
103 </p>
104 <ic>8</ic>
105 <ty>0</ty>
106 <cbl>
107 <x>538425.877523</x>
108 <y>6863386.945121</y>
109 </cbl>
110 <ctr>
111 <x>538729.396223</x>
112 <y>6863394.592007</y>
113 </ctr>
114 <cs>2</cs>
115 <l>410</l>
116 </poi>
117 <poi>
118 <id>CLUSTER_33456</id>
119 <p>
120 <x>542265.387307</x>
121 <y>6856551.318714</y>
122 </p>
123 <ic>8</ic>
124 <ty>0</ty>
125 <cbl>
126 <x>541943.148612</x>
127 <y>6854726.986925</y>
128 </cbl>
129 <ctr>
130 <x>542715.162598</x>
131 <y>6857564.210354</y>
132 </ctr>
133 <cs>3</cs>
134 <l>440</l>
135 </poi>
136 <poi>
137 <id>CLUSTER_33464</id>
138 <p>
139 <x>546234.746514</x>
140 <y>6868186.871228</y>
141 </p>
142 <ic>8</ic>
143 <ty>0</ty>
144 <cbl>
145 <x>543178.243594</x>
146 <y>6866848.946271</y>
147 </cbl>
148 <ctr>
149 <x>548302.497041</x>
150 <y>6868941.887530</y>
151 </ctr>
152 <cs>7</cs>
153 <l>1556</l>
154 </poi>
155 <poi>
156 <id>CLUSTER_33462</id>
157 <p>
158 <x>545331.140269</x>
159 <y>6863789.557397</y>
160 </p>
161 <ic>8</ic>
162 <ty>0</ty>
163 <cbl>
164 <x>544641.588036</x>
165 <y>6862180.913406</y>
166 </cbl>
167 <ctr>
168 <x>545889.528685</x>
169 <y>6865071.521013</y>
170 </ctr>
171 <cs>4</cs>
172 <l>1699</l>
173 </poi>
174 <poi>
175 <id>CLUSTER_33475</id>
176 <p>
177 <x>558182.248353</x>
178 <y>6862716.890855</y>
179 </p>
180 <ic>13</ic>
181 <ty>0</ty>
182 <cbl>
183 <x>557855.480057</x>
184 <y>6861613.063583</y>
185 </cbl>
186 <ctr>
187 <x>558460.553450</x>
188 <y>6864045.299127</y>
189 </ctr>
190 <cs>4</cs>
191 <l>1741</l>
192 </poi>
193 <poi>
194 <id>CLUSTER_33483</id>
195 <p>
196 <x>565149.005750</x>
197 <y>6852972.834871</y>
198 </p>
199 <ic>9</ic>
200 <ty>0</ty>
201 <cbl>
202 <x>563920.280520</x>
203 <y>6852693.274072</y>
204 </cbl>
205 <ctr>
206 <x>566437.500489</x>
207 <y>6853356.309469</y>
208 </ctr>
209 <cs>3</cs>
210 <l>4191</l>
211 </poi>
212 <poi>
213 <id>CLUSTER_33494</id>
214 <p>
215 <x>573507.430180</x>
216 <y>6860948.908434</y>
217 </p>
218 <ic>8</ic>
219 <ty>0</ty>
220 <cbl>
221 <x>573163.215840</x>
222 <y>6860188.402379</y>
223 </cbl>
224 <ctr>
225 <x>573766.059820</x>
226 <y>6861683.260720</y>
227 </ctr>
228 <cs>3</cs>
229 <l>1613</l>
230 </poi>
231 <poi>
232 <id>TTR115943260378400</id>
233 <p>
234 <x>529749.372431</x>
235 <y>6869475.880073</y>
236 </p>
237 <ic>9</ic>
238 <ty>0</ty>
239 <cs>0</cs>
240 <d>roadworks</d>
241 <ed>2019-08-21T19:00:00Z</ed>
242 <c>new roadworks layout</c>
243 <f>Halfweg (Amsterdamsestraatweg/N200)</f>
244 <t>IJmuiden (N200)</t>
245 <l>2871</l>
246 <r>N200</r>
247 <v>uev~Hsm`\?A?M?SC{HCiEEmQGoR?s@Yiw@CeIQkc@GeNCqHAwHA{CCoJCuBCkLCcMAgB@yBAiAAqAAcA?oA@e@@a@By@By@?C</v>
248 </poi>
249 <poi>
250 <id>TTR115952494119200</id>
251 <p>
252 <x>534626.495903</x>
253 <y>6870270.772352</y>
254 </p>
255 <ic>9</ic>
256 <ty>0</ty>
257 <cs>0</cs>
258 <d>roadworks</d>
259 <c>new roadworks layout</c>
260 <f>IJmuiden (N200)</f>
261 <t>Halfweg (Amsterdamsestraatweg/N200)</t>
262 <l>2803</l>
263 <r>N200</r>
264 <v>kiv~Ha`i\@pB?V^p@^dAAb@?r@@lG@nEBtLBxF@rDB~IBtKBdG?fB@nEn@bzB^r@FnRDfS</v>
265 </poi>
266 <poi>
267 <id>TTR116303363161648</id>
268 <p>
269 <x>557832.961139</x>
270 <y>6855083.799009</y>
271 </p>
272 <ic>9</ic>
273 <ty>0</ty>
274 <cs>0</cs>
275 <d>roadworks</d>
276 <c>new roadworks layout</c>
277 <f>Diemen/Driemond (N236)</f>
278 <t>Weesp (N236)</t>
279 <l>88</l>
280 <r>N236</r>
281 <v>qrf~Hufr]HIBEFUH[DY@]Ba@BSDSLg@No@?Q</v>
282 </poi>
283 <poi>
284 <id>TTR116294132609280</id>
285 <p>
286 <x>585903.630533</x>
287 <y>6865511.636265</y>
288 </p>
289 <ic>9</ic>
290 <ty>0</ty>
291 <cs>0</cs>
292 <d>roadworks</d>
293 <c>new roadworks layout</c>
294 <f>Almere-Buiten-West - N703 (A6)</f>
295 <t>Almere-Stedenwijk (A6)</t>
296 <l>4786</l>
297 <r>A6</r>
298 <v>khq~Hmic_@JZ`ApCNd@F|@d@bB\pAf@hBPn@n@|BzC~JnAdEnAjEJZJ\Lb@f@nBx@bDPr@^zAd@|Bl@xCJl@RjAh@~C|@hGLdAXfCb@hDJjAPrBV|Ch@|JHnDBvA@VB|@@p@FlE^~F^fHChAMlGC~@OrCM|COnCKxAI~@SfCm@jGEb@Iv@O~AeAtKUzC_@pEEj@IvAYnEE|@K`COnDAj@IhDCr@?NAd@GvCCtCAZ?^AfJBfEJpHJrDJzD^~IP~BJrABTDh@ZjExAnNx@jHn@jETtA`AvFr@dDl@zCb@lBz@tDBLZjAVbAH\n@pC</v>
299 </poi>
300</tm>

Response field structure

The following table describes XML or JSON element fields that can appear in a response. The types of the fields refer to a JSON response.

FieldDescription

<tm>
object

The main response element. The attribute id is the current traffic model. It may be different than the one in the request, since the model refreshes every two minutes.

<poi>
array

A single traffic incident, or a cluster of traffic incidents.

<cpoi>
array

A single incident, only within an expanded cluster.

<id>
string

The ID of the traffic incident, common among Traffic Incident API services where it is available.

<p>
object

The point where an icon of the cluster or raw incident should be drawn, expressed in the requested projection. In the case of a cluster, this is its center. In the case of an incident which has a shape/length, this is its starting point. The point is also affected by:

  • Traffic style
  • Zoom level
  • Road type

<op>
object

The point representing the actual position of the incident, expressed in the required projection. In the case of a cluster, this is its center. In the case of an incident which has a shape/length, this is its starting point. This is only returned if the originalPosition value is a boolean true.

<ic>
integer

The icon category associated with this incident. Values are numbers in the range 0-14, with the following meanings:

  • 0: Unknown
  • 1: Accident
  • 2: Fog
  • 3: Dangerous Conditions
  • 4: Rain
  • 5: Ice
  • 6: Jam
  • 7: Lane Closed
  • 8: Road Closed
  • 9: Road Works
  • 10: Wind
  • 11: Flooding
  • 13: Cluster: Returned if a cluster contains incidents with different icon categories.
  • 14: Broken Down Vehicle

<ty>
integer

The magnitude of delay associated with an incident.
Values can be:

  • 0: Unknown
  • 1: Minor
  • 2: Moderate
  • 3: Major
  • 4: Undefined (used for road closures and other indefinite delays)

<cbl>
object

Bottom-left coordinate of the cluster in the projection of the request.

<ctr>
object

Top-right coordinate of the cluster in the projection of the request.

<cs>
integer

Cluster size: The number of incidents in the cluster.

<d>
string

Description of the incident in the language requested.

<sd>
string

Start date of the incident, if available. The date is described in the ISO8601 format.

<ed>
string

Estimated end date of the incident, if available. The date is described in the ISO8601 format.

<c>
string

Cause of the incident, if available, in the language requested.

<f>
string

From: The name of the intersection or location where the traffic due to the incident starts.

<t>
string

To: The name of the intersection or location where the traffic due to the incident ends.

<l>
integer

Length of the incident in meters.

<dl>
integer

Delay caused by the incident in seconds (except in road closures). It is calculated against free-flow travel time (the travel time when the traffic is minimal, e.g., night traffic).

<r>
string

The road number(s) affected by the incident. Multiple road numbers will delimited by slashes.

<v>
string

A vector representing the geometry of the incident.

  • Not available for clusters and incidents that do not have a shape/length.
  • Only returned if a valid geometries value is included in the request.
  • The vector is encoded with the Google Encoded Polyline Algorithm.

Error response

If there is an error in the supplied parameters or any other internal problem, an error response is generated in the requested format. If the contentType parameter could not be parsed, XML will be returned.

Error response field structure

FieldDescription

detailedError
object

Main object of the error response.

code
string

One of a server-defined set of error codes.

message
string

A human-readable description of the error code.
Error response example - JSON
1{
2 "errorResponse" : {
3 "@errorCode" : 400,
4 "@description" : "Invalid style."
5 },
6 "detailedError" : {
7 "code" : "INVALID_REQUEST",
8 "message" : "Invalid style."
9 }
10}
Error response example - XML
1<errorResponse description=&quot;Invalid style.&quot; errorCode=&quot;400&quot;>
2 <detailedError>
3 <code>INVALID_REQUEST</code>
4 <message>Invalid style.</message>
5 </detailedError>
6</errorResponse>

Response codes

CodeMeaning & possible causes
200OK
400Bad request, usually due to a malformed syntax.
403Forbidden: The supplied API Key is not valid for this request.
405Method Not Allowed: The provided HTTP request method is known by the server, but is not supported by the target resource.
429Too Many Requests: Too many requests were sent in a given amount of time for the supplied API Key.
500Internal Server Error

Response headers

The following table lists HTTP response headers of particular interest to clients of the Traffic Incident Details API endpoint.

HeaderDescription
Access-Control-Allow-Origin

Indicates that cross-origin resource sharing (CORS) is allowed.
Value: *

Allow

Lists the set of supported HTTP methods. The header is sent in case a 405 HTTP response code is returned.
Value: GET, HEAD

Content-Encoding

Indicates which encodings were applied to the response body.
Value: gzip

Cache-Control

Contains directives for a caching mechanism.
Values: <private, no-cache, no-store, max-age=0, must-revalidate>

Content-Length

Contains information about the size of the response body.
Value: <decimal number>

Content-Type

Indicates the media type of the resource returned.
Value:

  • <application/json; charset=utf-8>
  • <application/javascript; charset=utf-8>
  • <text/xml; charset=utf-8>

Content-Language

Indicates the language of the response body.
Value: <en>

Date

Contains the date and time when the message was originated.
Value: <http-date>

Expires

Contains the date after which the response is considered outdated.
Value: <http-date>

TrafficModelID

Contains the reference value for the state of traffic at a particular time. If the request contains a valid Traffic Model ID and is not equal to -1, its value is replicated here. If the request contains an invalid Traffic Model ID or is equal to -1, the most recent one is returned.
Value: <numeric>

Tracking-ID

An identifier for the request. If the Tracking-ID header was specified in the request, it is replicated in the response. Otherwise, it is generated automatically by the service. For details check RFC 4122. It is only meant to be used for support and does not involve tracking of you or your users in any form.
Value: <string>