Spire Maritime Routing API

Details of the Spire Maritime Routing API

The Spire Maritime Routing API

The Spire Routing API is used in the background to generate predicted routes and ETA at destination ports for vessels, the data being primarily provided through the Spire Vessels API.

It may however by special arrangement be made available to clients who need a port to port or point to port routing solution that is not just driven by specific vessels latest positions.

API Endpoint : 

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

Sample call requesting port to port route

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)"
}

Sample call requesting ship position to port route

https://api.sense.spire.com/routing?port_end_unlocode=NZBLU&latitude=-11.75843&longitude=143.11461&mmsi=538008659&speed=11.1

Sample Results

{
"status": "ok",
"distance": 2531,
"eta": "2020-06-26T09:26:16",
"route": "LINESTRING(143.11461 -11.75843,143.19560 -11.84620,143.24900 -12.05000,143.24450 -12.13440,143.34170 -12.37980,143.44710 -12.56720,143.55540 -12.74900,143.62360 -12.85250,143.74950 -13.05060,143.83700 -13.25660,143.93500 -13.45300,144.05470 -13.64480,144.22380 -13.85820,144.28680 -13.93090,144.45530 -14.11320,144.64330 -14.27920,144.71780 -14.37240,144.94780 -14.55180,145.10690 -14.69000,145.20081 -14.78750,145.26484 -14.81156,145.32955 -14.85388,145.36526 -14.91178,145.39169 -14.96336,145.40834 -15.03134,145.43221 -15.12251,145.42465 -15.19276,145.40955 -15.24974,145.38414 -15.30405,145.38090 -15.44090,145.37280 -15.63870,145.44230 -15.85050,145.48990 -16.02280,145.57780 -16.24930,145.65760 -16.44270,145.75740 -16.64830,145.83480 -16.82640,146.04780 -17.05390,146.14200 -17.27920,146.19700 -17.45370,146.22930 -17.56140,146.29430 -17.78390,146.36440 -18.02080,146.45660 -18.24220,146.55020 -18.34970,146.75340 -18.54460,146.97550 -18.72780,147.12130 -18.86930,147.30290 -19.01390,147.40100 -19.09120,147.55720 -19.21210,147.72810 -19.35220,147.85130 -19.44920,148.09920 -19.56890,148.33670 -19.65990,148.49890 -19.74780,148.72230 -19.86190,148.92160 -19.98010,149.04130 -20.05200,149.24940 -20.21980,149.36710 -20.34630,149.55110 -20.54670,149.71450 -20.73280,149.88630 -20.92700,150.05990 -21.11820,150.28380 -21.35970,150.46010 -21.54910,150.55410 -21.64140,150.75060 -21.84960,150.96630 -22.06130,151.05640 -22.12930,151.29150 -22.30460,151.53660 -22.50120,151.69330 -22.63700,151.93240 -22.85050,152.11690 -23.00730,152.32830 -23.25080,152.54730 -23.47210,152.64500 -23.62010,152.74950 -23.75580,152.84340 -23.90890,152.98530 -24.15210,153.08310 -24.22570,153.23170 -24.45960,153.37220 -24.69490,153.52350 -24.85140,153.63080 -25.02250,153.73150 -25.15460,153.78980 -25.27860,153.91050 -25.44380,154.00170 -25.55890,154.07210 -25.74230,154.24030 -25.95170,154.43310 -26.17310,154.53330 -26.31850,154.58150 -26.46820,154.70150 -26.66710,154.78210 -26.81180,154.88060 -27.02590,155.02990 -27.25240,155.15090 -27.44590,155.24610 -27.64750,155.33830 -27.81980,155.39150 -27.92490,155.47940 -28.15810,155.61210 -28.38810,155.74320 -28.63750,155.82200 -28.85700,155.93140 -29.07920,156.01910 -29.24310,156.07410 -29.33300,156.17500 -29.52350,156.23930 -29.64530,156.32520 -29.78900,156.41480 -29.95930,156.52010 -30.14860,156.61600 -30.32870,156.72540 -30.53310,156.78990 -30.65930,156.92000 -30.88720,157.02400 -31.07110,157.13090 -31.24730,157.23790 -31.46950,157.36870 -31.70180,157.48880 -31.93480,157.64000 -32.16040,157.71720 -32.33770,157.80430 -32.46170,157.89670 -32.64550,157.95690 -32.75770,158.03160 -32.90750,158.15770 -33.09020,158.21290 -33.21700,158.30660 -33.35680,158.37810 -33.52520,158.47020 -33.69120,158.58080 -33.88210,158.62710 -33.99750,158.71980 -34.14800,158.79810 -34.28330,158.94940 -34.53290,159.03580 -34.68850,159.15970 -34.90900,159.23790 -35.05450,159.37100 -35.27030,159.49950 -35.49570,159.61380 -35.68940,159.76630 -35.93650,159.89990 -36.17210,160.06770 -36.42030,160.14620 -36.62230,160.18110 -36.67250,160.30670 -36.89770,160.41470 -37.06270,160.45510 -37.21230,160.59960 -37.43570,160.71220 -37.64300,160.86940 -37.82660,161.06880 -38.06210,161.20030 -38.29600,161.38590 -38.50350,161.54070 -38.71720,161.68990 -38.95800,161.78320 -39.11430,161.94460 -39.35590,162.10380 -39.60110,162.24080 -39.84000,162.35570 -40.03880,162.41740 -40.14820,162.53400 -40.35340,162.58840 -40.45050,162.70960 -40.66210,162.84650 -40.90290,163.00000 -41.13410,163.18190 -41.35960,163.33260 -41.56940,163.45810 -41.74950,163.59340 -41.98300,163.73260 -42.19670,163.90500 -42.44030,164.05220 -42.64930,164.10610 -42.73450,164.21230 -42.91990,164.35650 -43.14570,164.51410 -43.39350,164.67760 -43.63010,164.75270 -43.74660,164.85370 -43.91970,164.95690 -44.10100,165.05080 -44.24420,165.22140 -44.48610,165.38070 -44.72060,165.53720 -44.94140,165.68370 -45.12460,165.81350 -45.32760,165.94260 -45.51970,166.03740 -45.67700,166.15020 -45.79750,166.26870 -45.93130,166.45100 -46.14650,166.65300 -46.23820,166.86640 -46.34520,166.97580 -46.34500,167.19160 -46.42000,167.43410 -46.51240,167.58060 -46.52600,167.70010 -46.54730,167.84740 -46.58250,168.07950 -46.61030,168.22120 -46.64690,168.34323 -46.59323)"
}

Sample_point_to_Port_NZBLU

API Parameters

Parameter name

Required

Type

Description

port_start_unlocode

Yes (use only:

port_start_unlocode

OR

latitude AND longitude

string

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

longitude

 

float

Longitude of starting point of route IE. vessel's position

latitude

 

float

Latitude of starting point of route IE. vessel's position

port_end_unlocode

Yes

string

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

mmsi

Optional

int

mmsi of vessel, whose type and size is checked and used to predict the route. Note only works for Dry Bulk vessels as of 2020-06.

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.

 

 

 

 

 

API Response Properties

Property

Type

Description

status

string

result code for API request

distance

float

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

eta

Timestamp (UTC)

Estimated Time of Arrival

route

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)