The streets a delivery follows between two points, as a line to draw.
GET
/v1/routes
const url = 'https://courierapi.itdlogisoft.co.uk/v1/routes?fromLatitude=1&fromLongitude=1&toLatitude=1&toLongitude=1';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://courierapi.itdlogisoft.co.uk/v1/routes?fromLatitude=1&fromLongitude=1&toLatitude=1&toLongitude=1' \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”fromLatitude
required
number | string format: double
fromLongitude
required
number | string format: double
toLatitude
required
number | string format: double
toLongitude
required
number | string format: double
vehicle
string
Responses
Section titled “Responses”OK
Media typeapplication/json
The line a delivery follows between two points, for a map to draw.
From GET /v1/routes. The distance and time are the same road network the price came from,
so the line and the quote agree; the shape is every bend, in order, ready to be drawn.
object
distance_metres
required
integer | string format: int32
duration_seconds
required
integer | string format: int32
shape
required
Array<object>
One bend in a route.
object
latitude
required
number | string format: double
longitude
required
number | string format: double
Example generated
{ "distance_metres": 1, "duration_seconds": 1, "shape": [ { "latitude": 1, "longitude": 1 } ]}Unprocessable Entity
Media typeapplication/json
The shape of every refusal from this API.
string ApiError.Code is stable and machine-readable; string ApiError.Message is for a human reading a log and may change without notice. Integrators are told to branch on the code.
object
code
required
string
message
required
string
Example generated
{ "code": "example", "message": "example"}