Building requests for the Toll 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 obtain the values of the tolls on the route.
The Toll API can be used in two different ways:
Independent endpoint
Suitable for users who consume third-party routing services.
Note: For routes generated with Google’s Directions API, use the Toll for Maps API.
Trip API + Toll API
The Toll API can be used in conjunction with the Trip API, both synchronously and asynchronously. The information needed to calculate the toll will be added in the request to the Trip API:
- https://api.maplink.global/trip/v2/calculations – POST
Synchronous Trip - https://api.maplink.global/trip/v1/problems – POST
Asynchronous Trip