Compute Route
Compute Route
POST
/api/v1/routing/route?token=<token string>
Description
Feature Preview: This endpoint is restricted to pilot customers. Contact Us if you are interested in access.
Compute a route between a set of two or more waypoints.
The API will internally run a path planning algorithm which attempts to find a safe, optimal route based on a number of constraints (Vessel draft, turning restrictions, etc.)
If successful, the endpoint will return a path as an array of latitude & longitude points.
If the routing fails, the endpoint will return an array of error messages.
Request Body
The request body should be JSON-encoded.
- waypoints (Required): An array of two or more input waypoints as
[latitude, longitude]pairs. The algorithm will be constrained to route through each of these waypoints sequentially.
Query Parameters
- token (Required): Vector Charts API token.
Example Request
POST https://api.vectorcharts.com/api/v1/routing/route?token=299ce9bf4f244300a96f3926240f9c0d
Request Body:
{
waypoints: [
[42.338749, -70.986042],
[42.303464, -70.948277]
]
}
Example Response
Status Code: 200 OK
Response Body:
{
"success": true,
"messages": [],
"route": [
[42.340272, -70.985527],
[42.333293, -70.973511],
[42.335323, -70.960980],
[42.335323, -70.947762],
...
]
}