Traffic API Developer's Guide

Localized Incident Data

The user wants to obtain traffic incident information for a tile at zoom level 8 representing an area near Frankfurt, Germany. Instead of using the default settings for incident time zone, date format and language, the intention is to localize the response to USA and include an English language version of the text.

Request

The c and lg specify the desired locale and language from supported list.

https://traffic.api.here.com/traffic/6.3/incidents/xml/8/134/86
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&c=US
&lg=en
&i18n=true
&localtime=true
&units=metric

Response

The response to the request contains a list of the following:
  • TRAFFIC_ITEM: traffic incident information about one active incident
<?xml version="1.0" encoding="UTF-8"?>
<TRAFFICML_INCIDENTS TIMESTAMP="05/30/2018 14:34:35" VERSION="2.4" TIMESTAMP2="2018-05-30T14:34:35Z" EXTENDED_COUNTRY_CODE="E0">
  <TRAFFIC_ITEMS>
    <TRAFFIC_ITEM mid="16016752_original|1527204973573" PRODUCT="basic">
     <TRAFFIC_ITEM_ID>1144065005844396636</TRAFFIC_ITEM_ID>
     <ORIGINAL_TRAFFIC_ITEM_ID>1144065005844396636</ORIGINAL_TRAFFIC_ITEM_ID>
     <TRAFFIC_ITEM_STATUS_SHORT_DESC>ACTIVE</TRAFFIC_ITEM_STATUS_SHORT_DESC>
     <TRAFFIC_ITEM_TYPE_DESC>CONSTRUCTION</TRAFFIC_ITEM_TYPE_DESC>
     <START_TIME>April 16, 2018 2:13:10 PM CEST</START_TIME>
     <END_TIME>December 13, 2018 6:00:09 PM CET</END_TIME>
     <ENTRY_TIME>May 25, 2018 1:36:13 AM CEST</ENTRY_TIME>
     <CRITICALITY>
      <ID>2</ID>
      <DESCRIPTION>minor</DESCRIPTION>
     </CRITICALITY>
     <VERIFIED>true</VERIFIED>
     <ABBREVIATION>
      <SHORT_DESC>CONST</SHORT_DESC>
      <DESCRIPTION>construction</DESCRIPTION>
     </ABBREVIATION>
     <COMMENTS>A70, Bamberg - Bayreuth in beiden Richtungen, zwischen Anschlussstelle Schirradorf und Anschlussstelle Thurnau-Ost, Bauarbeiten, Fahrstreifen gesperrt, (km 102.8 - km 104.9), Länge: 2.1 km, Geschwindigkeitsbegrenzung: 80 km/h, bis 13.12.2018 18:00 Uhr</COMMENTS>
     <RDS-TMC_LOCATIONS>
      <RDS-TMC>
         <ORIGIN>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12429</LOCATION_ID>
          <LOCATION_DESC>Stadelhofen</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </ORIGIN>
         <TO>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12431</LOCATION_ID>
          <LOCATION_DESC>Thurnau-Ost</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </TO>
         <DIRECTION>+</DIRECTION>
         <ALERTC>
          <TRAFFIC_CODE>500</TRAFFIC_CODE>
          <QUANTIFIERS>0</QUANTIFIERS>
          <DESCRIPTION>Lane closed</DESCRIPTION>
          <ALERTC_DURATION>L</ALERTC_DURATION>
          <ALERTC_DIRECTION>1</ALERTC_DIRECTION>
          <UPDATE_CLASS>5</UPDATE_CLASS>
          <PHRASE_CODE>D1</PHRASE_CODE>
          <EXTENT>2</EXTENT>
          <DURATION>0</DURATION>
         </ALERTC>
         <PRIMARY_OFFSET>0.24216</PRIMARY_OFFSET>
         <LENGTH>6.83685</LENGTH>
      </RDS-TMC>
      <RDS-TMC>
         <ORIGIN>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12429</LOCATION_ID>
          <LOCATION_DESC>Stadelhofen</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </ORIGIN>
         <TO>
          <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
          <TABLE_ID>1</TABLE_ID>
          <LOCATION_ID>12431</LOCATION_ID>
          <LOCATION_DESC>Thurnau-Ost</LOCATION_DESC>
          <RDS_DIRECTION>-</RDS_DIRECTION>
         </TO>
         <DIRECTION>+</DIRECTION>
         <ALERTC>
          <TRAFFIC_CODE>803</TRAFFIC_CODE>
          <QUANTIFIERS>0</QUANTIFIERS>
          <DESCRIPTION>Construction work</DESCRIPTION>
          <ALERTC_DURATION>L</ALERTC_DURATION>
          <ALERTC_DIRECTION>1</ALERTC_DIRECTION>
          <UPDATE_CLASS>11</UPDATE_CLASS>
          <PHRASE_CODE>E11</PHRASE_CODE>
          <EXTENT>2</EXTENT>
          <DURATION>0</DURATION>
         </ALERTC>
         <PRIMARY_OFFSET>0.24216</PRIMARY_OFFSET>
         <LENGTH>6.83685</LENGTH>
      </RDS-TMC>
     </RDS-TMC_LOCATIONS>
     <LOCATION>
      <DEFINED>
         <ORIGIN>
          <ROADWAY ID="50164">
           <DESCRIPTION TYPE="NTCSA">A70</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">A70</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">A70</DESCRIPTION>
          </ROADWAY>
          <POINT ID="12429">
           <DESCRIPTION TYPE="NTCSA">Stadelhofen</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">Stadelhofen</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">Stadelhofen</DESCRIPTION>
           <DESCRIPTION TYPE="BNAME">A70</DESCRIPTION>
          </POINT>
          <DIRECTION ID="0">
           <DESCRIPTION TYPE="LOCAL">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="NTCSA">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">BAYREUTH</DESCRIPTION>
          </DIRECTION>
          <PROXIMITY>
           <ID>AT</ID>
           <DESCRIPTION>at</DESCRIPTION>
          </PROXIMITY>
         </ORIGIN>
         <TO>
          <ROADWAY ID="50164">
           <DESCRIPTION TYPE="NTCSA">A70</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">A70</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">A70</DESCRIPTION>
          </ROADWAY>
          <POINT ID="12431">
           <DESCRIPTION TYPE="NTCSA">Thurnau-Ost</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">Thurnau-Ost</DESCRIPTION>
           <DESCRIPTION TYPE="LOCAL">Thurnau-Ost</DESCRIPTION>
           <DESCRIPTION TYPE="BNAME">A70</DESCRIPTION>
          </POINT>
          <DIRECTION ID="0">
           <DESCRIPTION TYPE="LOCAL">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="NTCSA">BAYREUTH</DESCRIPTION>
           <DESCRIPTION TYPE="RDSGN">BAYREUTH</DESCRIPTION>
          </DIRECTION>
          <PROXIMITY>
           <ID>AT</ID>
           <DESCRIPTION>at</DESCRIPTION>
          </PROXIMITY>
         </TO>
      </DEFINED>
      <GEOLOC>
         <ORIGIN>
          <LATITUDE>50.011688</LATITUDE>
          <LONGITUDE>11.322033</LONGITUDE>
         </ORIGIN>
         <TO>
          <LATITUDE>50.02052</LATITUDE>
          <LONGITUDE>11.410953</LONGITUDE>
         </TO>
      </GEOLOC>
      <TPEGOpenLRBase64>CCkBEAAlJAgMriOQVwAJBQQAATwACgUEALccACPvA3UACQUEAAHDADBwMg==</TPEGOpenLRBase64>
      <NAVTECH>
         <EDGE>
          <EDGE_ID>554347745</EDGE_ID>
          <EDGE_ID>67620028</EDGE_ID>
          <EDGE_ID>924551663</EDGE_ID>
          <EDGE_ID>924551662</EDGE_ID>
          <EDGE_ID>541852539</EDGE_ID>
          <EDGE_ID>67586012</EDGE_ID>
          <EDGE_ID>774156481</EDGE_ID>
          <EDGE_ID>774156482</EDGE_ID>
          <EDGE_ID>541753241</EDGE_ID>
          <EDGE_ID>924551665</EDGE_ID>
          <EDGE_ID>924551664</EDGE_ID>
          <EDGE_ID>67620026</EDGE_ID>
          <EDGE_ID>67620021</EDGE_ID>
          <EDGE_ID>67620022</EDGE_ID>
          <EDGE_ID>924551666</EDGE_ID>
          <EDGE_ID>924551667</EDGE_ID>
          <EDGE_ID>774156484</EDGE_ID>
          <EDGE_ID>545252606</EDGE_ID>
          <EDGE_ID>924551669</EDGE_ID>
          <EDGE_ID>924551668</EDGE_ID>
         </EDGE>
         <VERSION_ID>201802</VERSION_ID>
      </NAVTECH>
      <LENGTH>4.24396</LENGTH>
     </LOCATION>
     <TRAFFIC_ITEM_DETAIL>
      <ROAD_CLOSED>false</ROAD_CLOSED>
      <EVENT>
         <EVENT_ITEM_CANCELLED>false</EVENT_ITEM_CANCELLED>
         <SCHEDULED_CONSTRUCTION_EVENT>
          <SCHEDULED_CONSTRUCTION_TYPE_DESC>CONSTRUCTION</SCHEDULED_CONSTRUCTION_TYPE_DESC>
          <SCHEDULED_CONSTRUCTION_DETAIL>construction</SCHEDULED_CONSTRUCTION_DETAIL>
         </SCHEDULED_CONSTRUCTION_EVENT>
      </EVENT>
      <ALERTC>
         <EVENT_CODE>500</EVENT_CODE>
      </ALERTC>
      <ALERTC>
         <EVENT_CODE>803</EVENT_CODE>
      </ALERTC>
     </TRAFFIC_ITEM_DETAIL>
     <TRAFFIC_ITEM_DESCRIPTION TYPE="short_desc">null, Lane closed</TRAFFIC_ITEM_DESCRIPTION>
     <TRAFFIC_ITEM_DESCRIPTION TYPE="desc">, Lane closed</TRAFFIC_ITEM_DESCRIPTION>
     <TRAFFIC_ITEM_DESCRIPTION TYPE="no_exit_description">Lane closed</TRAFFIC_ITEM_DESCRIPTION>
    </TRAFFIC_ITEM>
  </TRAFFIC_ITEMS>
</TRAFFICML_INCIDENTS>