HERE Fuel Prices API
Fuel Prices API Developer's Guide

Fuel Station by PVID or station ID

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

You want to get the fuel station details using the PVID or station id which you have previously received.

Request Summary

Resource: stations/bulk: The resource representation is specified via extensions .xml or .json
Parameters: id: A known fuel station PVID or station id.

Request

Note: id values change without notice. If the id is no longer available, a blank response 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/bulk.json
?id=1099721199
&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/bulk.xml
?id=1099721199
&apiKey={YOUR_API_KEY}

Response

The response to the request contains:

  • fuel price information

This is the example response in JSON format:


{
   "hasMore":false,
   "fuelStations":{
    "fuelStation":[
     {
      "fuelPrice":[
         {
          "price":1.219,
          "fuelType":"27",
          "unit":"l",
          "currency":"EUR",
          "lastUpdateTimestamp":"2015-01-20T13:03:43.000Z"
         },
         {
          "price":1.039,
          "fuelType":"1",
          "unit":"l",
          "currency":"EUR",
          "lastUpdateTimestamp":"2015-01-20T13:03:43.000Z"
         },
         {
          "price":0.639,
          "fuelType":"14",
          "unit":"l",
          "currency":"EUR",
          "lastUpdateTimestamp":"2015-01-16T11:03:16.000Z"
         }
      ],
      "id":"276u336g-6a194aba138f4fab96f4b2cecd4bde7b",
      "pvId":"1099721199"
     }
    ]
   }
}

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" xmlns:ev="http://www.here.com/2014/02/ACS-EV"
  xmlns:parking-offstreet="http://www.here.com/2014/02/ACS-Parking-Offstreet"
>
  <hasMore>false</hasMore>
  <fuelStations>
    <fuelStation id="276u336g-6a194aba138f4fab96f4b2cecd4bde7b" pvId="1099721199">
      <fuelPrice fuelType="27" unit="l" currency="EUR" lastUpdateTimestamp="2015-01-20T13:03:43.000Z">
        <price>1.219</price>
      </fuelPrice>
      <fuelPrice fuelType="1" unit="l" currency="EUR" lastUpdateTimestamp="2015-01-20T13:03:43.000Z">
        <price>1.039</price>
      </fuelPrice>
      <fuelPrice fuelType="14" unit="l" currency="EUR" lastUpdateTimestamp="2015-01-16T11:03:16.000Z">
        <price>0.639</price>
      </fuelPrice>
    </fuelStation>
  </fuelStations>
</fuel:fuelStationsResult>

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