Trip

Building requests for the Trip API

Before you can start using the API, you will need to obtain the authentication token.

The following headers will be required, where the word token must be replaced by the token obtained in the authentication process:

--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token'

In body all the parameters will be sent to solve the route calculation.

The Trip API can work in two ways, synchronously or asynchronously.

Synchronous Trip

With Synchronous Trip it is possible to obtain the routing result in a single request. Synchronous Trip has the following endpoints, where the term {{tripId}} must be replaced by the ID of the route to be queried:

The route coordinates in Synchronous Trip will be returned in the format polyline format for better performance.

Asynchronous Trip

Unlike Synchronous Trip, when sending a request to Asynchronous Trip only the route ID will be returned for future reference. It also has two extra endpoints that make it possible to check the status of request processing.

Asynchronous Trip has the following endpoints, where the term {{tripId}} must be replaced by the ID of the route to be consulted:

The route coordinates in Asynchronous Trip will be returned in object.

Note: Route IDs are available for consultation for a period of 7 days. If you need your route to be stored for longer, check out Route Storage to find out more.