Toll

List of parameters

Mandatory parameters

The following parameters are required:

  • legs – Array with points and vehicleType to calculate tolls. Each leg 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 several legs. (Only required for the independent endpoint)
    • points – Coordinates that make up the section of the route. The parameter points accepts coordinates as objects, arrays, encoded in geohash or encoded as polyline, 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

  • 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:

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",
            "transponderOperators": [
                "CONECTCAR",
                "SEM_PARAR"
            ]
        }
    ]
}