List of parameters
Mandatory parameters
The following parameters are required:
legs
– Array withpoints
andvehicleType
to calculate tolls. Eachleg
represents a section of the route. If you want to calculate the toll for different vehicles on each part of the route, for example, you can divide it into severallegs
. (Only required for the independent endpoint)points
– Coordinates that make up the section of the route. The parameterpoints
accepts coordinates as objects, arrays, encoded ingeohash
or encoded aspolyline
, as shown in the examples below.
vehicleType
– Text defining the type of vehicle to be considered when calculating the toll. The possible values are:MOTORCYCLE
CAR
CAR_WITH_THREE_SIMPLE_AXLES
CAR_WITH_FOUR_SIMPLE_AXLES
BUS_WITH_TWO_DOUBLE_AXLES
BUS_WITH_THREE_DOUBLE_AXLES
BUS_WITH_FOUR_DOUBLE_AXLES
BUS_WITH_FIVE_DOUBLE_AXLES
TRUCK_WITH_NINE_DOUBLE_AXLES
TRUCK_WITH_TWO_SINGLE_AXIS
TRUCK_WITH_TWO_DOUBLE_AXLES
TRUCK_WITH_THREE_DOUBLE_AXLES
TRUCK_WITH_FOUR_DOUBLE_AXLES
TRUCK_WITH_FIVE_DOUBLE_AXLES
TRUCK_WITH_SIX_DOUBLE_AXLES
TRUCK_WITH_SEVEN_DOUBLE_AXLES
TRUCK_WITH_EIGHT_DOUBLE_AXLES
TRUCK_WITH_TEN_DOUBLE_AXLES
Accepted coordinate formats
The following formats are supported as input for the coordinates in the parameter points
:
Object – Objects composed of the parameters latitude
and longitude
:
"points": [ { "latitude": -19.50489, "longitude": -57.43231 } ]
Array – Arrays containing latitude and longitude respectively:
"points": [ [-19.50489,-57.43231], ]
Geohash – Strings with latitude and longitude encoded in geohash
:
"points": [ "6sx1j15pf", ]
Polyline – String with all route coordinates coded as polyline
:
"points": "pp`vB|fp}IlAFhCI"
Example with mandatory parameters
{ "legs": [ { "points": [ { "latitude": -23.465395, "longitude": -46.375007 }, { "latitude": -23.465957, "longitude": -46.371015 }, { "latitude": -23.467154, "longitude": -46.36559 } ], "vehicleType": "TRUCK_WITH_TWO_DOUBLE_AXLES" } ] }
Optional parameters
source
– Indicates in which coordinate base the tolls should be consulted. Possible values are:MAPLINK
– Default value if the parameter is not provided;GMAPS
– It should be used if the route provided was generated by Routes API from Google.
billing
– Text indicating the type of toll charge. Possible values are:DEFAULT
– This is the default value if the parameter is not informed and indicates that the conventional toll collection calculation will be used, that is, only conventional toll plazas and gantries will be returned;FREE_FLOW
– In addition to toll plazas and conventional gantries, gantries that are part of the PaP or Free Flow system, currently available on some highways in Brazil, will also return.
transponderOperators
– Only for routes in Brazil. Array that indicates which integration codes should be returned, in addition to the ANTT code that will always be returned. The possible values are:CONECTCAR
– The Conectcar service code will be returned;SEM_PARAR
– The Sem Parar service codes will be returned: Via Fácil and Sem Parar Pay.
Example with optional parameters
{ "legs": [ { "points": [ { "latitude": -23.465395, "longitude": -46.375007 }, { "latitude": -23.465957, "longitude": -46.371015 }, { "latitude": -23.467154, "longitude": -46.36559 } ], "vehicleType": "TRUCK_WITH_TWO_DOUBLE_AXLES" } ], "billing": "DEFAULT", "transponderOperators": [ "CONECTCAR", "SEM_PARAR" ], "source": "MAPLINK" }