Spire Maritime Routing API

Details of the Spire Maritime Routing API

The Spire Maritime Routing API

Status: In Beta Testing - Expected release mid May 2020

Endpoint is

https://api.sense.spire.com/routing

Sample call 

https://api.sense.spire.com/routing?port_start_unlocode=FRMRS&port_end_unlocode=CNSHG&suez=1&panama=1

Sample Results

{
"status": "ok",
"distance": 518,
"eta": "2020-04-23T11:23:54",
"route": "LINESTRING(-1.429283 50.900166999999996,-1.327933 50.848733,-1.1262 50.7567,-0.8954 50.6202,-0.7533 50.5533,-0.5817 50.5017,-0.4083 50.465,-0.19415 50.47415,-0.0033 50.50585,0.09335 50.52085,0.30165 50.565425,0.5025 50.605,0.6355 50.6575,0.8441500000000001 50.7558,1.0483 50.855,1.24125 50.9564,1.3083 50.98915,1.54907 51.1143,1.558 51.13197,1.57104 51.17289,1.57242 51.20172,1.57173 51.25461,1.56487 51.29713,1.675 51.32,1.8937 51.39165,2.086675 51.53335,2.29335 51.6867,2.47795 51.815,2.69665 51.98585,2.93415 52.165,3.1083 52.2883,3.22125 52.37835,3.380825 52.510825,3.5533 52.6467,3.785825 52.83085,4.000025 52.9721,4.2117 53.09,4.41 53.187075,4.6549 53.3433,4.8717 53.445,5.093325 53.4929,5.3008500000000005 53.53585,5.3817 53.5475,5.59335 53.5992,5.8075 53.63415,5.9941499999999985 53.67665,6.2 53.71415,6.39585 53.74335,6.6 53.7833,6.7917 53.81,7.0 53.83835000000001,7.095 53.8442,7.29165 53.87415,7.413325 53.89665,7.590425 53.910825,7.783325 53.9021,7.8828999999999985 53.8954,8.09665 53.9917,8.1933 53.995,8.3883 53.985,8.5783 53.9617,8.67783 53.96134,8.73001 53.92779,8.83026 53.89362,8.94596 53.87601,9.04758 53.8754,9.1014 53.87793,9.10415 53.8775,9.15916 53.8748,9.21032 53.87095,9.30611 53.85901,9.37168 53.79741,9.43932 53.72983,9.4812 53.71825,9.50317 53.67719,9.54334 53.62102,9.57081 53.60901,9.61304 53.58904,9.64806 53.57049,9.68685 53.56519,9.74316 53.56172,9.80427 53.55295,9.87534 53.54296,9.875167 53.5415)"
}

API Parameters

Parameter name

Required

Type

Description

port_start_unlocode

Yes (use only:

port_start_unlocode

OR

latitude ANDlongitude

string

UN/LOCODE as defined by the UNECE (https://www.unece.org/cefact/locode/service/location.html)

longitude

 

float

 

latitude

 

float

 

port_end_unlocode

Yes

string

UN/LOCODE as defined by the UNECE (https://www.unece.org/cefact/locode/service/location.html)

vessel_type

Optional

string

This correspond to the type of vessel for which the route needs to be calculated

suez

Optional (Default value = 1)

int

Set to 1 to allow the route to go through the Suez channel.

panama

Optional (Default value = 1)

int

Set to 1 to allow the route to go through the Panama channel.

distance

Yes

float

The Distance (in NM) between the specified point or port to the destination port

eta

Yes

Timestamp (UTC)

Estimated Time of Arrival

route

Yes

string

Route/Waypoints as Linestring Geometry in WKT - Well-Known Text

API Response Codes

Code

Error

Description

Reason / Info

440

Unknown (origin | destination) location

Not found in UNECE  UN/LOCODE Code

 

441

No routes to connect the ports

We cannot support this port-to-port route

Not enough data from the original datasets

442

Destination is not cached yet

Destination port has not been cached for the current version yet

Should be available within the same day

443

No routes to connect the starting point

The lat lon pair provided is not supported for this destination

Not enough data from the original datasets

444

There is not a route close to the waypoint, try increasing tolerance (serverside)

There is no waypoint close to this lat lon pair

Tolerance is the measure of how distant a given lat/lon pair can be to any supported route

445

Port not available for dry bulk vessels

 

 

446

Locode {port} not recognized

Wrong LOCODE (Locode not available in global DB)

 

447

Unsupported MMSI {mmsi}

Wrong MMSI (MMSI not available in global DB)