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.
transponderOperators– Only for routes in Brazil. Array that indicates which integration codes should 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.
excludedTollTypes– Array of toll types to be excluded from the route. When specified, tolls of the listed types will be ignored in both the list and the total cost. The possible values are:TOLL_BOOTH– Conventional toll booth;TOLL_GANTRY– Toll Gantry;MUNICIPAL_TOLL_BOOTH– Municipal toll booth;ENTRY_GANTRY– Entry gantry (for free-flow system or closed tolling system);EXIT_GANTRY– Exit gantry (for free-flow system or closed tolling system).
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"
}
}
],
"transponderOperators": [
"CONECTCAR",
"SEM_PARAR"
],
"excludedTollTypes": [
"MUNICIPAL_TOLL_BOOTH"
],
"source": "MAPLINK"
}