Construct a request

The basic elements of a request to the HERE Waypoints Sequence API v8 are the start point, a number of destination points and the routing mode.

You can include a destination for sequence optimization; you must provide a destination for pickup along route. If the request does not contain a destination, one of the destination points you provide are chosen. Each point defining the start, a destination or the end consists of WaypointId, latitude and longitude in the WGS 84 system. For more information about the format, see the HERE Waypoints Sequence API v8 Reference.

Using the parameter improvefor, you can define if to minimize the travel time or travel distance .

mode indicates whether the result is suitable for a car or a truck and whether to use traffic information when processing the request. In addition, mode defines whether single interconnections are fastest or shortest. This setting is important for interaction with the routing APIs. We recommend fastest for most use cases. Be sure to provide a time for the departure if you enable traffic.

For authentication, one of the following parameters is mandatory:

  • apiKey
  • bearer token
  • LEGACY: app_id and app_code combination

Note: For the available authentication options, see the Identity & Access Management Developer Guide.

The table below lists the basic request elements with examples. Additionally, a request may contain more resource-specific parameters, such as parameters for truck specification. For more information about resource-specific parameters, see the HERE Waypoints Sequence API v8 Reference.

Element Value/Example Description
Legacy Base URL https://wse.api.here.com Production environment when you use an app_id/app_code pair. For more information, see the Identity & Access Management Developer Guide.
Base URL https://wps.hereapi.com Production environment only.
Path /v8/ The path consists of the major service version only.
Resource findsequence.json, findpickups.json GET or POST.
Format of Response json The format of the response is JSON. Usage of JSONP is supported.
Application Code - Legacy &app_code={YOUR_APP_CODE} Substitute your own unique app_code. For more information, see the Identity & Access Management Developer Guide.
Application Id - Legacy &app_id={YOUR_APP_ID} Substitute your own unique app_id. For more information, see the Identity & Access Management Developer Guide.
API Key ?apiKey={YOUR_API_KEY} Substitute your own unique apiKey. For more information, see the Identity & Access Management Developer Guide.
Bearer token Bearer TOKEN_HERE Substitute your own unique bearer token. For more information, see the Identity & Access Management Developer Guide.
Start Point &start= WiesbadenCentralStation;50.0715,8.2434 First waypoint.
A Intermediate Destination &destination1= FranfurtCentralStation;50.1073,8.6647 The first of the waypoints.
Another Intermediate Destination &destination2= DarmstadtCentralStation;49.8728,8.6326 Adding further waypoints. There are limitations on the number of waypoints depending on the use case described in the Key Concepts
End Point &end=MainzCentralStation;50.0021,8.259 The route end/destination. This parameter is optional for findsequence. If it is not provided, the service automatically chooses a point from those provided in the request parameters.
Routing Mode &mode=fastest;car;traffic:enabled Specifies the way interconnection routes are calculated.
Departure &departure=2014-12-01T17:30:00+01:00 Required if traffic:enabled; is set in the routing mode.
Optimization Target &improveFor=time Specifies the target for optimizing the calculation results. This parameter is optional.
Request Id &requestId=userGenerated85 This ID is echoed in the result to allow for tracking the request through the service. This parameter is optional.

results matching ""

    No results matching ""