GuidesAPI Reference
API Reference

**ALPHA** Upload a Routing Matrix

ALPHA Upload a routing matrix for use in subsequent asynchronous requests. To gain access to this endpoint, contact your regional HERE representative.

Body Params

A routing matrix tailored for a specific vehicle profile. This matrix includes such data as travel times and distances between various locations, optimized for the vehicle's characteristics. The matrix is used in subsequent requests to solve routing problems asynchronously.

ALPHA Routing matrix for vehicle profile.

The matrix has to contain 2 flat arrays, travelTimes and distances. Each array represents a 2D matrix where rows correspond to origins and columns to destinations.

The k-th position in the array corresponds to the (i, j) position in the matrix defined by the following relationship:

k = num_destinations * i + j,

where i is origin and j is destination.

Important: The order of elements in both arrays is crucial. Data should be arranged in the same order as in origins array.

If there is no route between i and j or a route violates some options, another errorCodes array should be included with a detailed error code for each pair of positions.

origins
array of objects
required
length between 2 and 10000

An ordered list of origins used in the routing matrix

origins*
travelTimes
array of int32s
required
length between 4 and 100000000

Corresponds to 2D matrix of travelTimes (in seconds).

travelTimes*
distances
array of int32s
required
length between 4 and 100000000

Corresponds to 2D matrix of distances (in meters).

distances*
errorCodes
array of int32s
length between 4 and 100000000

Contains error codes for entries in the matrix if there is no route between i and j. Optional, no need to be added if all routes exist.

ValueReason
0No error, a route is available
1No route between the origin and destination exists
2No valid starting or ending point for the route between the origin and destination locations
3The route between the origin and destination exists but includes violations that could make it potentially unusable
4The origin and destination locations are either just inside the acceptable range or completely outside the allowed area. Because of this, there are no valid route start or end points for origin and destination locations
99Unknown error (for debugging and handling unexpected situations)
errorCodes
Headers
string

User-provided token that can be used to trace a request or a group of requests sent to the service.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json