Aquaplot API Docs
Reference for authentication, routing, distance, validation, and location search.
Download OpenAPI YAMLOverview
The Aquaplot API calculates ship routes and nautical distances between coordinates, validates whether coordinates can be used for routing, and searches Aquaplot's public maritime location database.
All requests use HTTPS and the production base URL:
https://api.aquaplot.com/v1
Coordinates are decimal degrees. Route, distance, and validation path parameters use longitude first, then latitude:
/from/{from_lng}/{from_lat}/to/{to_lng}/{to_lat}
JSON request bodies use explicit lat and lng fields. GeoJSON response geometries use standard GeoJSON coordinate order: [longitude, latitude].
Authentication
Create an API key in Aquaplot Console and send it with every API request using the standard Bearer token pattern.
| Header | Required | Value |
|---|---|---|
Authorization |
Yes | Bearer <token> |
curl \
-H "Authorization: Bearer <token>" \
https://api.aquaplot.com/v1/locations/hamburg
If authentication fails, the API returns 401 Unauthorized. Treat API keys like passwords and keep them out of client-side code, public repositories, and logs.
Routes
Use route endpoints when you need the calculated route path as GeoJSON. A successful response is a GeoJSON FeatureCollection; each feature contains a LineString geometry and route metrics in properties. Distance metrics, including distance.total and total_length, are reported in nautical miles.
GET /v1/route/from/{from_lng}/{from_lat}/to/{to_lng}/{to_lat}
Calculates one route from coordinates in the URL. Optional query parameters control canal, strait, risk-area, and validation behavior.
| Parameter | In | Required | Values | Description |
|---|---|---|---|---|
from_lng, from_lat |
Path | Yes | Number | Departure longitude and latitude in decimal degrees. |
to_lng, to_lat |
Path | Yes | Number | Destination longitude and latitude in decimal degrees. |
| Passage options | Query | No | true, false |
suez, panama, kiel, corinth, gibraltar, messina, singapore, dover, magellan, floridaStrait, bosphorus, oresund, sunda, torres, malacca, littleBelt, dardanelles, northwest, and northeast. |
eca, hra, jwc |
Query | No | ignore, minimize |
Controls how the route treats emission control, high risk, and Joint War Committee areas. |
autovalidate |
Query | No | true, false |
When enabled, validates the start and end points before routing. |
curl \
-H "Authorization: Bearer <token>" \
"https://api.aquaplot.com/v1/route/from/4.9041/52.3676/to/103.8198/1.3521?suez=true&panama=false&eca=minimize"
{
"type": "FeatureCollection",
"status": "ok",
"features": [
{
"type": "Feature",
"properties": {
"aqpRequestId": "",
"id": "",
"total_length": 8280.42,
"distance": {
"total": 8280.42
}
},
"geometry": {
"type": "LineString",
"coordinates": [
[4.9041, 52.3676],
[103.8198, 1.3521]
]
}
}
],
"errors": []
}
POST /v1/routes
Calculates up to 100 routes in one request. Use id to correlate each returned feature or error with your own shipment, estimate, or job record.
| Field | Required | Type | Description |
|---|---|---|---|
requests |
Yes | Array, 1-100 items | Routes to calculate. |
requests[].id |
No | String | Client-provided identifier returned in feature properties and route errors. |
requests[].from, requests[].to |
Yes | Object | Coordinate objects with lat and lng numbers. |
requests[].averageVesselSpeedOverGround |
No | Number, 1-100 knots | Average speed over ground in knots. |
requests[].options |
No | Object | Same route options as the single-route endpoint. To define areas to avoid, set nogoBlocks to an array of objects with coords: an array of at least three coordinate objects, each with lng and lat values. Optional prop metadata may also be included. |
curl \
-X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{
"id": "ams-sin-001",
"from": { "lng": 4.9041, "lat": 52.3676 },
"to": { "lng": 103.8198, "lat": 1.3521 },
"options": {
"suez": "true",
"panama": "false",
"eca": "minimize"
}
}
]
}' \
https://api.aquaplot.com/v1/routes
Batch responses use the same FeatureCollection shape as single-route responses. Successful route features appear in features; per-route calculation failures appear in errors with the original request and a message. A response can contain both successful features and route errors when only part of a batch fails.
Distance
Use the distance endpoint when your integration needs the route distance and can use the single-route URL shape. It returns the same GeoJSON FeatureCollection format as the route endpoint, with one route feature.
GET /v1/distance/from/{from_lng}/{from_lat}/to/{to_lng}/{to_lat}
| Parameter | In | Required | Values | Description |
|---|---|---|---|---|
from_lng, from_lat, to_lng, to_lat |
Path | Yes | Number | Departure and destination coordinates, longitude first. |
| Routing options | Query | No | Same as route endpoint | Controls allowed passages, risk-area minimization, and autovalidate. |
curl \
-H "Authorization: Bearer <token>" \
"https://api.aquaplot.com/v1/distance/from/4.9041/52.3676/to/103.8198/1.3521?autovalidate=true"
{
"type": "FeatureCollection",
"status": "ok",
"features": [
{
"type": "Feature",
"properties": {
"total_length": 8280.42,
"distance": {
"total": 8280.42
}
},
"geometry": {
"type": "LineString",
"coordinates": [
[4.9041, 52.3676],
[103.8198, 1.3521]
]
}
}
],
"errors": []
}
Read the distance in nautical miles from features[0].properties.distance.total. total_length is also available for integrations that already use that field. The geometry is included so distance consumers can still inspect or display the path used for the calculation.
Validation
Validation tells you whether coordinates are suitable for route calculations. Use it before routing when coordinates come from user input, third-party geocoding, AIS data, or another source that may place points on land or outside navigable water.
GET /v1/validate/{lng}/{lat}
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
lng, lat |
Path | Yes | Number | Coordinate to validate, longitude first. |
curl \
-H "Authorization: Bearer <token>" \
https://api.aquaplot.com/v1/validate/4.9041/52.3676
{
"status": "ok",
"is_valid": true,
"suggestion": [4.9041, 52.3676],
"moved_by": 0,
"validatedLatlng": {
"lat": 52.3676,
"lng": 4.9041
}
}
POST /v1/validate
Validates up to 100 coordinates in one request and returns results in the same order as the submitted requests array.
| Field | Required | Type | Description |
|---|---|---|---|
requests |
Yes | Array, 1-100 items | Coordinates to validate. |
requests[].lat, requests[].lng |
Yes | Number | Latitude and longitude in decimal degrees. |
curl \
-X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{ "lng": 4.9041, "lat": 52.3676 },
{ "lng": 103.8198, "lat": 1.3521 }
]
}' \
https://api.aquaplot.com/v1/validate
[
{
"status": "ok",
"is_valid": true,
"suggestion": [4.9041, 52.3676],
"moved_by": 0,
"validatedLatlng": {
"lat": 52.3676,
"lng": 4.9041
}
}
]
When is_valid is false, use suggestion or validatedLatlng when present to show a corrected nearby routable point. moved_by reports the correction distance in meters.
Locations
Use location search to help users find ports and known maritime locations. Search is case-insensitive and matches by name or UN/LOCODE substring. Queries must be 2-32 characters and results are limited to 20 matches.
GET /v1/locations/{name}
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
name |
Path | Yes | String, 2-32 characters | Substring of a location name or UN/LOCODE. Letters, numbers, spaces, commas, periods, underscores, hyphens, and parentheses are accepted. |
curl \
-H "Authorization: Bearer <token>" \
https://api.aquaplot.com/v1/locations/hamburg
[
{
"name": "Hamburg",
"latlng": {
"lat": 53.5461,
"lng": 9.9661
},
"country": "Germany",
"locode": "DEHAM",
"type": "port"
}
]
Each result includes name, latlng, and type. country and locode are returned when known.
Errors
For request-level failures, the API returns an HTTP status code and a JSON error object. Route batch calculation errors can also appear inside a successful 200 response under the top-level errors array.
| Status | When it occurs | How to handle it |
|---|---|---|
400 Bad Request |
Malformed JSON, invalid coordinates, missing or incorrectly ordered path parameters, unsupported option values, or an empty or oversized batch. | Fix the request before retrying. |
401 Unauthorized |
Missing, malformed, expired, or invalid Bearer token. | Send Authorization: Bearer <token> with a valid token. |
500 Internal Server Error |
Unexpected service failure. | Retry with backoff if the request is safe to repeat, and contact Aquaplot support if the issue persists. |
502 Bad Gateway |
Aquaplot routing, validation, or location search was temporarily unavailable. | Retry with backoff. |
{
"status": "error",
"reason": "invalid_request"
}
For production integrations, log the endpoint, HTTP status, response body, and your request identifier, but do not log API tokens or sensitive customer payloads.
OpenAPI
The OpenAPI document is the canonical machine-readable API reference. Use it to generate clients, inspect schemas, or import Aquaplot into API tooling.
The schema includes all public endpoints, request bodies, response schemas, authentication requirements, and supported routing options.