Route Optimisation plans a route for a vessel and returns optimised variants of it. It takes weather, vessel performance and your operating limits into account. It comes with a subscription to the Podium Voyage module.Every endpoint is on https://route-api.polestar-production.com and takes a bearer token from sign-in. See Podium Authentication.
GET /v1/routingPoints lists the canals, straits and passages a route can use, each open or closed by default. Pass their codes in routing_points_to_open or routing_points_to_close. A list you send replaces the default set for that list.
Opening a point that is closed by default
To open a point that is closed by default, such as KIE, also send routing_points_to_close with every other default-closed point. If you leave the close list out, the point ends up in both lists. To close a point that is open by default, such as SUZ, send the open list the same way.
A voyage binds a route to a vessel model, a departure time and your optimisation options. Creating it does not start the calculation.The options use these units.
GET /v1/voyages/{voyage_id}/start starts the optimisation. This GET changes state: call it once per voyage, and never prefetch or retry it automatically.A calculation usually takes 10 to 15 minutes. Poll GET /v1/voyages/{voyage_id} every one to two minutes until status contains completed (done) or error (failed). Stop after about 30 minutes.
status
Meaning
empty
Created, not started
state.enqueued
Started and queued
state.task.completed
Finished. The routes are ready
error.task.failed
Failed
Other in-progress values may appear, so test for completed and error rather than matching exact values.
A computation is not a result
GET /v1/voyages/{voyage_id}/computations returns when a computation started. A 200 there does not mean the results are ready. Use the voyage status.
GET /v1/voyages/{voyage_id}/routes returns one variant per objective.
Variant
Optimised for
foa
The baseline (first-order approximation)
min_time
Minimum time
min_fuel
Minimum fuel
best_tce
The cheapest voyage: lowest time-charter equivalent cost
best_dta
Best fit to the desired arrival time. Only when the voyage has dta, and it can't be exported
Each variant carries its waypoints and a features block of totals:
Total
Unit
distance
distance_unit, nautical miles by default
time
hours (consumption.time is the same in days)
fuelOil, fuelLowSulfur, cO2
tonnes
expenses, tce
In the currency of daily_rate and fuel cost. tce is the time-charter equivalent cost: fuel plus days at daily_rate. Lower is cheaper
savings
percent better than foa. Negative is worse
Everything inside routes is camelCase (creationDate, cO2, fuelLowSulfur), unlike the rest of the API. Ignore fields you don't recognise: more may be added.Export one variant as Rtz, Csv, Txt or Json (zipped) with GET /v1/voyages/{voyage_id}/{type}/{format}/export.
Errors carry status, title, detail and usually field. A missing or invalid value returns 422. A body that is not valid JSON returns 400. Quote meta.request_id from a response when you contact support.