Skip to main content

Tour Planning

Problem: Twelve vehicles, sixty stops, appointment windows, capacity. Which vehicle goes where, in what order?
If you are writing a nearest-neighbour heuristic to avoid a licensing conversation, stop. HERE documents Tour Planning as included in the HERE Base Plan.Confirm your own entitlement — Base Plan inclusion and your contract’s inclusion are separate facts.

Prerequisites

  • A HERE API key or OAuth token with Tour Planning entitlement
  • export HERE_API_KEY="..."

The code

Both auth methods work. Drop the Authorization: Bearer header and append ?apikey=<KEY> to the URL. This applies to all Tour Planning endpoints.

The profile reference

This trips up nearly every first integration.
fleet.types[].profile is a string key into fleet.profiles[].name. It is not a transport mode."profile": "truck" with no profile named truck produces a confusing failure. The transport mode lives in profiles[].type.

The async lifecycle

Unassigned jobs

The solver will drop jobs that capacity, time windows, or shift time make unservable. Your integration must handle a solution that does not serve every stop.A dispatcher UI that silently omits them is worse than useless. Surface them, with reasons, before the shift begins — not at 4pm when a customer calls.

Common mistakes

Approximating this with N routing calls. Slower, more expensive, worse routes. Setting profile to a transport mode. It is a reference into fleet.profiles. Leaving maxTime: 2 from the documentation example. Legal solution, unusable sequence. Treating timeout as a failure. It means “raise maxTime.” Ignoring unassigned. The solver told you. Blocking an HTTP request on a synchronous solve. Use /async. Constructing the status or solution URL. Use the returned href. Losing statusId on restart. Resubmission bills again and returns a different sequence, confusing everyone downstream. Leaving costs at example values. fixed is how you tell the solver whether adding a vehicle is cheap or expensive. That is a business decision. Optimizing a truck fleet on car profiles. Infeasible sequences, confidently returned. Re-solving on every inbound order. Route churn. Drivers stop trusting the app.

Production considerations

Solve on a cadence, not on every event. Nightly. Locked schedule. Exception-driven replanning only. A stable, 90%-optimal schedule outperforms a perfect one nobody follows. Persist statusId before the first poll. The solve runs on HERE’s side regardless. Hash the problem. Unchanged jobs, fleet, and constraints → reuse the solution. Mid-day replanning is a new problem. Current vehicle location becomes the shift start; completed jobs are removed. Fresh submission, not an incremental update. Service time estimates are your accuracy ceiling. Instrument actual versus estimated per job type. This improves schedules more than any solver parameter. Tune maxTime and stagnationTime against real problem size. Measure the marginal improvement. Find the knee. Truck fleets need truck profiles, with the same vehicle constraints as Truck Route.

Tour Planning

VRP variants, costs, priorities, reloads.

Field Service

Skills, appointment windows, and why re-solving destroys trust.

Last-Mile Delivery

Where service time dominates travel time.

Distance Matrix

The cost table underneath — and the interface to your own solver.

HERE documentation


Need production HERE API keys or implementation support? Placematic is an official HERE Technologies reseller and implementation partner. Talk to us.