Example – Discounted tolls through automatic payment
Some toll plazas offer a percentage discount for users who use automatic payment methods, known as TAG or TelePeaje.
In Brazil, this percentage is 5% off and is available to only a few dealerships that offer the service. This percentage may vary in other countries. In Argentina, for example, the Caminos del Río Uruguay dealership offers a 15% discount to users who use the tag, or TelePeaje.
In the following example, we have a route using a single-axle truck that passes through the Parapuã toll, in Brazil, which offers a 5% discount.
Request
The following parameters will be required to obtain the value with the TAG discount already applied:
vehicleType– Type of vehicle to be considered, in the example it will beTRUCK_WITH_TWO_DOUBLE_AXLES;conditions– Object that indicates which values should be considered for tolls where there are conditional values, such as in this example a discounted value for vehicles with TAG:period– Indicates the period that should be considered to return the exact toll value. In this case, the route will be carried out on a normal day, so the value used in this example will beNORMAL.billingType– Indicates the type of charge that should be considered. The value to be used in this example should beTAG.
Request with Independent endpoint
{
"legs": [
{
"points": "`fidCffqtHo@t@u@hAm@p@yCvEe@v@aBvBqAjBeA~A",
"vehicleType": "TRUCK_WITH_TWO_DOUBLE_AXLES",
"condition": {
"period": "NORMAL",
"billingType": "TAG"
}
}
]
}
Request with Trip API
{
"calculationMode": "THE_FASTEST",
"points": [
{
"siteId": "Point 1",
"latitude": -21.843015408682692,
"longitude": -50.71983853381955
},
{
"siteId": "Point 2",
"latitude": -21.840092392777727,
"longitude": -50.72374936513232
}
],
"toll": {
"vehicleType": "TRUCK_WITH_TWO_DOUBLE_AXLES",
"condition": {
"period": "NORMAL",
"billingType": "TAG"
}
}
}
Response
Response with Independent endpoint
{
"legs": [
{
"tolls": [
{
"id": "828",
"name": "Pedágio - Parapuã",
"address": "SP294, KM551+500",
"city": "Parapuã",
"state": {
"name": "São Paulo",
"code": "SP"
},
"country": "Brasil",
"concession": "Eixo-SP",
"direction": "WEST",
"coordinates": {
"latitude": -21.840998367867602,
"longitude": -50.722601401095574
},
"serviceTypes": [
{
"serviceId": "791",
"name": "Via Facil"
},
{
"serviceId": "35352945515000103",
"name": "ANTTCODE"
}
],
"price": 19.76
}
],
"legTotalCost": 19.76,
"vehicleType": "TRUCK_WITH_TWO_DOUBLE_AXLES",
"condition": {
"billingType": "TAG",
"period": "NORMAL"
},
"calculationDate": 1738853654511
}
],
"totalCost": 19.76
}
Response with Trip API
{
"id": "67a4ccd6361dc514265d966f",
"clientId": "maplink",
"totalDistance": 518,
"totalNominalDuration": 37,
"averageSpeed": 64.8,
"tollCosts": 19.76,
"legs": [
{
"distance": 518,
"nominalDuration": 37,
"averageSpeed": 64.8,
"points": "`fidCffqtHo@t@u@hAm@p@yCvEe@v@aBvBqAjBeA~A",
"tollCalculation": {
"tolls": [
{
"id": "828",
"name": "Pedágio - Parapuã",
"address": "SP294, KM551+500",
"city": "Parapuã",
"state": {
"name": "São Paulo",
"code": "SP"
},
"country": "Brasil",
"concession": "Eixo-SP",
"direction": "WEST",
"coordinates": {
"latitude": -21.840998367867602,
"longitude": -50.722601401095574
},
"serviceTypes": [
{
"serviceId": "791",
"name": "Via Facil"
},
{
"serviceId": "35352945515000103",
"name": "ANTTCODE"
}
],
"price": 19.76
}
],
"legTotalCost": 19.76,
"vehicleType": "TRUCK_WITH_TWO_DOUBLE_AXLES",
"calculationDate": 1738853590334,
"condition": {
"billingType": "TAG",
"period": "NORMAL"
}
}
}
],
"crossedBorders": [],
"source": "MAPLINK",
"createdAt": 1738853590348,
"expiryIn": 1739458390249
}