List of parameters
Mandatory parameters
The following parameters are required:
legs– Array withpointsandvehicleTypeto calculate tolls. Eachlegrepresents 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 parameterpointsaccepts coordinates as objects, arrays, encoded ingeohashor 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:MOTORCYCLECARCAR_WITH_THREE_SIMPLE_AXLESCAR_WITH_FOUR_SIMPLE_AXLESBUS_WITH_TWO_DOUBLE_AXLESBUS_WITH_THREE_DOUBLE_AXLESBUS_WITH_FOUR_DOUBLE_AXLESBUS_WITH_FIVE_DOUBLE_AXLESTRUCK_WITH_NINE_DOUBLE_AXLESTRUCK_WITH_TWO_SINGLE_AXISTRUCK_WITH_TWO_DOUBLE_AXLESTRUCK_WITH_THREE_DOUBLE_AXLESTRUCK_WITH_FOUR_DOUBLE_AXLESTRUCK_WITH_FIVE_DOUBLE_AXLESTRUCK_WITH_SIX_DOUBLE_AXLESTRUCK_WITH_SEVEN_DOUBLE_AXLESTRUCK_WITH_EIGHT_DOUBLE_AXLESTRUCK_WITH_TEN_DOUBLE_AXLES
calculationDate– Date and time at which the route will be performed, in timestamp format in milliseconds. Example:1583492400000condition– (Optional) Object that indicates which values should be considered for tolls where there are conditional values, such as a discounted value for tagged vehicles or a specific value for holidays. The object is composed of:billingType– Indicates the type of charge that should be considered. Possible values are:[ TAG, NORMAL];period– Indicates the period that should be considered to return the exact toll value. Possible values are:[ NORMAL, HOLIDAY, LOW_SEASON, HIGH_SEASON ].
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, 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",
"calculationDate": 1710769071000,
"condition":{
"billingType":"TAG",
"period":"HOLIDAY"
}
}
],
"billing": "DEFAULT",
"transponderOperators": [
"CONECTCAR",
"SEM_PARAR"
],
"source": "MAPLINK"
}