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.cit.api.here.com/traffic/6.2/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
<TRAFFICML_INCIDENTS TIMESTAMP="05/23/2017 13:15:33" VERSION="2.3" TIMESTAMP2="2017-05-23T13:15:33Z" EXTENDED_COUNTRY_CODE="E0">
  <TRAFFIC_ITEMS>
    <TRAFFIC_ITEM mid="13901405_reverse">
      <TRAFFIC_ITEM_ID>922649350757136158</TRAFFIC_ITEM_ID>
      <ORIGINAL_TRAFFIC_ITEM_ID>922649350757136158</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>May 4, 2017 11:46:25 AM CEST</START_TIME>
      <END_TIME>October 31, 2017 11:59:00 PM CET</END_TIME>
      <ENTRY_TIME>May 20, 2017 8:45:13 PM 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>
      A5, Kassel - Frankfurt in beiden Richtungen, zwischen Anschlussstelle Alsfeld-West und Anschlussstelle Homberg (Ohm), Brückenarbeiten, (km 411.3 - km 411.9), Länge: 0.6 km, Geschwindigkeitsbegrenzung: 80 km/h, bis 31.10.2017
      </COMMENTS>
      <RDS-TMC_LOCATIONS>
        <RDS-TMC>
          <ORIGIN>
            <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
            <TABLE_ID>1</TABLE_ID>
            <LOCATION_ID>11642</LOCATION_ID>
            <LOCATION_DESC>Hegberg</LOCATION_DESC>
            <RDS_DIRECTION>-</RDS_DIRECTION>
          </ORIGIN>
          <TO>
            <EBU_COUNTRY_CODE>D</EBU_COUNTRY_CODE>
            <TABLE_ID>1</TABLE_ID>
            <LOCATION_ID>11646</LOCATION_ID>
            <LOCATION_DESC>Alsfeld-West</LOCATION_DESC>
            <RDS_DIRECTION>-</RDS_DIRECTION>
          </TO>
          <DIRECTION>+</DIRECTION>
          <ALERTC>
            <TRAFFIC_CODE>707</TRAFFIC_CODE>
            <QUANTIFIERS>0</QUANTIFIERS>
            <DESCRIPTION>Bridge maintenance operations</DESCRIPTION>
            <ALERTC_DURATION>L</ALERTC_DURATION>
            <ALERTC_DIRECTION>1</ALERTC_DIRECTION>
            <UPDATE_CLASS>11</UPDATE_CLASS>
            <PHRASE_CODE>E7</PHRASE_CODE>
            <EXTENT>4</EXTENT>
            <DURATION>0</DURATION>
          </ALERTC>
          <PRIMARY_OFFSET>0.15998</PRIMARY_OFFSET>
          <LENGTH>23.41584</LENGTH>
        </RDS-TMC>
      </RDS-TMC_LOCATIONS>
      <LOCATION>
        <DEFINED>
          <ORIGIN>
            <ROADWAY ID="50126">
              <DESCRIPTION TYPE="NTCSA">A5</DESCRIPTION>
              <DESCRIPTION TYPE="RDSGN">A5</DESCRIPTION>
              <DESCRIPTION TYPE="LOCAL">A5</DESCRIPTION>
            </ROADWAY>
            <POINT ID="11642">
              <DESCRIPTION TYPE="NTCSA">Hegberg</DESCRIPTION>
              <DESCRIPTION TYPE="RDSGN">Hegberg</DESCRIPTION>
              <DESCRIPTION TYPE="LOCAL">Hegberg</DESCRIPTION>
              <DESCRIPTION TYPE="BNAME">A5</DESCRIPTION>
            </POINT>
            <DIRECTION ID="0">
              <DESCRIPTION TYPE="LOCAL">KASSEL</DESCRIPTION>
              <DESCRIPTION TYPE="NTCSA">KASSEL</DESCRIPTION>
              <DESCRIPTION TYPE="RDSGN">KASSEL</DESCRIPTION>
            </DIRECTION>
            <PROXIMITY>
              <ID>AT</ID>
              <DESCRIPTION>at</DESCRIPTION>
            </PROXIMITY>
          </ORIGIN>
          <TO>
            <ROADWAY ID="50126">
              <DESCRIPTION TYPE="NTCSA">A5</DESCRIPTION>
              <DESCRIPTION TYPE="RDSGN">A5</DESCRIPTION>
              <DESCRIPTION TYPE="LOCAL">A5</DESCRIPTION>
            </ROADWAY>
            <POINT ID="11646">
              <DESCRIPTION TYPE="NTCSA">Alsfeld-West</DESCRIPTION>
              <DESCRIPTION TYPE="RDSGN">Alsfeld-West</DESCRIPTION>
              <DESCRIPTION TYPE="LOCAL">Alsfeld-West</DESCRIPTION>
              <DESCRIPTION TYPE="BNAME">A5</DESCRIPTION>
            </POINT>
            <DIRECTION ID="0">
              <DESCRIPTION TYPE="LOCAL">KASSEL</DESCRIPTION>
              <DESCRIPTION TYPE="NTCSA">KASSEL</DESCRIPTION>
              <DESCRIPTION TYPE="RDSGN">KASSEL</DESCRIPTION>
            </DIRECTION>
            <PROXIMITY>
              <ID>AT</ID>
              <DESCRIPTION>at</DESCRIPTION>
            </PROXIMITY>
          </TO>
        </DEFINED>
        <GEOLOC>
          <ORIGIN>
            <LATITUDE>50.643535</LATITUDE>
            <LONGITUDE>8.989742</LONGITUDE>
          </ORIGIN>
          <TO>
            <LATITUDE>50.735747</LATITUDE>
            <LONGITUDE>9.24383</LONGITUDE>
          </TO>
        </GEOLOC>
        <NAVTECH>
          <EDGE>
            <EDGE_ID>1038031798</EDGE_ID>
            <EDGE_ID>1038031799</EDGE_ID>
            <EDGE_ID>1038032720</EDGE_ID>
            <EDGE_ID>1038032721</EDGE_ID>
          </EDGE>
          <VERSION_ID>201702</VERSION_ID>
        </NAVTECH>
      </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>
      </TRAFFIC_ITEM_DETAIL>
      <TRAFFIC_ITEM_DESCRIPTION TYPE="short_desc">null, Bridge maintenance operations</TRAFFIC_ITEM_DESCRIPTION>
      <TRAFFIC_ITEM_DESCRIPTION TYPE="desc">, Bridge maintenance operations</TRAFFIC_ITEM_DESCRIPTION>
      <TRAFFIC_ITEM_DESCRIPTION TYPE="no_exit_description">Bridge maintenance operations</TRAFFIC_ITEM_DESCRIPTION>
    </TRAFFIC_ITEM>
  </TRAFFIC_ITEMS>
</TRAFFICML_INCIDENTS>