ガイドAPIリファレンス
ガイド

ピックアップレスポンスの読み取り方法

HERE Waypoints Sequence API v8のピックアップレスポンスは、以下のような基本的な構造を持ちます。

  • リクエストのパラメーターに基づいて最適化された経由地シーケンスを一覧表示するwaypointsオブジェクト。要素sequenceの値は最適な順序を示します。最適ではなく、乗客/荷物の運送により得られる利益が移動の時間や距離を補填しない経由地は無視されます。
  • 移動の距離と時間の合計に関する情報です。
  • 指定された経由地間の移動に関する情報を含むinterconnectionsオブジェクトです。
  • 最適化の種類とサポート情報に関する情報です。
  • リクエストに関するメタ情報です。

レスポンス例:

{
	"results": [
		{
			"waypoints": [
				{
					"id": "waypoint0",
					"lat": 50.11562,
					"lng": 8.63121,
					"sequence": 0,
					"estimatedArrival": null,
					"estimatedDeparture": "2017-09-06T14:49:09Z",
					"fulfilledConstraints": []
				},
				{
					"id": "waypoint1",
					"lat": 50.12254,
					"lng": 8.63107,
					"sequence": 1,
					"estimatedArrival": "2017-09-06T14:52:09Z",
					"estimatedDeparture": "2017-09-06T14:52:09Z",
					"fulfilledConstraints": [ "pickup:LOAD2,value:200,load:0 (destination0 -> destination1)" ]
				},
				{
					"id": "waypoint2",
					"lat": 50.12892,
					"lng": 8.62983,
					"sequence": 2,
					"estimatedArrival": "2017-09-06T14:53:39Z",
					"estimatedDeparture": "2017-09-06T14:53:39Z",
					"fulfilledConstraints": [	"drop:LOAD2,value:200,load:0 (destination0 -> destination1)" ]
				},
				{
					"id": "waypoint3",
					"lat": 50.13254,
					"lng": 8.64928,
					"sequence": 3,
					"estimatedArrival": "2017-09-06T14:57:23Z",
					"estimatedDeparture": null,
					"fulfilledConstraints": []
				}
			],
			"distance": "6055",
			"time": "494",
			"interconnections": [
				{
					"fromWaypoint": "waypoint0",
					"toWaypoint": "waypoint1",
					"distance": 1707.0,
					"time": 180.0,
					"rest": 0.0,
					"waiting": 0.0
				},
				{
					"fromWaypoint": "waypoint1",
					"toWaypoint": "waypoint2",
					"distance": 930.0,
					"time": 90.0,
					"rest": 0.0,
					"waiting": 0.0
				},
				{
					"fromWaypoint": "waypoint2",
					"toWaypoint": "waypoint3",
					"distance": 3418.0,
					"time": 224.0,
					"rest": 0.0,
					"waiting": 0.0
				}
			],
			"description": "Targeted best solution: optimal; without traffic",
			"timeBreakdown": {
				"driving": 494,
				"service": 0,
				"rest": 0,
				"waiting": 0
			}
		}
	],
	"errors": [],
	"processingTimeDesc": "107ms",
	"responseCode": "200",
	"warnings": null,
	"requestId": null
}