燃料価格 - すべての燃料タイプ
このセクションでは、すべての燃料タイプに対する燃料価格リクエストの例を示します。
ユーザーストーリー
all
ドイツ、ベルリンにある緯度 52.53087 および経度 13.44176 から 5 km 以内の燃料タイプの価格を取得したいと考えています。 緯度 および経度 の値は WGS 84 形式です。
リクエストのサマリー
リクエスト
このコードブロックは、応答データが JSON 形式で配信されるように指定する、完全な要求を示します。
https://fuel-v2.cc.api.here.com/fuel/stations.json
?prox=52.53087,13.44176,5000
&apiKey={YOUR_API_KEY}
HERE は、応答データが XML 形式で配信されることを示す同じ要求です。
https://fuel-v2.cc.api.here.com/fuel/stations.xml
?prox=52.53087,13.44176,5000
&apiKey={YOUR_API_KEY}
応答
リクエストに対する応答には、次の内容が含まれます。
- 検索条件に一致するすべての燃料タイプの燃料価格(半径近接以内)。 価格が概算さ
Premium
れている場合、 fuelPrice 要素には価格情報が含まれていません。このステーションで利用できるのは燃料タイプのみです ( 燃料タイプ 4-) 。 - 指定した条件に合うステーションのリストと詳細情報
JSON 形式の応答例を次に示します。
{
"hasMore":true,
"fuelStations":{
"fuelStation":[
{
"brand":"TOTAL",
"brandIcon":"http://origin.stg.cld.vcdn.data.here.com/p/d/autox_stg/dt/icons/2015-05-06/total.png",
"fuelPrice":[
{
"price":1.469,
"fuelType":"27",
"unit":"l",
"currency":"EUR",
"lastUpdateTimestamp":"2015-03-12T10:17:45.000Z"
},
{
"price":1.389,
"fuelType":"1",
"unit":"l",
"currency":"EUR",
"lastUpdateTimestamp":"2015-03-12T10:17:45.000Z"
},
{
"price":0.619,
"fuelType":"14",
"unit":"l",
"currency":"EUR",
"lastUpdateTimestamp":"2015-02-25T11:04:41.000Z"
},
{
"price":1.299,
"fuelType":"11",
"unit":"l",
"currency":"EUR",
"lastUpdateTimestamp":"2015-03-12T10:17:45.000Z"
}
],
"open24x7":true,
"stationDetails":{
"openingHours":{
"regularOpeningHours":[
{
"daymask":127,
"period":[
{
"from":"00:00:00",
"to":"24:00:00"
}
]
}
]
}
},
"address":{
"city":"Berlin",
"country":"DEU",
"region":"Berlin",
"street":"Margarete-Sommer-Stra�e",
"streetNumber":"2",
"postalCode":"10407"
},
"contacts":{
"phone":[
{
"value":"+493042852514",
"label":"PHONE"
}
]
},
"distance":0,
"position":{
"latitude":52.53087,
"longitude":13.44176
},
"name":"TOTAL",
"id":"276u33dc-d1d2783a63404a6789f281438f32375f",
"pvId":"50664433",
"lastUpdateTimestamp":"2014-12-14T11:01:41.609Z",
"timeZone":"Europe/Berlin"
}
]
}
}
XML 形式の応答例を次に示します。
<fuel:fuelStationsResult>
<hasMore>true</hasMore>
<fuelStations>
<fuelStation id="276u33dc-d1d2783a63404a6789f281438f32375f" pvId="50664433" lastUpdateTimestamp="2014-12-14T11:01:41.609Z" timeZone="Europe/Berlin">
<fuelPrice fuelType="27" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-12T10:17:45.000Z">
<price>1.469</price>
</fuelPrice>
<fuelPrice fuelType="1" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-12T10:17:45.000Z">
<price>1.389</price>
</fuelPrice>
<fuelPrice fuelType="14" unit="l" currency="EUR" lastUpdateTimestamp="2015-02-25T11:04:41.000Z">
<price>0.619</price>
</fuelPrice>
<fuelPrice fuelType="11" unit="l" currency="EUR" lastUpdateTimestamp="2015-03-12T10:17:45.000Z">
<price>1.299</price>
</fuelPrice>
<address>
<city>Berlin</city>
<country>DEU</country>
<region>Berlin</region>
<street>Margarete-Sommer-Straße</street>
<streetNumber>2</streetNumber>
<postalCode>10407</postalCode>
</address>
<contacts>
<phone>
<value>+493042852514</value>
<label>PHONE</label>
</phone>
</contacts>
<distance>0</distance>
<position>
<latitude>52.53087</latitude>
<longitude>13.44176</longitude>
</position>
<name>TOTAL</name>
<brand>TOTAL</brand>
<brandIcon>http://origin.stg.cld.vcdn.data.here.com/p/d/autox_stg/dt/icons/2015-05-06/total.png</brandIcon>
<open24x7>true</open24x7>
<stationDetails>
<openingHours>
<regularOpeningHours>
<daymask>127</daymask>
<period>
<from>00:00:00</from>
<to>24:00:00</to>
</period>
</regularOpeningHours>
</openingHours>
</stationDetails>
</fuelStation>
</fuelStations>
</fuel:fuelStationsResult>
このタイプのリクエストに対するレスポンスの詳細については、「フューエルステーションのレスポンス」を参照してください。