GuidesAPI Reference
API Reference

/v8/findsequence2

Compute best Sequence for Waypoints (Travelling Salesman Problem).

Query Params
string
required

Waypoint to start the sequence.

Example:
&start=Munich;48.132777,11.565352

string

Waypoint to be reached at the end of the sequence. Usage is optional, but recommended. The constraints st:, at:, acc:, heading:, sideOfStreetHint: described for destination parameters are available for this parameter.

Example:
&end=Paris;48.857397,2.346642

string
required

The routing mode determines how the route is calculated.
Format: Type;TransportModes;TrafficMode;RouteFeature1,RouteFeature2
Type can be mode=fastest or mode=shortest.
Available transport modes: car, truck, bicycle, scooter, taxi, bus, pedestrian. Note: bicycle, bus, and taxi modes are in beta and have limited functionality.
To learn more about the available transport modes, see the Transport modes documentation of HERE Routing API v8.
RouteFeatures allow to avoid select road features to a certain degree. Available road features are: tollroad, motorway, boatFerry, railFerry, tunnel, dirtRoad, park. The use of these road features can be managed through setting values from the range of 0 to -3, where 0 is normal, unrestricted use, and -3 forces to strictly avoid the given feature. The delimiter between RouteFeatures is a comma.
Example:
&mode=fastest;car;traffic:disabled;motorway:-2
&mode=fastest;car;traffic:enabled;motorway:-2,tollroad:-2

string

Time when travel is expected to start. Traffic speed and incidents are taken into account when calculating the route. You can use now to specify the current time. Type: xs:dateTime.

Example:
&departure=2021-07-04T17:00:00+02:00

string

Does the vehicle tow a trailer? Values: true | false This parameter is deprecated. Use trailersCount instead.

string

Number of trailers or semi-trailers. For toll cost and truck restrictions.

  • Supported values: 0 - no trailer (default), 1 - one or more trailers, 2 - two or more trailers, 3 - three or more trailers, 4 - one or more semi-trailers.
  • &trailersCount=4 is not supported for Waypoint Sequencing.
string

Actual height of the overall rigid/semi truck including trailers. Accepted value units are cm (centimeter), m (meter) or in (inch). Example: 350cm or 3.5m or 138in. Applicable for truck restrictions and toll cost.

string

Actual total weight of vehicle incl. payload and trailers/caravan including their payload.

  • Accepted value units are t (tons), kg (kilograms) or lbs (pounds).
  • Example: 7.5t or 7500kg or 16500lbs.
  • Applicable for truck restrictions, speed profile selection, toll cost calculation and environmental zone restrictions. See also parameter vehicleWeight.
  • Note that country wide weight restrictions depend on the length, width, number of axles and trailers as well, so it might be necessary to specify these parameters as well.
string

Comma separated list from supported values: explosive, gas, flammable, combustible, organic, poison, radioActive, corrosive, poisonousInhalation, harmfulToWater, other, allhazardousGoods, explosiveFlammable.

  • Applicable for toll cost calculation and truck restrictions.
  • For toll cost only values explosive and other are supported.
  • For Waypoints Sequence values allhazardousGoods and explosiveFlammable are not supported.
string

Length of the vehicle (including potential trailers).

  • Accepted value units are cm (centimeter), m (meter) or in (inch). Example: 1250cm or 12.5m or 492in.
  • Applicable for toll cost calculation and truck restrictions.
  • Note that country wide length restrictions depend on the limitedWeight, width, number of axles and trailers as well, so it might be necessary to specify these parameters as well.
string

Actual total weight per axle, incl. payload.

  • Accepted value units are t (tons), kg (kilograms) or lbs (pounds).
  • Example: 7.5t or 7500kg or 16500lbs.
  • For Waypoints Sequence only supported unit is kg, without explicitly specifying unit.
  • Applicable for toll cost calculation and truck restrictions.
string

Width of the vehicle and trailer(s). Accepted value units are cm (centimeter), m (meter) or in (inch). Example: 350cm or 3.5m or 138in. Applicable for truck restrictions. Note that country wide width restrictions depend on the limitedWeight, length, number of axles and trailers as well, so it might be necessary to specify these parameters as well.

string

Defines the tunnel categories the truck must NOT use. Supported values: B, C, D or E.

  • A tunnels have no restrictions.
  • E tunnels have most restrictions.
  • Example: If &tunnelCategory=C is specified, then route will use A and B tunnels but not C, D or E.
string

Links which the route must not cross. The list of LinkIdTypes. LinkIdType is a xs:string with the following regular expression restrictions: [*-+]\d+

Example:
&avoidSegments=here:cm:segment:190319503,here:cm:segment:192642784

string

Areas which the route must not cross. Array of up to 20 BoundingBox-es.

Example with two bounding boxes:
avoidAreas=52.517100760,13.3905424488;52.5169701849,13.391808451!52.517000760,13.3700424488;52.5168701849,13.371308451

string

A list of three-letter country codes (ISO-3166-1 alpha-3 code) to be excluded from the underlying route calculations. Excluding countries near or between waypoints may result in incalculable routes.

string

This parameter avoid U-turns between destinations. To avoid U-turns at destinations use the parameter heading or sideOfStreetHints which are part of the destination parameters.
This parameter is not supported for pedestrian, bicycle and scooter transport modes. Values: true/false. Default: false

string

Measure to optimize. Values: distance,time. Default: time

string

Specifies the function used to wrap the JSON response

string

Request Id returned in the response to match it with the request

string

Activates the accounting for rest times. Rest times are modelled with a short and a long cycle. Both cycles consist of a driving phase and a resting phase..
Also it can be specified if times at waypoint (service times) should be counted as
restTimes=durations:{short driving time in seconds},{short rest time in seconds},{long driving time in seconds},{long rest time in seconds;serviceTimes:work|rest.
Also the value can be set as default 'restTimes=default' which activates simplified European rules with 45min rest after 4.5h hours driving and 11h of long rest after 9h working, service times are accounted as work.

Example:
&restTimes=durations:16200,2700,32400,39600;serviceTimes:work

string

Truck routing only, specifies the vehicle type. Values:truck | tractorTruck, Defaults to truck.

string

Sets the speed (m/s), if the routing mode comes with 'pedestrian'

string

Activates accounting of times for charging electric vehicles. Requires a distance to be driven in Meter and the time in seconds required to recharge the energy required for the given distance.

Example:
evChargingTimePerDistance=7200,250000

string

The "clustering" parameter enables clustering of the waypoints. Two clustering algorithms are supported; drivingDistance and topologySegment.
The algorithm drivingDistance is a connectivity-based clustering algorithm where all waypoints of a cluster are within a driving distance of 50 meters of the specified vehicle in both directions. A custom value of the driving distance can be specified by drivingDistance:distanceInMeter. Minimum allowed value for drivingDistance is 5 meters and maximum allowed value is 50000 meters.
The algorithm topologySegment creates a cluster of waypoints that can be map-matched to the same topology segment.

Examples:
&clustering=drivingDistance:100
&clustering=topologySegment

Note: Using this feature will incur an additional transaction.

string

Cost per hour in arbitrary currency.

string

Cost per kilometer in arbitrary currency.

string

Add comma separated fix time slots as break times, during which no stops or travel should be scheduled. Maximum number of breakTimes: 5. Format: xs:dateTime;duration of the break in seconds.

Example:
2023-03-13T12:00:00+02:00;3600,2023-03-13T16:00:00+02:00;1800

string

A key generated specifically to authenticate API requests. For more information on how to get an API key, see https://developer.here.com/documentation/identity-access-management/dev_guide/index.html . Other authentication options are Bearer token, see https://developer.here.com/documentation/identity-access-management/dev_guide/index.html or app_id with app_code for backward compatibility.

string
required

A waypoint contains an ID, WGS-84 coordinates, and constraints, which may impose certain restrictions when calculating the sequence.
The format is [ID;]latitude,longitude[;st:{time in seconds}[,interruptible:{true or false}]][[;acc:opening hours]|[;at:appointment]][;before:destinationNumber of other waypoint][;sideOfStreetHint:[matchSideOfStreet,]displayLatitude,displayLongitude].

The constraints are:
st: Service time spent at the waypoint. Value in seconds should be between 0 and 604800 (one week). Example: st:300
Service time also has an optional feature interruptible, which can be set to either true or false. When enabled (true), the service time can be interrupted by break times. Default value is true.
Note: This feature can't be used with the clustering parameter.
Example: st:300,interruptible:false
at: Defines appointment time. Requires the service time as the duration of the appointment. Example: at:2021-11-15T16:00:00+02:00;st:1800
acc: Access time windows during which a destination can be visited, separated by commas. An access time window consists of start time (weekday, time, timezone) and end time pair with a pipe symbol divider, followed by mandatory service time value. Max number of time windows: seven. Example: acc:mo12:00:00+02:00|fr18:00:00+02:00;st:900
before: Defines the destination that must be reached later. Format: before:{'destination' parameter name including the number}. Example: before:destination7
acc and at cannot be used together on the same destination.
sideOfStreetHint: Specifies the preferred side of street where the waypoint should be placed. Typically, this is the display location of an address or a POI (point of interest) on the side of the road returned by HERE Geocoding and Search API v7. Consists of the optional parameter matchSideOfStreet and coordinates.
The matchSideOfStreet parameter determines how the hint is handled. Possible values are:
  always - The hint is always used.
  onlyIfDivided - The hint is used on roads where traffic in opposite directions is divided by a physical barrier or it's illegal to cross into the lanes going in the opposite direction.
  The default value for matchSideOfStreet is onlyIfDivided
heading: The direction from which the waypoint must be approached or in which direction one must go when leaving the waypoint. Expressed in degrees clock-wise from north. Values outside the range are wrapped to the range.

For places found using HERE Geocoding and Search API v7, use the coordinates from the access property.

Examples:
&destination3=Berlin_appointment;52.51605,13.37691;at:2021-10-14T16:00:00+02:00;st:300
&destination11=Bratislava_limited_access;48.154722,17.145556;acc:tu06:00:00+02:00|tu20:00:00+02:00;st:900,interruptible:false
&destination12=long_servicetime;55.670449,12.5784912;st:7200
&destination17=Malmo_before_Copenhagen;55.600289,12.995798;before:destination12
&destination20=50.113029,8.683684;sideOfStreetHint:always,50.112970,8.683692
&destination20=Bottrop;51.51936,6.95109;heading:135
&destination24=multi_acc_windows;52.529967,13.489713;acc:fr08:30:00+02:00|fr11:00:00+02:00,fr13:30:00+02:00|fr17:00:00+02:00;st:60

The maximum number of waypoints is 202, including the start and stop points.The maximum number of waypoints assigned to road segment is 50. Road segments are limited by junctions or an end of the road.If the latter limit is encountered, consider using clustering by topology segment, which can often remove this restriction depending on the road network's topology in the area.

Response

Language
Credentials
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json;charset=UTF-8