A consumer nav app tells the driver where to turn. It will not tell the dispatcher where the 4.5-hour break limit lands — or, more importantly, whether there is a free truck parking spot when it does. That second question is what strands a truck overnight at a full rest area with the tachograph already at zero.
NAPSPAN’s routing endpoint now answers it. Send the driver’s driving-time clock along with the route, and the response carries an hos[] array: every point on the corridor where the driver must take a break or stop driving under the selected regime — EU Regulation (EC) No 561/2006 by default — the projected time they reach it, the legal deadline, and the truck parking and rest areas reachable before that deadline, drawn from normalized DATEX II data across European National Access Points.
How It Works
It rides the same call as the rest of routing: POST /api/v1/routing/route. You already send an origin, a destination, and a truck profile. To get the projection, add an hos block inside the truck object describing the driver’s clock at departure.
curl -X POST "https://api.napspan.com/api/v1/routing/route" \
-H "X-API-Key: your_key" \
-H "Content-Type: application/json" \
-d '{
"origin": { "lat": 48.1351, "lng": 11.5820 },
"destination": { "lat": 45.4642, "lng": 9.1900 },
"departure_time": "2026-06-08T05:00:00Z",
"truck": {
"profile": "tractor",
"weight_t": 40.0,
"height_m": 4.0,
"axles": 5,
"hos": {
"ruleset": "eu",
"drive_remaining_s": 32400,
"since_break_s": 0
}
},
"enrichment": {
"include_features": ["truck_parking", "rest_areas"]
}
}'
That’s a Munich→Milan run over the Brenner for a fresh driver on EU rules: 9 hours of driving left (32400 s) and zero driving time since the last break. Every counter is “seconds remaining” against the named ruleset’s limit.
The Driving-Time Clock
The hos object is the driver’s state, not a fixed policy. Store only the ruleset on a reusable truck profile — the per-trip counters are supplied inline on each request and merge on top.
| Field | Meaning |
|---|---|
ruleset | The regime: eu, us, or canada_south. Empty defaults from the deployment region (EU here). |
drive_remaining_s | Daily driving budget left (EU: 9h). |
since_break_s | Driving time accrued since the last qualifying break (EU: a 45-min break is due after 4.5h). |
duty_remaining_s | On-duty window budget (used by the US regime; EU has no fixed duty window). |
cycle_remaining_s | Weekly / fortnightly budget (EU: 56h/week, 90h/fortnight). |
Any counter you leave out is read as “a fresh driver” — the ruleset’s full limit. The counters are pointers under the hood, so an explicit 0 (“out of hours right now”) is distinct from “not supplied.”
The Response
The projection is attached to the primary route as an hos[] array, alongside the warnings[] and features[] you may already be using.
{
"routes": [
{
"summary": { "distance_m": 492000, "duration_s": 21600 },
"geometry": { "type": "LineString", "coordinates": [ /* ... */ ] },
"hos": [
{
"reason": "break_required",
"distance_along_route_m": 372000,
"projected_time": "2026-06-08T09:30:00Z",
"legal_deadline": "2026-06-08T09:30:00Z",
"feasible": true,
"suggested_stops": [
{ "type": "truck_parking", "distance_along_route_m": 366500,
"properties": { "name": "Raststation Brennersee", "spaces": 60 } },
{ "type": "rest_areas", "distance_along_route_m": 351000,
"properties": { "name": "Area di servizio Trens", "spaces": 34 } }
]
}
]
}
],
"route_id": "rt_3b7e0a91"
}
Each stop carries a reason — the limit that trips there — the distance_along_route_m where it lands, the projected_time the driver reaches it, and the legal_deadline the rule allows. The four reasons:
| Reason | What tripped |
|---|---|
break_required | The driver hit the drive-time-since-break limit and owes a rest break (EU: 45 min after 4.5h). |
drive_limit | The daily driving limit is exhausted — the driver must stop for the day. |
duty_window | The on-duty window closed before the driving limit did (US / Canada). |
cycle_limit | The weekly/fortnightly budget ran out. |
The Part That Matters: Reachable Parking
Projecting where the clock runs out is the easy half. The operationally useful half is whether the driver can actually stop there. Each hos stop attaches a suggested_stops[] list — the truck parking, truck rest areas, and rest areas reachable before the legal deadline, ordered closest-to-the-deadline first so the driver gets the most legal driving out of the day. That list comes from NAPSPAN’s normalized parking data across European NAPs — the same DATEX II feeds behind the rest of the API.
And the flag no consumer navigation app surfaces: feasible. When it’s true, at least one legal stop is reachable in time. When it’s false, no legal parking is reachable before the deadline — a real compliance risk you want at dispatch time, not at the roadside. (feasible is omitted entirely if the parking lookup didn’t run, so a missing flag never reads as a misleading “false.”)
The Regimes
Three driving-time regimes ship today, each implemented against its actual regulation:
| Ruleset | Regulation | Key limits |
|---|---|---|
eu | Regulation (EC) No 561/2006 | 9h driving, 45-min break after 4.5h driving, 11h daily rest |
us | 49 CFR 395 (FMCSA, property-carrying) | 11h driving, 14h duty window, 30-min break after 8h driving, 10h daily rest |
canada_south | SOR/2005-313 (south of 60°N) | 13h driving, 14h duty + 16h elapsed window, 10h daily rest |
The EU 10-hour twice-weekly driving extension and the 56h/90h limits are expressed through the inline clock (drive_remaining_s, cycle_remaining_s) rather than assumed. The European aetr regime (for non-EU AETR countries) and Canadian canada_north are planned. If you don’t set a ruleset, the EU deployment defaults to eu.
Where It Fits
The projection is computed on the route geometry already in hand — pure projection over the polyline, not a second round of routing. It runs for the primary route only, and it rides the routing call you’re already making: no separate endpoint, no separate charge beyond the routing request itself. Routing is a paid-plan feature with a free 14-day trial.
Pair it with the corridor warnings[] — closures, roadworks, per-Member-State weight and dimension restrictions — and a single cross-border request (DE → AT → IT in one query) answers three questions at once: can this truck legally run this corridor, where will the driver have to stop, and is there parking when they do.
Try It
- API docs — full request and response reference for
POST /api/v1/routing/route - Live map — explore the underlying data across European NAPs
- Free API key — no card, 14-day trial
Plan the route, the legal break, and the parking — in one call
Send the driver’s clock with the route and get back every required break and stop, plus the parking reachable before each deadline. Free 14-day trial. No card.
Get Free API Key Explore the Map