Download OpenAPI specification:Download
You can download the TollGuru API spec using the download link above and import collections in Postman for testing. Here is how to import collections in Postman.
You can use TollGuru Toll API service to
By integrating our API with your application or website, you can provide your users with a powerful tool for efficient and cost-effective route planning.
With the Toll API you can calculate tolls, fuel costs and optimal routes for:
Pre-trip planning
Post-trip toll cost reconciliation
Sign up for a free API key using your email and password. We suggest you use Postman to test the API before you integrate Toll API into your products. TollGuru Toll API is a REST API with predictable resource-oriented URLs. It uses standard HTTP response codes and authentication to accept form-encoded request bodies and return JSON-encoded responses.
You can use client libraries in Java, Python, Go, Node.js, PHP, Ruby, .NET to quickly integrate Toll API.
Use this API endpoint to calculate tolls and fuel expenses between origin, destination, and waypoints (if any). With this API endpoint, you can
If you are looking for toll information for routes that consider bridge height restrictions, axle count, weight restrictions, HAZMAT restrictions, we suggest that you use HERE maps (we use HERE maps by default). Specifically, with the HERE maps API service, you can
required | Address (object) or Place-Id (object) or Geo-Coordinates (object) |
required | Address (object) or Place-Id (object) or Geo-Coordinates (object) |
Array of Address (object) or Place-Id (object) or Geo-Coordinates (object) (Location) Specify a range of intermediary locations, along your route between your origin and destination points | |
serviceProvider | string Default: "here" Enum: "here" "gmaps" |
object (schemas) |
{- "from": {
- "address": "Philadelphia , Pennsylvania,",
- "lat": 39.95209,
- "lng": -75.16219
}, - "to": {
- "address": "New York ,NY,",
- "lat": 40.71455,
- "lng": -74.00715
}, - "waypoints": [
- {
- "address": "Bridgewater Township , New Jersey"
}
], - "serviceProvider": "here",
- "vehicle": {
- "type": "2AxlesTaxi",
- "weight": {
- "value": 20000,
- "unit": "pound"
}, - "height": {
- "value": 7.5,
- "unit": "meter"
}, - "length": {
- "value": 7.5,
- "unit": "meter"
}, - "axles": 4,
- "emissionClass": "euro_5"
}
}
{- "status": "OK",
- "summary": {
- "route": [
- {
- "location": {
- "lat": 37.01487,
- "lng": -7.93424
}, - "address": "Philadelphia , Pennsylvania"
}, - {
- "location": {
- "lat": 38.01874,
- "lng": -7.86654
}, - "address": "Bridgewater Township , New Jersey"
}, - {
- "location": {
- "lat": 38.72639,
- "lng": -9.14949
}, - "address": "New York ,NY"
}
], - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departure_time": 1609507347,
- "fuelPrice": "{\"value\":2.79,\"currency\":\"USD\"}",
- "fuelEfficiency": {
- "city": 28.57,
- "hwy": 22.4,
- "units": "mpg"
}, - "vehicleType": "2AxlesTaxi",
- "share": { }
}, - "routes": [
- {
- "summary": {
- "hasTolls": true,
- "diffs": "{\"cheapest\":\"0\",\"fastest\":\"7\"}",
- "duration": "{\"text\":\"22 hr\",\"value\":79200}",
- "distance": "{\"text\":\"9 h 6 min\",\"value\":32774}",
- "name": "I-95",
- "note": [ ]
}, - "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
], - "directions": [
- {
- "position": {
- "latitude": 43.6453235,
- "longitude": -79.3824971
}, - "maneuver": "lightRight",
- "html_instructions": "Turn <span class=\\\"direction\\\">slightly right</span> onto <span class=\\\"next-street\\\">York St</span> <span class=\\\"number\\\">(HWY-11A)</span>. <span class=\\\"distance-description\\\">Go for <span class=\\\"length\\\">0.3 mi</span>.</span>",
- "distance": 73,
- "duration": 24,
- "note": [ ]
}
], - "herePath": [
- 43.64539434,
- -79.3831512,
- 43.6418318,
- -79.3824604,
- "..."
]
}
]
}
For truck routes you can specify restrictions - bridge height restrictions, axle count, weight restrictions, HAZMAT restrictions - to receive truck compliant routes. But you don’t need to send all the parameters. You can
required | Address (object) or Place-Id (object) or Geo-Coordinates (object) |
required | Address (object) or Place-Id (object) or Geo-Coordinates (object) |
Array of Address (object) or Place-Id (object) or Geo-Coordinates (object) (Location) Specify a range of intermediary locations, along your route between your origin and destination points | |
serviceProvider | string Default: "here" Enum: "here" "gmaps" |
object (schemas) Parameters related to vehicle |
{- "from": {
- "address": "Philadelphia , Pennsylvania,",
- "lat": 39.95209,
- "lng": -75.16219
}, - "to": {
- "address": "New York ,NY,",
- "lat": 40.71455,
- "lng": -74.00715
}, - "waypoints": [
- {
- "address": "Bridgewater Township , New Jersey"
}
], - "serviceProvider": "here",
- "vehicle": {
- "type": "2AxlesTruck",
- "weight": {
- "value": 20000,
- "unit": "pound"
}, - "height": {
- "value": 7.5,
- "unit": "meter"
}, - "length": {
- "value": 7.5,
- "unit": "meter"
}, - "axles": 4,
- "emissionClass": "euro_5"
}
}
{- "status": "OK",
- "summary": {
- "route": [
- {
- "location": {
- "lat": 37.01487,
- "lng": -7.93424
}, - "address": "Philadelphia , Pennsylvania"
}, - {
- "location": {
- "lat": 38.01874,
- "lng": -7.86654
}, - "address": "Bridgewater Township , New Jersey"
}, - {
- "location": {
- "lat": 38.72639,
- "lng": -9.14949
}, - "address": "New York ,NY"
}
], - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departure_time": 1609507347,
- "fuelPrice": "{\"value\":2.79,\"currency\":\"USD\"}",
- "fuelEfficiency": {
- "city": 28.57,
- "hwy": 22.4,
- "units": "mpg"
}, - "vehicleType": "2AxlesTruck",
- "share": { }
}, - "routes": [
- {
- "summary": {
- "hasTolls": true,
- "diffs": "{\"cheapest\":\"0\",\"fastest\":\"7\"}",
- "duration": "{\"text\":\"22 hr\",\"value\":79200}",
- "distance": "{\"text\":\"9 h 6 min\",\"value\":32774}",
- "name": "I-95",
- "note": [ ]
}, - "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
], - "directions": [
- {
- "position": {
- "latitude": 43.6453235,
- "longitude": -79.3824971
}, - "maneuver": "lightRight",
- "html_instructions": "Turn <span class=\\\"direction\\\">slightly right</span> onto <span class=\\\"next-street\\\">York St</span> <span class=\\\"number\\\">(HWY-11A)</span>. <span class=\\\"distance-description\\\">Go for <span class=\\\"length\\\">0.3 mi</span>.</span>",
- "distance": 73,
- "duration": 24,
- "note": [ ]
}
], - "herePath": [
- 43.64539434,
- -79.3831512,
- 43.6418318,
- -79.3824604,
- "..."
], - "hos": {
- "summary": "{\"total_drive_duration\":{\"text\":\"9 h 4 m\",\"value\":32679},\"total_break_duration\":{\"text\":30 m,\"value\":1800},\"total_duration\":{\"text\":9 h 34 m\",\"value\":34479},\"total_distance\":{\"text\":228,\"metric\":367,\"value\":367050},\"rulesParam\":{\"rule\":60,\"dutyHoursBeforeEndOfWorkDay\":11,\"dutyHoursBeforeRestBreak\":7,\"drivingHoursBeforeEndOfWorkDay\":11,\"timeRemaining\":60}}",
- "break_points": [
- 43.78465,
- -79.52755
], - "stops": [
- [ ]
], - "data": [
- {
- "instruction": "Start from Philadelphia , Pennsylvania"
}, - {
- "instruction": "Drive",
- "duration": {
- "text": "1 h 41 m",
- "value": 6106
}, - "distance": {
- "text": 19,
- "metric": 30,
- "value": 29836
}
}, - {
- "instruction": "Break",
- "duration": {
- "text": "30 m",
- "value": 1800
}
}
]
}, - "territoryMileage": [
- {
- "territory": {
- "name": "New York",
- "code": "New York",
- "type": "state"
}, - "distance": {
- "text": 228,
- "metric": 367.1,
- "value": 367050
}, - "trafficTime": "9 h 6 m"
}
]
}
]
}
You can specify truck restrictions - bridge height, weight restrictions, HAZMAT restrictions - to receive truck compliant routes.
required | Address (object) or Place-Id (object) or Geo-Coordinates (object) |
required | Address (object) or Place-Id (object) or Geo-Coordinates (object) |
Array of Address (object) or Place-Id (object) or Geo-Coordinates (object) (Location) Specify a range of intermediary locations, along your route between your origin and destination points | |
serviceProvider | string Default: "here" Enum: "here" "gmaps" |
object (schemas) | |
DateTime (string) or Timestamp (number) Default: "current time" | |
object | |
object When currency in units is provided, it takes precedence for all calculations. When the value of fuelOptions.fuelCost.value is provided, we will extract this value and perform the necessary conversion |
{- "from": {
- "address": "Philadelphia , Pennsylvania,",
- "lat": 39.95209,
- "lng": -75.16219
}, - "to": {
- "address": "New York ,NY,",
- "lat": 40.71455,
- "lng": -74.00715
}, - "waypoints": [
- {
- "address": "Bridgewater Township , New Jersey"
}
], - "serviceProvider": "here",
- "vehicle": {
- "type": "2AxlesTaxi",
- "weight": {
- "value": 20000,
- "unit": "pound"
}, - "height": {
- "value": 7.5,
- "unit": "meter"
}, - "length": {
- "value": 7.5,
- "unit": "meter"
}, - "axles": 4,
- "emissionClass": "euro_5"
}, - "departure_time": 1609507347,
- "fuelOptions": {
- "fuelCost": {
- "value": 1.305,
- "units": "USD/gallon",
- "currency": "USD",
- "fuelUnit": "gallon"
}, - "fuelEfficiency": {
- "city": 28.57,
- "hwy": 22.4,
- "units": "mpg"
}
}, - "units": {
- "currency": "USD"
}
}
{- "status": "OK",
- "summary": {
- "route": [
- {
- "location": {
- "lat": 37.01487,
- "lng": -7.93424
}, - "address": "Philadelphia , Pennsylvania"
}, - {
- "location": {
- "lat": 38.01874,
- "lng": -7.86654
}, - "address": "Bridgewater Township , New Jersey"
}, - {
- "location": {
- "lat": 38.72639,
- "lng": -9.14949
}, - "address": "New York ,NY"
}
], - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departure_time": 1609507347,
- "fuelPrice": "{\"value\":2.79,\"currency\":\"USD\"}",
- "fuelEfficiency": {
- "city": 28.57,
- "hwy": 22.4,
- "units": "mpg"
}, - "vehicleType": "2AxlesEV",
- "share": { }
}, - "routes": [
- {
- "summary": {
- "hasTolls": true,
- "diffs": "{\"cheapest\":\"0\",\"fastest\":\"7\"}",
- "duration": "{\"text\":\"22 hr\",\"value\":79200}",
- "distance": "{\"text\":\"9 h 6 min\",\"value\":32774}",
- "name": "I-95",
- "note": [ ]
}, - "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
], - "chargingPoints": [
- {
- "id": 123,
- "evStation": {
- "name": "METRO NASHVILLE",
- "address": "800 2nd Ave S, Nashville, TN, 37210, US",
- "contact": {
- "phone": "888-758-4389"
}, - "position": {
- "point": {
- "geometry": {
- "coordinates": [
- -75.360105,
- 40.614533
]
}
}
}, - "brand": "ChargePoint Network",
- "connectorType": "J1772",
- "powerFeedTypes": [
- {
- "id": 2,
- "name": "Level 2",
- "totalNumberOfConnectors": 8
}
], - "facilityType": "Car_Dealer",
- "accessTime": "24 hours daily"
}
}
], - "directions": [
- {
- "position": {
- "latitude": 43.6453235,
- "longitude": -79.3824971
}, - "maneuver": "lightRight",
- "html_instructions": "Turn <span class=\\\"direction\\\">slightly right</span> onto <span class=\\\"next-street\\\">York St</span> <span class=\\\"number\\\">(HWY-11A)</span>. <span class=\\\"distance-description\\\">Go for <span class=\\\"length\\\">0.3 mi</span>.</span>",
- "distance": 73,
- "duration": 24,
- "note": [ ]
}
], - "herePath": [
- 43.64539434,
- -79.3831512,
- 43.6418318,
- -79.3824604,
- "..."
]
}
]
}
Use this service when you are already using a mapping service for your routing and you are able to send the complete route from the mapping service in the request. You will need to get the complete route from the mapping service (and not just origin, destination and some stops on the route) to receive accurate toll information. You can
You will receive toll information for all tolls on the single route you requested. You will need to get the complete route from your mapping service (and not just origin, destination and some stops on the route) to receive accurate toll information.
mapProvider | string Default: "here" Enum: "google" "bing" "mapbox" "apple map" "here" "tomtom" "waze" "esri" "mapquest" "jawgmaps" "trimble" "ptv" "mapmyindia" "yandex" "michelin" "baidu" "gaode" Specify route source, either |
polyline | string Specify route as Google Maps encoded polyline (see details) |
locTimes | Array of any Specify the locTimes utilizing a two-dimensional array of floating-point numbers, where each sub-array consists of the path or polyline index and the corresponding time-stamp for that coordinate. If locTimes is not specified we use departure_time as a the timestamp and if departure_time is also not specified we will use current time for toll calculations |
object (schemas) Parameters related to vehicle | |
object | |
object When currency in units is provided, it takes precedence for all calculations. When the value of fuelOptions.fuelCost.value is provided, we will extract this value and perform the necessary conversion | |
DateTime (string) or Timestamp (number) If departure_time and locTimes both are not specified then we will use the current time for toll calculations |
{- "mapProvider": "here",
- "polyline": "_f`GwjixRSe@MIIEICGAIA_Al@MHIDe@VKFm@f@SLKLCFEHCF?HAF?NTH\\\\N`Ab@x@b@`@TZTPLTPZXDFBFXVZTrB~ARDLF~@ZJDTDPBVFJ@X@P@j@?N?d@ERC`@KhB{Al@i@f@Y~BaCPQJKbA_At@s@RSDEBEBCVU~A{ATW~@{@`@_@v@q@p@o@pA_AVSXSJIv@g@~@m@HEROTO@?rA{@VQ^UZSPMHGDEj@g@h@k@f@m@^g@vAqBTYp@_Ab@m@Va@R[Xg@b@u@^{@R]Pc@Vm@Pe@\\\\cA`@mAn@iB^aAp@aBn@cBt@yAFMP_@pC_GdBsDdAwBRc@fAyB`@y@Ve@pAaCxAqCf@_An@mAjBcE`BoD^w@Vo@P[Xe@JQ`@m@PULQh@o@\\\\_@l@m@r@m@pAeA`CoBxAoA\\\\YbAy@?An@i@~AqA`@a@VY^_@V[PSX_@T]T[f@y@JMHMtAcCd@}@f@_AlBoDb@y@r@sAd@{@R]\\\\o@h@y@Zc@n@_ABENQZc@TY@C\\\\_@RWFKPUPYT]BCDGl@_Af@w@^u@P_@j@sAh@mAVk@^s@^s@n@kA?Ad@u@fAeBl@eAZg@|@yA`BoCd@_AZo@Z}@J]Ng@BQJe@F_@DS@MDk@J{AFiAHmDHgDFwADiBH_D@[?E@]@c@BgALuEBcABkA@]B{AD_BBa@DaCJkCHiALyAPoAN_ALo@R}@Le@ZkAb@oATo@\\\\{@FK`@}@`@w@lA{BxAoC~AwCHOZm@l@eAHO^s@n@kAp@qANYL[L]J[Rs@FWNu@Jq@Fc@JiABw@@aBBaDDaA?m@D]\\\\cCJi@Lg@Pi@Xy@BGDMRg@DIFMHQFMJOr@qAZc@v@mAtAcBz@eANS`BuBtDoEd@m@dBoBj@o@V[LQFGhC{Cp@{@Za@LUJSHOJ[Ne@H]Fc@?AD_@Dg@@e@?I?M?M?aA?{@A}BCwA?oA?YEuB?k@Ag@C{@?A?ECs@AyA?m@ASC{CEmCA}@AYAW?KA}@CcBA{AAcA?WAUGiI?S?QAU?WAc@AgA?_@@a@@y@@e@@UBU@UVaD@MFaABc@@Y@G?i@Ak@Gk@EUI_@IY?AIUKUISQc@s@}AMWk@uAK[GOIa@I_@EYCQGm@Co@A]?M?O@]@UD[Fa@D]FWLk@Pg@N]P_@N[dBaDpBkD@AdCsEbAkBd@_APa@HUHUVaAES?EAE?E?EJ_ADk@@W@UEaAAOIm@M_ABCKa@CMESA?EMK[KWCIACAAKWs@sAq@gAEIEGS[S]GMGKWa@g@mAe@eA]OSIEAG?WAG@OBIBGDGF[b@IJKFk@`Au@pA}@~AMXcC~E_BnCY`@MT",
- "locTimes": [
- [
- 0,
- 1660110342
], - [
- 30,
- 1660110642
], - [
- 60,
- 1660110942
], - [
- 232,
- 1660111182
]
], - "vehicle": {
- "type": "2AxlesTaxi",
- "weight": {
- "value": 20000,
- "unit": "pound"
}, - "height": {
- "value": 7.5,
- "unit": "meter"
}, - "length": {
- "value": 7.5,
- "unit": "meter"
}, - "axles": 4,
- "emissionClass": "euro_5"
}, - "fuelOptions": {
- "fuelCost": {
- "value": 1.305,
- "units": "USD/gallon",
- "currency": "USD",
- "fuelUnit": "gallon"
}, - "fuelEfficiency": {
- "city": 28.57,
- "hwy": 22.4,
- "units": "mpg"
}
}, - "units": {
- "currency": "USD"
}, - "departure_time": 1609507347
}
{- "summary": {
- "countries": [
- "SGP"
], - "currency": "SGD",
- "vehicleType": "2AxlesAuto",
- "vehicleDescription": "Cars/SUV without trailers which are not commercial vehicles",
- "fuelEfficiency": {
- "city": 23.4,
- "hwy": 29.25,
- "units": "mpg"
}, - "fuelPrice": {
- "value": 3.72,
- "currency": "SGD",
- "units": "$/gallon",
- "fuelUnit": "gallon"
}, - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departureTime": 1609507347,
- "share": {
- "name": "Tollguru Polyline with Timestamps",
- "prefix": "Tollguru+Polyline+with+Timestamps",
- "uuid": "be7ba066-7fa7-4742-8ecd-de63109b6d1e",
- "timestamp": "2023-08-21T08:32:12.437467487Z",
- "client": "polylineAPITimestamps"
}
}, - "route": {
- "hasTolls": true,
- "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
]
}
}
You will receive toll information for all tolls on the single route you requested. You will need to get the complete route from your mapping service (and not just origin, destination and some stops on the route) to receive accurate toll information.
mapProvider | string Default: "here" Enum: "google" "bing" "mapbox" "apple map" "here" "tomtom" "waze" "esri" "mapquest" "jawgmaps" "trimble" "ptv" "mapmyindia" "yandex" "michelin" "baidu" "gaode" Specify route source, either |
path | string Specify route as a set of comma-separated |
locTimes | Array of any Specify the locTimes utilizing a two-dimensional array of floating-point numbers, where each sub-array consists of the path or polyline index and the corresponding time-stamp for that coordinate. If locTimes is not specified we use departure_time as a the timestamp and if departure_time is also not specified we will use current time for toll calculations |
object (schemas) Parameters related to vehicle | |
DateTime (string) or Timestamp (number) If departure_time and locTimes both are not specified then we will use the current time for toll calculations | |
object | |
object When currency in units is provided, it takes precedence for all calculations. When the value of fuelOptions.fuelCost.value is provided, we will extract this value and perform the necessary conversion |
{- "mapProvider": "here",
- "path": "43.64183,-79.38246|...|18.63085,-100.12845",
- "locTimes": [
- [
- 0,
- 1660110342
], - [
- 30,
- 1660110642
], - [
- 60,
- 1660110942
], - [
- 232,
- 1660111182
]
], - "vehicle": {
- "type": "2AxlesTaxi",
- "weight": {
- "value": 20000,
- "unit": "pound"
}, - "height": {
- "value": 7.5,
- "unit": "meter"
}, - "length": {
- "value": 7.5,
- "unit": "meter"
}, - "axles": 4,
- "emissionClass": "euro_5"
}, - "departure_time": "2021-01-15T13:46:17",
- "fuelOptions": {
- "fuelCost": {
- "value": 1.305,
- "units": "USD/gallon",
- "currency": "USD",
- "fuelUnit": "gallon"
}, - "fuelEfficiency": {
- "city": 28.57,
- "hwy": 22.4,
- "units": "mpg"
}
}, - "units": {
- "currency": "USD"
}
}
{- "summary": {
- "countries": [
- "SGP"
], - "currency": "SGD",
- "vehicleType": "2AxlesAuto",
- "vehicleDescription": "Cars/SUV without trailers which are not commercial vehicles",
- "fuelEfficiency": {
- "city": 23.4,
- "hwy": 29.25,
- "units": "mpg"
}, - "fuelPrice": {
- "value": 3.72,
- "currency": "SGD",
- "units": "$/gallon",
- "fuelUnit": "gallon"
}, - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departureTime": 1609507347,
- "share": {
- "name": "Tollguru Polyline with Timestamps",
- "prefix": "Tollguru+Polyline+with+Timestamps",
- "uuid": "be7ba066-7fa7-4742-8ecd-de63109b6d1e",
- "timestamp": "2023-08-21T08:32:12.437467487Z",
- "client": "polylineAPITimestamps"
}
}, - "route": {
- "hasTolls": true,
- "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
]
}
}
Use TollTally - GPS Tracks to Toll API - to calculate tolls after you make the trip. You can upload your GPS tracks (in CSV format) to receive tolls for the likely route matched using the GPS tracks. You can
By default, the API returns tolls immediately. In other words in synchronous mode. When you have a large GPS track, you need to specify to receive tolls in the asynchronous mode by specifying the url parameter as isAsync=true. Response in this case will include a requestId and a requestedTimestamp. You can use the requestId to download tolls for up to 30 days. Use the asynchronous mode when uploading multiple or large GPS tracks files.
The first line in the CSV needs to contain the attribute names. The subsequent lines need to contain the data in temporal order. The following parameters are available:
Parameter | Description |
---|---|
latitude | Latitude coordinate in WGS84 degree (mandatory) |
longitude | Longitude coordinate in WGS84 degree (mandatory) |
timestamp | indicates the time and date, for example 2018-05-21T17:05:06Z (mandatory since tolls may change based on time) |
You can use the CSV format file as shown in the table below:
latitude | longitude | timestamp |
---|---|---|
38.90479 | -77.02607 | 2019-12-16T15:45:23Z |
38.90479 | -77.02606 | 2019-12-16T15:47:24Z |
38.9048 | -77.02608 | 2019-12-16T15:49:25Z |
38.9044 | -77.02604 | 2019-12-16T15:50:42Z |
38.90424 | -77.02646 | 2019-12-16T15:50:49Z |
38.90422 | -77.02686 | 2019-12-16T15:50:55Z |
object Please take note that the object must be in URI encoded format prior to sending a request. It is possible to encode it here | |
vehicleName | string Specify name for your vehicle to identify the response json for particular vehicle |
isAsync | boolean Default: false The API will function in asynchronous mode is set to true |
object Please take note that the object must be in URI encoded format prior to sending a request. It is possible to encode it here | |
object Please take note that the object must be in URI encoded format prior to sending a request. It is possible to encode it here |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(hnd, CURLOPT_URL, "https://apis.tollguru.com/toll/v2/gps-tracks-csv-upload?vehicle=SOME_OBJECT_VALUE&vehicleName=SOME_STRING_VALUE&isAsync=SOME_BOOLEAN_VALUE&fuelOptions=SOME_OBJECT_VALUE&units=SOME_OBJECT_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "content-type: text/csv"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "status": "OK",
- "summary": {
- "countries": [
- "SGP"
], - "currency": "SGD",
- "vehicleType": "2AxlesAuto",
- "vehicleDescription": "Cars/SUV without trailers which are not commercial vehicles",
- "fuelEfficiency": {
- "city": 23.4,
- "hwy": 29.25,
- "units": "mpg"
}, - "fuelPrice": {
- "value": 3.72,
- "currency": "SGD",
- "units": "$/gallon",
- "fuelUnit": "gallon"
}, - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departureTime": 1609507347,
- "share": {
- "name": "Tollguru Polyline with Timestamps",
- "prefix": "Tollguru+Polyline+with+Timestamps",
- "uuid": "be7ba066-7fa7-4742-8ecd-de63109b6d1e",
- "timestamp": "2023-08-21T08:32:12.437467487Z",
- "client": "polylineAPITimestamps"
}
}, - "route": {
- "hasTolls": true,
- "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
]
}
}
The results will be available for download for upto 30 days by calling the API.
requestId | string |
requestedTimestamp | string |
{- "requestId": "72ca5cba-b732-47ea-aec6-c7716bb37458",
- "requestedTimestamp": "2020-06-15T04:27:08.838Z"
}
{- "status": "OK",
- "summary": {
- "countries": [
- "SGP"
], - "currency": "SGD",
- "vehicleType": "2AxlesAuto",
- "vehicleDescription": "Cars/SUV without trailers which are not commercial vehicles",
- "fuelEfficiency": {
- "city": 23.4,
- "hwy": 29.25,
- "units": "mpg"
}, - "fuelPrice": {
- "value": 3.72,
- "currency": "SGD",
- "units": "$/gallon",
- "fuelUnit": "gallon"
}, - "rates": {
- "USD": 1,
- "CAD": 1.282985,
- "MXN": 20.281435,
- "INR": 73.069503,
- "AUD": 1.30701,
- "GBP": 0.730355,
- "EUR": 0.827435,
- "NOK": 8.55952,
- "SEK": 8.40025,
- "DKK": 6.15375,
- "PEN": 6.15375,
- "COP": 6.15375,
- "ARS": 6.15375,
- "CLF": 6.15375,
- "CLP": 6.15375,
- "SOL": 6.15375
}, - "departureTime": 1609507347,
- "share": {
- "name": "Tollguru Polyline with Timestamps",
- "prefix": "Tollguru+Polyline+with+Timestamps",
- "uuid": "be7ba066-7fa7-4742-8ecd-de63109b6d1e",
- "timestamp": "2023-08-21T08:32:12.437467487Z",
- "client": "polylineAPITimestamps"
}
}, - "route": {
- "hasTolls": true,
- "costs": {
- "fuel": 81.5,
- "tag": 8.32,
- "cash": null,
- "licensePlate": 47.26,
- "creditCard": null,
- "prepaidCard": 8.32
}, - "tolls": [
- [
- {
- "id": 1139007,
- "lat": 29.52775,
- "lng": -95.52265,
- "name": "Sienna Pkwy",
- "road": "Fort Bend Pkwy",
- "state": "Texas",
- "country": "USA",
- "type": "barrier",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": null,
- "licensePlateCost": 0.7,
- "prepaidCardCost": 0.45,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "TxTAG",
- "EZ TAG",
- "TollTag",
- "K-Tag",
- "PikePass"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "height": null,
- "tagRequested": "prepaidCardCost",
- "arrival": {
- "distance": 1441,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -95.52265,
- 29.52775
]
}
}
}, - {
- "type": "ticketSystem1",
- "tagCost": 0.45,
- "tagPriCost": 0.45,
- "tagSecCost": null,
- "cashCost": 0.5,
- "licensePlateCost": null,
- "prepaidCardCost": 0.45,
- "creditCardCost": 0.5,
- "currency": "USD",
- "tagPrimary": [
- "K-Tag",
- "BancPass",
- "PikePass",
- "EZ TAG",
- "TxTAG",
- "TollTag"
], - "tagSecondary": [ ],
- "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": null,
- "discountCarType": null,
- "start": {
- "id": 1240004,
- "lat": 37.47515,
- "lng": -97.32035,
- "name": "33 Mulvane",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 2358,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32035,
- 37.47515
]
}
}
}, - "end": {
- "id": 1240008,
- "lat": 37.60545,
- "lng": -97.32505,
- "name": "42 Wichita",
- "road": "Kansas Tpke",
- "state": "Kansas",
- "country": "USA",
- "arrival": {
- "distance": 17690,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -97.32505,
- 37.60545
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem2",
- "tagCost": 0.9,
- "tagPriCost": 0.9,
- "tagSecCost": 3,
- "cashCost": 3,
- "licensePlateCost": null,
- "prepaidCardCost": 0.9,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass ME"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NJ",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": null,
- "licensePlateSecondary": null,
- "discountCarDetails": "Monthly Volume discounts: 30-39 trips per month using Maine E-ZPass account equals a 25% discount to all trips. 40+ account trips per month equals a 50% discount applied to all trips.",
- "discountCarType": "Personal cars",
- "start": {
- "id": 1250000,
- "lat": 43.16005,
- "lng": -70.65945,
- "name": "York North",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 2032,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.65945,
- 43.16005
]
}
}
}, - "end": {
- "id": 1250002,
- "lat": 43.32455,
- "lng": -70.61015,
- "name": "Wells South",
- "road": "Maine Tpke",
- "state": "Maine",
- "country": "USA",
- "arrival": {
- "distance": 21919,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -70.61015,
- 43.32455
]
}
}
}, - "height": null
}, - {
- "type": "ticketSystem3",
- "tagCost": 2.2,
- "tagPriCost": 2.2,
- "tagSecCost": 2.9,
- "cashCost": 2.9,
- "licensePlateCost": null,
- "prepaidCardCost": 2.2,
- "creditCardCost": null,
- "currency": "USD",
- "tagPrimary": [
- "E-ZPass NJ"
], - "tagSecondary": [
- "E-ZPass",
- "E-ZPass DE",
- "Uni",
- "I-Pass",
- "E-ZPass Skyway",
- "E-ZPass IN",
- "RiverLink",
- "E-ZPass ME",
- "E-ZPass MD",
- "E-ZPass MA",
- "E-ZPass NH",
- "E-ZPass NY",
- "E-ZPass NC",
- "E-ZPass OH",
- "E-ZPass PA",
- "E-ZPass RI",
- "E-ZPass VA",
- "E-ZPass WV",
- "E-Zpass Flex"
], - "licensePlatePrimary": "Tolls by Mail",
- "licensePlateSecondary": null,
- "discountCarDetails": "Other discounts: 65+ Senior citizens receive a 10% discount on the off-peak rate as Senior Citizen Discount. Vehicles with fuel efficiency 45 MPG and meeting California Super Ultra Low Emission Vehicle (SULEV) standard receive a 10% discount on the off-peak rate as Green Pass Discount. Must have NJ E-ZPass.",
- "discountCarType": "Cars",
- "start": {
- "id": 1260004,
- "lat": 39.86145,
- "lng": -75.07475,
- "name": "NJ168, Woodbury, S. Camden",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 890,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.07475,
- 39.86145
]
}
}
}, - "end": {
- "id": 1260000,
- "lat": 39.68685,
- "lng": -75.44825,
- "name": "Delaware Memorial Bridge",
- "road": "New Jersey Tpke",
- "state": "New Jersey",
- "country": "USA",
- "arrival": {
- "distance": 39164,
- "time": "2021-10-25T05:31:06+00:00"
}, - "point": {
- "type": "Feature",
- "properties": { },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -75.44825,
- 39.68685
]
}
}
}, - "height": null,
- "tagRequested": "prepaidCardCost"
}
]
]
}
}
startTime required | Number Example: startTime=1681627076 Timestamp (epoch) in seconds |
endTime required | Number Example: endTime=1682491124 Timestamp (epoch) in seconds |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://apis.tollguru.com/getUsage?startTime=SOME_NUMBER_VALUE&endTime=SOME_NUMBER_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "x-api-key: REPLACE_KEY_VALUE"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
{- "userId": "user@domain.com",
- "plan": "Basic",
- "planStatus": "Active",
- "transactions": [
- {
- "date": "2023-04-17T12:44:22.060Z",
- "tx": 75700
}
]
}
The TollGuru Toll API uses conventional HTTP status codes to indicate any errors that occur while processing requests. In general- Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., origin and destination is same, etc.). Codes in the 5xx range indicate an error with TollGuru server. The responses provided below can help in debugging the error.
Status | Code | Value |
---|---|---|
400 | INPUT_ERROR | Invalid request. The From and To locations cannot be empty |
400 | INPUT_ERROR | Invalid request. The From and To locations must be different |
400 | INPUT_ERROR | No path or polyline provide |
400 | INPUT_ERROR | Invalid locTimes. Length should be greater than 2. |
400 | INPUT_ERROR | Unsupported vehicle type. Please provide a valid vehicle type. |
400 | INPUT_ERROR | Weight cannot be less than zero |
400 | INPUT_ERROR | Height cannot be less than zero |
400 | INPUT_ERROR | Fuel cost cannot be less than 0 |
400 | INPUT_ERROR | City fuel efficiency cannot be less than 0 |
400 | INPUT_ERROR | Highway fuel efficiency cannot be less than 0 |
500 | ROUTING_ERROR | No route exist |
500 | TOLLING_ERROR | API call failed with status: 500 Internal Server Error |
Error response format
{"status": 500, "code": "TOLLING_ERROR", "value": "API call failed with status: 500 Internal Server Error"}
Errors caused as a result of bad csv file or malformed inputs
Example
{ "status": "ERROR", "code": "INPUT_ERROR" "value": "Invalid request. The From and To locations cannot be empty"}
Errors arising out of routing issues like traces not making a valid route as detected by our algorithm.
Example
{"status": 500, "code": "ROUTING_ERROR", "value": "No route exist"}
Errors caused while finding the toll prices of a given route.
Example
{"status": 500, "code": "TOLLING_ERROR", "value": "API call failed with status: 500 Internal Server Error"}
Any of the following can be given as value to vehicleType argument. By default it's 2AxlesAuto.
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesAuto | Car, SUV or Pickup truck |
![]() | 3AxlesAuto | Car, SUV or Pickup truck towing 1-axle trailer |
![]() | 4AxlesAuto | Car, SUV or Pickup truck towing 2-axle trailer |
![]() | 2AxlesDualTire | SUV or Pickup, 4 tires on rear |
![]() | 3AxlesDualTire | SUV or Pickup, 4 tires on rear, 1-axle trailer |
![]() | 4AxlesDualTire | SUV or Pickup, 4 tires on rear, 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesEV | EV |
![]() | 3AxlesEV | EV towing 1-axle trailer |
![]() | 4AxlesEV | EV towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTruck | Truck - 2 Axles |
![]() | 3AxlesTruck | Truck - 3 Axles |
![]() | 4AxlesTruck | Truck - 4 Axles |
![]() | 5AxlesTruck | Truck - 5 Axles |
![]() | 6AxlesTruck | Truck - 6 Axles |
![]() | 7AxlesTruck | Truck - 7 Axles |
![]() | 8AxlesTruck | Truck - 8 Axles |
![]() | 9AxlesTruck | Truck - 9 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesBus | Bus - 2 Axles |
![]() | 3AxlesBus | Bus - 3 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesMotorcycle | Motorcycle |
![]() | 3AxlesMotorcycle | Motorcycle towing trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesRv | RV |
![]() | 3AxlesRv | RV towing 1-axle trailer |
![]() | 4AxlesRv | RV towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTNC | Rideshare - Car, SUV or Pickup truck |
![]() | 2AxlesTNCPool | Rideshare Pool - Car, SUV or Pickup truck |
![]() | 2AxlesTaxi | Taxi - Car, SUV or Pickup truck |
![]() | 2AxlesTaxiPool | Taxi Pool - Car, SUV or Pickup truck |
![]() | Carpool2 | Carpool (2 occupants) |
![]() | Carpool3 | Carpool (3+ occupants) |
Country covered:Bahamas, Belize, Canada, Costa Rica, Cuba, Dominican Republic, El Salvador, Guatemala, Honduras, Jamaica, Mexico, Nicaragua, Panama, Puerto Rico, United States of America
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesAuto | Car, SUV |
![]() | 3AxlesAuto | Car, SUV towing 1-axle trailer |
![]() | 4AxlesAuto | Car, SUV towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesLGV | Light goods vehicles 2-Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTruck | Heavy goods vehicles 2-Axles |
![]() | 3AxlesTruck | Truck - 3 Axles |
![]() | 4AxlesTruck | Truck - 4 Axles |
![]() | 5AxlesTruck | Truck - 5 Axles |
![]() | 6AxlesTruck | Truck - 6 Axles |
![]() | 7AxlesTruck | Truck - 7 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesBus | Bus - 2 Axles |
![]() | 3AxlesBus | Bus - 3 Axles |
![]() | 4AxlesBus | Bus - 4 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesRv | Motorhome |
![]() | 3AxlesRv | Motorhome towing 1-axle trailer |
![]() | 4AxlesRv | Motorhome towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesMotorcycle | Motorcycle, Motorcycle with sidecar |
Country covered:Albania, Andorra, Austria, Belarus, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Kosovo, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Moldova, Monaco, Montenegro, Netherlands, North Macedonia, Norway, Poland, Portugal, Romania, Russia, Russia, San Marino, Serbia, Slovakia, Slovenia, Spain, Sweden, Switzerland, Turkey, Ukraine, United Kingdom
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesAuto | Car, SUV |
![]() | AutoTrailerCatA | Car towing trailer (length<12.5 meter & height <2 meter) |
![]() | AutoTrailerCatB | Car towing trailer (length>12.5 meter & height >2 meter) |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTaxi | Taxi |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesLCV | Light Commercial Vehicles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTruck | Truck 2-Axles, Rigid |
![]() | 3AxlesTruck | Truck 3-Axles, Rigid, Articulated |
![]() | 4AxlesTruck | Truck 4-Axles, Rigid, Articulated |
![]() | 5AxlesTruck | Truck 5-Axles, Articulated |
![]() | 6AxlesTruck | Truck 6-Axles, Articulated, B-Double |
![]() | 7AxlesTruck | Truck 7-Axles, Articulated, B-Double |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesBus | Bus |
Icon | vehicleType | Description |
---|---|---|
![]() | RVCatA | RV (length < 12.5 meter & height < 2 meter) |
![]() | RVCatB | RV (length > 12.5 meter or height > 2 meter) |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesMotorcycle | Motorcycle; with or without trailer |
Country covered:Australia, New Zealand
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesAuto | Car, Jeep, Van, SUV |
![]() | 3AxlesAuto | Car, SUV towing 1-axle trailer |
![]() | 4AxlesAuto | Car, SUV towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTaxi | Taxi |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesLCV | Pickup truck, Light Commercial Vehicles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTruck | Truck - 2-Axles For India: Truck with 2-Axle whose gross weight >12,000kgs & <=16,200kgs< /td> |
![]() | 3AxlesTruck | Truck - 3 Axles For India: Truck with 3-Axle whose gross weight >16,200kgs & <=25,000kgs< /td> |
![]() | 4AxlesTruck | Truck - 4 Axles For India: Truck with 4-Axle whose gross weight >25,000kgs & <=36,600kgs< /td> |
![]() | 5AxlesTruck | Truck - 5 Axles For India: Truck with 5-Axle whose gross weight >36,600kgs & <=45,400kgs< /td> |
![]() | 6AxlesTruck | Truck - 6 Axles for India: Truck with 6-Axle whose gross weight >45,400kgs & <=54,200kgs< /td> |
![]() | 7AxlesTruck | Truck - 7 Axles For India: Truck with 7-Axle whose gross weight >54,200kgs |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesBus | Bus - 2-Axles |
![]() | 3AxlesBus | Bus - 3 Axles |
![]() | 4AxlesBus | Bus - 4 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesRv | Motorhome (not applicable to India) |
![]() | 3AxlesRv | Motorhome towing 1-axle trailer (not applicable to India) |
![]() | 4AxlesRv | Motorhome towing 2-axle trailer (not applicable to India) |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesHCMEME | HCM, EME (applicable to India only) |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesMotorcycle | Bike |
Country covered:Bangladesh, India, Indonesia, Laos, Malaysia, Myanmar, Philipines, Singapore, Taiwan, Thailand, Vietnam
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesAuto | Car, SUV or Pickup truck |
![]() | 3AxlesAuto | Car, SUV or Pickup truck towing 1-axle trailer |
![]() | 4AxlesAuto | Car, SUV or Pickup truck towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesTruck | Truck - 2 Axles |
![]() | 3AxlesTruck | Truck - 3 Axles |
![]() | 4AxlesTruck | Truck - 4 Axles |
![]() | 5AxlesTruck | Truck - 5 Axles |
![]() | 6AxlesTruck | Truck - 6 Axles |
![]() | 7AxlesTruck | Truck - 7 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesBus | Bus - 2 Axles |
![]() | 3AxlesBus | Bus - 3 Axles |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesRv | RV |
![]() | 3AxlesRv | RV towing 1-axle trailer |
![]() | 4AxlesRv | RV towing 2-axle trailer |
Icon | vehicleType | Description |
---|---|---|
![]() | 2AxlesMotorcycle | Motorcycle |
Country covered:Argentina, Bolivia, Brazil, Chile, Colombia, Ecuador, Falkland Islands, French Guiana, Guyana, Paraguay, Peru, Suriname, Uruguay, Venezuela