Skip to main content

Error response format

Authentication errors (HTTP 401) carry a single error string:
Quota errors (HTTP 429):
Routing endpoints (/route, /table, /match, /trip, /nearest) follow the OSRM convention: HTTP 400 with a code and an optional message in the body:
The optimize endpoint (/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)

Routing endpoint errors (HTTP 400)

On success, routing 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. Errors carry an optional human-readable message field; successful /route responses may include data_version, a timestamp of the OpenStreetMap data used.

FAQ

We snap 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.
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.