Errors
Error response format
Authentication and quota errors:/route, /table, /match, /trip, /nearest) follow the OSRM convention: HTTP 400 with a code and an optional message in the body:
/optimize) uses code 0 (success), 1 (internal error), 2 (input error), or 3 (routing error), with details in the error field.
Authentication errors (HTTP 401)
Quota errors (HTTP 429)
OSRM endpoint errors (HTTP 400)
On success, OSRM endpoints return HTTP
200 with code: "Ok". Business errors live in the code field — don’t rely on the HTTP status code alone to distinguish them.FAQ
Why does a coordinate in the sea or inside a building still return 200?
Why does a coordinate in the sea or inside a building still return 200?
OSRM snaps coordinates to the nearest drivable road.
waypoints[].distance in the response is the offset in meters from your input coordinate to the snapped point — a large value means the input coordinate is low quality.Why do cross-country requests fail?
Why do cross-country requests fail?
All coordinates in a single request must be in the same country. See Coverage for details, or contact hello@justrouting.tech for cross-border needs.
