Traffic Info and Rest Time Constraints Waypoint Sequence

User Story

A dispatcher needs to find the fastest way to travel by truck from Paris to Vienna, Milan and Rome before returning to Paris. The dispatcher is interested in traffic information and wants to include rest times in the total time.

Request

https://wse.ls.hereapi.com/2/findsequence.json
?apiKey=\{YOUR\_API\_KEY\}
mode=fastest;truck;traffic:enabled;&
start=Paris1%3B48.851628%2C2.345975&
departure=2015-08-17T07:30:00%2b01:00&
end=Paris2%3B48.853237%2C2.370351&
destination1=Vienna%3B48.188456%2C16.365020;st:1800&
destination2=Rome%3B41.844794%2C12.411838;st:1800&
destination3=Milan;45.468069,9.157236&
restTimes=durations:16200,2700,32400,39600;serviceTimes:work

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

Response

{
    "results" : [ {
            "waypoints" : [ {
                    "id" : "Paris1",
                    "lat" : 48.851628,
                    "lng" : 2.345975,
                    "sequence" : 0,
                    "estimatedArrival" : null,
                    "estimatedDeparture" : "2015-08-17T07:30:00+01:00",
                    "fulfilledConstraints" : []
                }, {
                    "id" : "Milan",
                    "lat" : 45.468069,
                    "lng" : 9.157236,
                    "sequence" : 1,
                    "estimatedArrival" : "2015-08-18T05:15:33+01:00",
                    "estimatedDeparture" : "2015-08-18T05:15:33+01:00",
                    "fulfilledConstraints" : []
                }, {
                    "id" : "Rome",
                    "lat" : 41.844794,
                    "lng" : 12.411838,
                    "sequence" : 2,
                    "estimatedArrival" : "2015-08-18T12:59:45+01:00",
                    "estimatedDeparture" : "2015-08-18T13:29:45+01:00",
                    "fulfilledConstraints" : [
                        "st:1800"
                    ]
                }, {
                    "id" : "Vienna",
                    "lat" : 48.188456,
                    "lng" : 16.36502,
                    "sequence" : 3,
                    "estimatedArrival" : "2015-08-20T01:03:29+01:00",
                    "estimatedDeparture" : "2015-08-20T01:33:29+01:00",
                    "fulfilledConstraints" : [
                        "st:1800"
                    ]
                }, {
                    "id" : "Paris2",
                    "lat" : 48.853237,
                    "lng" : 2.370351,
                    "sequence" : 4,
                    "estimatedArrival" : "2015-08-21T03:44:45+01:00",
                    "estimatedDeparture" : null,
                    "fulfilledConstraints" : []
                }
            ],
            "distance" : "3787058",
            "time" : "332085",
            "interconnections" : [ {
                    "fromWaypoint" : "Paris1",
                    "toWaypoint" : "Milan",
                    "distance" : 843509,
                    "time" : 36032,
                    "rest" : 42300,
                    "waiting" : 0
                }, {
                    "fromWaypoint" : "Milan",
                    "toWaypoint" : "Rome",
                    "distance" : 596959,
                    "time" : 25151,
                    "rest" : 2700,
                    "waiting" : 0
                }, {
                    "fromWaypoint" : "Rome",
                    "toWaypoint" : "Vienna",
                    "distance" : 1105751,
                    "time" : 46123,
                    "rest" : 81900,
                    "waiting" : 0

                }, {
                    "fromWaypoint" : "Vienna",
                    "toWaypoint" : "Paris2",
                    "distance" : 1240839,
                    "time" : 49275,
                    "rest" : 45000,
                    "waiting" : 0
                }
            ],
            "description" : "Targeted best time; without traffic",
            "timeBreakdown" : {
                "driving" : 156585,
                "service" : 3600,
                "rest" : 171900,
                "waiting" : 0
            }
        }
    ],
    "errors" : [],
    "processingTimeDesc" : "255850ms",
    "responseCode" : "200",
    "warnings" : null,
    "requestId" : null
}

results matching ""

    No results matching ""