Skip to content
Documentation menu
docs / api / post-v1-fuel-along
routing

POST/v1/fuel/along

API key required, sent as Authorization: Bearer snk_… or ?api_key=snk_….

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/v1/fuel/along" \
  -H "Authorization: Bearer $MAPMAP_KEY" \
  -H "Content-Type: application/json" \
  -d @request.json

Request body

application/json

Cheapest-fuel search: a route (geometry_polyline6, or origin + destination + costing), a fuel code (default diesel), optional max_detour_minutes (default 10, max 120), max_results (default 5, max 25), fill_litres (adds saving_total per result), Valhalla costing_options and an optional top-level adr profile

The OpenAPI document declares this body as a free-form JSON object with no field list, so there is nothing here to generate a table from. The prose above is what the gateway states about it; the raw document is the authority.

Responses

200Stations selling the requested fuel within the detour budget, freshest-priced first and cheapest within that: {fuel, costing, route: {duration_s, distance_m, length_m, detour_baseline_s, detour_baseline_m}, max_detour_minutes, candidates: {considered, costed, cap, selection}, coverage: {stations, countries, sources}, note (only when results is empty, naming which of the several causes applies), baseline: {<currency>: {value, station_id, brand, name, updated_at}}, results[]: {station_id, source, brand, name, lat, lon, price: {value, currency, updated_at, fetched_at}, stale, detour_minutes, detour_km, along_route_position, off_route_m, saving_per_litre, saving_total}, say, fuel_attribution}. route.duration_s/distance_m are the path search's own figures, the same journey POST /route answers; detour_baseline_* is the matrix leg every detour is computed against. The 25 costed candidates are those nearest the route by the straight-line detour bound (candidates.selection), and the baseline is a station that passed the detour filter, so a saving is never quoted against one the results could not contain. say is the whole answer as one short spoken line, present on every response including an empty one. Detours are engine-computed, never crow-flies. stale is true unless BOTH the price's own updated_at and the snapshot's fetch time are within 24 hours; a stale price is ranked after every fresh one, is never the baseline, and carries no saving_per_litre
400Invalid request
401Missing or invalid API key
429Quota or rate limit exceeded
501The fuel-price dataset is not enabled (SN_FUEL_PRICES unset)
502Upstream routing engine failed

Error bodies follow the shared problem model documented on API conventions.

Also under routing

Generated from https://api.mapmap.ai/openapi.json on 2026-11-01 · operationId post_fuel_along