WayMatrix Developer Portal
  • Getting started
  • API reference
Information
Matrix
    Travel-time and distance matrixpostTravel-time and distance matrix (explicit JSON form)post
Directions
    Route between two pointsgetRoute with full optionspostRoute, JSON formpostRoute, GeoJSON formpostRoute, GPX formpost
Isochrones
    Reachability polygonspostReachability polygons (explicit GeoJSON form)post
Service
    LivenessgetLiveness, headers onlyheadEngine and graph provenancegetEngine and graph provenance, headers onlyhead
Schemas
powered by Zuplo
WayMatrix Routing API
WayMatrix Routing API

Schemas


EngineError

The routing engine's error envelope.
​object
​object

GatewayError

A rejection from the gateway rather than the engine — authentication, rate limiting or quota. The shape matches hosted openrouteservice's own gateway: `error` is a plain string, not an object.
error
​string
code
​integer

An additional numeric code identifying the rejection, in a range the engine does not use. Additive: clients that read error as a string are unaffected.

Retry on the status; read the code to explain. More than one rejection shares a status, in both directions — a 429 may be a per-minute rate limit or a concurrency refusal, and a 403 may be an invalid key, an exhausted monthly quota, or a request from a web origin the key is not permitted to use. So the status is the reliable signal for whether to retry, and the code is the reliable signal for what to tell someone. New codes may be added within the range; a client that branches on the status keeps working when they are.

Example: 5003

Coordinate

​number[] · minItems: 2 · maxItems: 2

A [longitude, latitude] pair, in that order.

Example: {"0":-87.6298,"1":41.8781}

MatrixRequest

locations
​Coordinate[] · required

The points the matrix is computed over. At least two.

sources
​(integer | string)[]

Indices into locations to use as sources. Omit, or send ["all"], for every location. This field is half of what the request costs.

destinations
​(integer | string)[]

Indices into locations to use as destinations. Omit, or send ["all"], for every location. This field is the other half of what the request costs.

metrics
​string[]

Which matrices to return. Defaults to durations only.

Enum values:
duration
distance
resolve_locations
​boolean

Return the name of the nearest road for each snapped point.

units
​string · enum

Units for the distance matrix. Durations are always seconds.

Enum values:
m
km
mi
id
​string

An arbitrary identifier echoed back in the response metadata.

MatrixResponse

durations
​array[]

Travel times in seconds, as rows of sources by columns of destinations. A null entry means no route was found between that pair.

distances
​array[]

Distances, present only when requested via metrics.

​SnappedPoint[]
​SnappedPoint[]
​Metadata

The engine's metadata block, passed through unchanged, plus our added element count.

SnappedPoint

location
​number[] · minItems: 2 · maxItems: 2

A [longitude, latitude] pair, in that order.

Example: {"0":-87.6298,"1":41.8781}
snapped_distance
​number

Metres from the requested point to the road it was snapped to.

name
​string

Road name, present only when resolve_locations was set.

DirectionsRequest

coordinates
​Coordinate[] · required

The waypoints, in order, starting at the origin.

preference
​string · enum
Enum values:
fastest
shortest
recommended
units
​string · enum
Enum values:
m
km
mi
language
​string

Language for turn instructions.

instructions
​boolean

Include turn-by-turn instructions. Default true.

instructions_format
​string · enum
Enum values:
text
html
geometry
​boolean

Include the route geometry. Default true.

geometry_simplify
​boolean
elevation
​boolean
extra_info
​string[]
attributes
​string[]
continue_straight
​boolean
alternative_routes
​object

Request alternative routes.

options
​object

Advanced routing options such as avoid_features or avoid_polygons.

Note: requests carrying options are computed in the engine's flexible mode, which bypasses its speed-up structures and is roughly ten times more expensive. The engine applies a much smaller size limit to them.

radiuses
​number[]
bearings
​array[]
maximum_speed
​number
suppress_warnings
​boolean
id
​string

DirectionsJsonResponse

​object[]
bbox
​number[]
​Metadata

The engine's metadata block, passed through unchanged, plus our added element count.

IsochronesRequest

locations
​Coordinate[] · required

The centres of the isochrones.

range
​number[] · required

The ranges to compute, in seconds or metres depending on range_type. The engine enforces a maximum; exceeding it returns error 3004 naming the limit.

range_type
​string · enum

Whether range is seconds or metres. Default time.

Enum values:
time
distance
interval
​number

Produce intermediate bands at this step within each range.

units
​string · enum
Enum values:
m
km
mi
area_units
​string · enum
Enum values:
m
km
mi
location_type
​string · enum

Whether the locations are origins (start, the default) or destinations — the difference matters on one-way roads.

Enum values:
start
destination
attributes
​string[]
Enum values:
area
reachfactor
total_pop
intersections
​boolean
smoothing
​number
id
​string

IsochronesResponse

A GeoJSON FeatureCollection of reachability polygons.
type
​string
bbox
​number[]
​object[]
​Metadata

The engine's metadata block, passed through unchanged, plus our added element count.

Metadata

The engine's metadata block, passed through unchanged, plus our added element count.
attribution
​string

Required by licence. The Open Database Licence obliges this credit to travel with the data; it is never removed or altered.

Example: © openrouteservice by HeiGIT | Data from OpenStreetMap
service
​string
timestamp
​integer

Milliseconds since the Unix epoch.

query
​object

The request, echoed back.

​object
element_count
​integer

Added by this service. How many elements this call was metered for. Zero-cost and failed calls are not metered at all.

On this page
  • EngineError
  • GatewayError
  • Coordinate
  • MatrixRequest
  • MatrixResponse
  • SnappedPoint
  • DirectionsRequest
  • DirectionsJsonResponse
  • IsochronesRequest
  • IsochronesResponse
  • Metadata