Map Zone

Mapzone Routing API (Philippines) - Google-compatible (1.0.0)

Contract for the PH routing service as called by the LiveMap BFF (LiveMap:Routing). Compatible with Google's Directions API + Distance Matrix API: HTTP is always 200 with a JSON object body (UTF-8), errors are reported in the status field, field names are snake_case. Full spec (TSP semantics, how the BFF handles each status, limits, acceptance checklist): routing-api-spec.md.

Required rules:

  • No redirects (the BFF does not follow 3xx, including adding/removing a trailing / or http -> https).
  • The body is forwarded as-is to the public demo page: it must never contain a key (including in error_message), the original URL/query, a stack trace, or an internal host.
  • Transient errors use OVER_QUERY_LIMIT / UNKNOWN_ERROR (the BFF does not cache these); input errors use ZERO_RESULTS / NOT_FOUND / INVALID_REQUEST. status is case-sensitive; a status outside the enum, or a missing status, is cached by the BFF for 10 minutes as if it were a successful result.
  • pattern / enum / required on parameters only describe what the BFF sends - they are not meant to drive automatic request validation (turn off framework/codegen request validation). A missing/invalid parameter still returns HTTP 200 + status: INVALID_REQUEST (the BFF turns a raw 400/422 into a 502).
  • Never emit null: a field with no value is omitted from the JSON entirely.
  • Results are deterministic for the same input (the BFF caches for 10 minutes, keyed by path + query).
  • Polyline: Google's Encoded Polyline Algorithm, precision 1e5, lat,lng order; the overview is the full geometry.
Servers
Gateway (APISIX) - example
https://ph.map.zone