Skip to content
Documentation menu
docs / api / post-v1-clearance-along
Clearance

POST/v1/clearance/along

Access and price

AuthAn API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Needs a full key; a browser (maps) key is refused.
PriceA flat 5 calls. Class: standard, or premium for truck and ADR work. Published as unit_rules.clearance in /pricing.json.
PremiumWhen the body asks for truck routing: "costing": "truck", a top-level adr object or "hazmat": true

What it does

Measured overhead clearance along a route shape.

An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Metered. Price: A flat 5 calls.

Call it

bash
curl -fsS -X POST "https://api.mapmap.ai/v1/clearance/along" \
  -H "Authorization: Bearer $MAPMAP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"geometry_polyline6":"string","vehicle_height_m":0}'

Request body

application/json · ClearanceAlongRequest

Route shape as polyline6 plus the vehicle's height in metres (optional width, operating margin and dataset narrowing)

FieldTypeRequiredDescription
datasetsstring[]noNarrow the search to these datasets. The default is every dataset this key may see whose survey covers the corridor. A name this key may not see, or that does not exist, is dropped: the answer is the same "not surveyed" either way.
geometry_polyline6stringyesThe corridor as a Google encoded polyline, six-digit precision, typically geometry_polyline6 from a prior /route response. Capped at 10,000 vertices.
include_station_geometrybooleannoFill every section's deprecated polyline array with the raw station positions ([lng, lat], one per 0.5 m station) instead of the simplified points polyline6 encodes. Off by default: on a whole-route "not surveyed" run the raw array is megabytes.
margin_mnumbernoThe caller's operating margin in metres, added to the height. Defaults to zero, and is echoed back: no compliance policy is baked in here, both figures are reported.
vehicle_height_mnumberyesVehicle height in metres. Required: there is no default vehicle.
vehicle_width_mnumbernoVehicle width in metres. The width axis is assessed only when this is given; without it the report answers for height and says so.

Example: A request assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "geometry_polyline6": "string",
  "vehicle_height_m": 0
}

Responses

200The clearance report: verdict per axis, limiting point with its bound, coverage, datasets read
FieldTypeRequiredDescription
advisoriesAdvisory[]yesNotes on stretches of the route.
basisstringyesAlways surveyed_geometry_not_signage.
clearance_enforcementClearanceEnforcementyesThe honesty block.
datasetsDatasetRef[]yesThe datasets drawn on.
explanationstringyesOne-line honest summary. British English, no claim words, no em dashes; see explain.rs, which enforces that rather than asking.
heightRouteVerdictOutyesThe height axis.
routeRouteRefyesThe route the question was asked about.
vehicleVehicleQueryyesThe vehicle, echoed back including its margin.
widthWidthOutyesThe width axis.

Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call

json
{
  "advisories": [
    {
      "note": "string",
      "section": {}
    }
  ],
  "basis": "string",
  "clearance_enforcement": {
    "basis": "string",
    "caveat": "string",
    "route_certified": false,
    "vertical_datum": "string"
  },
  "datasets": [
    {
      "dataset": "string",
      "stale": false,
      "survey_dates": "string"
    }
  ],
  "explanation": "string",
  "height": {
    "coverage": {},
    "verdict": "pass"
  },
  "route": {
    "distance_m": 0,
    "geometry_polyline6": "string"
  },
  "vehicle": {
    "height_m": 0,
    "margin_m": 0
  },
  "width": {}
}
400Invalid request

application/problem+json · Problem

401Missing or invalid API key. Also: No key, or a missing, malformed, unknown, revoked or expired one (unauthorized); the body carries signup, docs and a one-call hint for a free key

application/problem+json · Problem

402Beyond the included volume with no way to pay this call: an x402 body naming how to pay (provisional key past its allowance, prepaid balance below the price, or a rejected X-PAYMENT). Not problem+json

application/json · X402PaymentRequired

403The key may not call this: a browser key outside its scope (scope-insufficient), a request from an origin the key does not allow (origin-not-allowed), or an account restriction (forbidden)

application/problem+json · Problem

413The request declares a body larger than 1048576 bytes (plain text, not problem+json)

text/plain

429Quota or rate limit exceeded. Also: Per-key rate limit (rate-limited, with Retry-After), or monthly quota exhausted with no payment path (quota-exceeded)

application/problem+json · Problem

501No clearance artefacts are configured on this deployment

application/problem+json · Problem

504The request did not finish within the gateway's request deadline (request-timeout)

application/problem+json · Problem

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

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