HERE Fuel Prices API
Fuel Prices API Developer's Guide

Fuel Station Details

This section provides an example of a request for detailed information about a specific fuel station.

Note: This example uses a HERE API key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide

User story

Based on the results of a search for fuel stations, you want to find more information about a specific station.

Request Summary

Resource: station/{id}: Where id is an attribute of the fuelStation element with a unique value. The resource representation is specified via extensions .xml or .json. For more information, see Station Details.

Request

Note: id values change without notice. If the id is no longer available, a 404 not found status message is returned.

This code block demonstrates the complete request, specifying that the response data are to be delivered in JSON format.


https://fuel-v2.cc.api.here.com/fuel/stations/276u1x0u-749a20a72c684f898d045f54239b962d.json
?apiKey={YOUR_API_KEY}

Here is the same request indicating that the response data are to be delivered in XML format.


https://fuel-v2.cc.api.here.com/fuel/stations/276u1x0u-749a20a72c684f898d045f54239b962d.xml
?apiKey={YOUR_API_KEY}

Response

The response to the request contains:

  • station opening hours
  • station address details
  • fuel price information

This is the example response in JSON format:


{
   "hasMore":true,
   "fuelStations":{
    "fuelStation":[
     {
      "brand":"Shell",
      "brandIcon":"http://origin.stg.cld.vcdn.data.here.com/p/d/autox_stg/dt/icons/2015-05-06/shell.png",
      "fuelPrice":[
         {
          "price":1.379,
          "fuelType":"27",
          "unit":"l",
          "currency":"EUR",
          "lastUpdateTimestamp":"2015-03-08T14:48:52.000Z"
         },
         {
          "price":1.149,
          "fuelType":"1",
          "unit":"l",
          "currency":"EUR",
          "lastUpdateTimestamp":"2015-03-08T14:48:52.000Z"
         }
      ],
      "stationDetails":{
         "openingHours":{
          "regularOpeningHours":[
           {
            "daymask":127,
            "period":[
               {
                "from":"05:00:00",
                "to":"23:00:00"
               }
            ]
           }
          ]
         }
      },
      "address":{
         "city":"Hamburg",
         "country":"DEU",
         "region":"Hamburg",
         "street":"Alter Teichweg",
         "streetNumber":"71",
         "postalCode":"22049"
      },
      "position":{
         "latitude":53.5845718,
         "longitude":10.0596704
      },
      "name":"Hamburg, Alter Teichweg.",
      "id":"276u1x0u-749a20a72c684f898d045f54239b962d",
      "lastUpdateTimestamp":"2014-12-14T11:05:53.374Z",
      "timeZone":"Europe/Berlin"
     }
    ]
   }
}

This is the example response in XML format:


<fuel:fuelStationsResult xmlns:fuel="http://www.here.com/2014/02/ACS-Fuel" xmlns:common="http://www.here.com/2014/02/ACS-Common">
  <hasMore>false</hasMore>
  <fuelStations>
    <fuelStation id="276u1x0u-749a20a72c684f898d045f54239b962d" lastUpdateTimestamp="2014-12-14T11:05:53.374Z" timeZone="Europe/Berlin">
      <address>
        <city>Hamburg</city>
        <country>DEU</country>
        <region>Hamburg</region>
        <street>Alter Teichweg</street>
        <streetNumber>71</streetNumber>
        <postalCode>22049</postalCode>
      </address>
      <position>
        <latitude>53.5845718</latitude>
        <longitude>10.0596704</longitude>
      </position>
      <name>Hamburg, Alter Teichweg.</name>
      <brand>Shell</brand>
      <brandIcon>http://origin.stg.cld.vcdn.data.here.com/p/d/autox_stg/dt/icons/2015-05-06/shell.png</brandIcon>
      <fuelPrice fuelType="27" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-08T14:48:52.000Z">
        <price>1.379</price>
      </fuelPrice>
      <fuelPrice fuelType="1" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-08T14:48:52.000Z">
        <price>1.149</price>
      </fuelPrice>
      <stationDetails>
        <openingHours>
          <regularOpeningHours>
            <daymask>127</daymask>
            <period>
              <from>05:00:00</from>
              <to>23:00:00</to>
            </period>
          </regularOpeningHours>
        </openingHours>
      </stationDetails>
    </fuelStation>
  </fuelStations>
</fuel:fuelStationsResult>

For more details about responses to this type of request refer to Fuel Stations Response.