Skip to content

50,000 free calls a month, card-free. Get an API key →

Documentation menu
docs / api / post-v1-route-heritage
routing

POST/v1/route/heritage

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

Call it

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

Request body

application/json · HeritageBody

The route shape as polyline6, ideally its duration, plus an optional silence budget and audio container

FieldTypeRequiredDescription
duration_snumbernoThe route's own duration in seconds, typically duration_s from the same response. Supply it: without it the silence budget falls back to a distance, and "three to five lines an hour" is a claim about time that a distance answers wrongly at both ends.
geometry_polyline6stringyesThe route shape as a Google encoded polyline, six-digit precision, typically geometry_polyline6 straight out of a prior /route response.
max_linesintegernoCeiling on how many lines come back (1 to 50, default 12).
max_offset_mnumbernoHow near a plaque's own recorded coordinate must come to the route before its line may be spoken, metres (default 60, hard ceiling 80). Past about eighty metres the subject stops being something the driver is passing, so the ceiling cannot be lifted from a request body.
min_gap_mnumbernoLeast distance between two spoken lines, metres (default 400). A floor under the time budget in every case, and the whole budget when no duration is supplied.
min_gap_snumbernoLeast time between two spoken lines, seconds (default 900, which is four an hour). Applied only when duration_s is given.
voice_formatstringnoContainer to give each line's audio clip address in: opus (Android) or m4a (iOS). Given, every line gains a clip with the synthesis cache key and the URL to fetch it from. Omitted, no clip is computed and the answer is text only.

Responses

200Lines in route order, each with at_m, the say sentence, the measured offset_m from the plaque's own coordinate to the route, the plaque_ids the claim rests on, and (when voice_format was given) the clip that speaks it; plus a census of what was not said, the attribution the source dataset is owed, and the standing caveat
400Invalid request
401Missing or invalid API key
429Quota or rate limit exceeded
501voice_format was asked for on a deployment with no voice service configured (urn:sn-gateway:problem:voice-not-enabled)

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

Also under routing

Generated from https://api.mapmap.ai/openapi.json on 2026-09-22 · operationId post_route_heritage