Fleet Optimization with TollGuru API

Last updated on Jul 12, 2024 · 2 minutes

Fleet Optimization with TollGuru API

Optimizing fleet operations can save time, reduce fuel consumption, and significantly cut costs. TollGuru’s robust API offers powerful tools for fleet management. In this blog, we’ll explore two key components: the Taxi Fleet API and the State Mileage API.

Taxi Fleet API

The Taxi Fleet API is a specialized service designed for taxi and ride-hailing services. It offers routes and toll costs between an origin and a destination, helping drivers choose the most cost-effective and efficient routes. The Taxi Fleet API can calculate routes and toll costs for a single vehicle or a fleet of vehicles, providing insights into the overall costs of running a fleet. One of the key features of the Taxi Fleet API is its ability to calculate taxi charges based on the distance traveled in each state, including additional fees like congestion charges. Here is an example of the data you can expect to receive – (Along with tolls):
   1  "taxiCharges": {
   2      "taxiFare": [
   3          {
   4              "state": "Texas",
   5              "distanceTravelled": 175,
   6              "costPerUnitMile": 0.9,
   7              "taxiFareForDistanceTravelled": 158
   8          },
   9          {
  10              "state": "Arkansas",
  11              "distanceTravelled": 268,
  12              "costPerUnitMile": 2,
  13              "taxiFareForDistanceTravelled": 536
  14          }
  15      ],
  16      "airportCharges": [],
  17      "congestionSurcharge": [
  18          {
  19              "zone": "New York Congestion Zone 1",
  20              "charge": 2.5
  21          }
  22      ],
  23      "taxiSummary": {
  24          "totalTaxiCost": 1828,
  25          "totalTaxiFare": 1810,
  26          "totalDistanceTravelled": 1532,
  27          "totalExtraCharges": 2.5,
  28          "tollCost": 15.43,
  29          "currency": "USD",
  30          "distanceUnit": "miles"
  31      }
  32  }
This data provides a comprehensive view of the total cost of a trip, factoring in the distance traveled, the fare per state, any additional surcharges, and the overall taxi cost.

State Mileage API

The State Mileage API calculates the distance traveled in each state for a given route. This is particularly useful for logistics and transportation companies that need to track state-based mileage for tax and reporting purposes. The API can provide state mileage information for both an origin-destination pair and a polyline endpoint. Note that when using the polyline endpoint, the traffic time data will not be included Here is an example of the data you can expect to receive from the State Mileage API (Along with tolls):
   1  "territoryMileage": [
   2      {
   3          "territory": {
   4              "name": "Texas",
   5              "code": "Texas",
   6              "type": "state"
   7          },
   8          "trafficTime": "3 h 51 m"
   9      },
  10      {
  11          "territory": {
  12              "name": "Tennessee",
  13              "code": "Tennessee",
  14             "type": "state"
  15          },
  16          "distance": {
  17              "text": "501",
  18              "metric": "805.8",
  19              "value": "805802.0"
  20          },
  21          "trafficTime": "7 h 23 m"
  22      }
  23  ]  "distance": {
  24              "text": "178",
  25              "metric": "286.1",
  26              "value": "286103.0"
  27          },
  28          "trafficTime": "2 h 31 m"
  29      },
  30      {
  31          "territory": {
  32              "name": "Arkansas",
  33              "code": "Arkansas",
  34              "type": "state"
  35          },
  36          "distance": {
  37              "text": "273",
  38              "metric": "439.8",
  39              "value": "439838.0"
  40          },
  41  ]
This data provides detailed information about the distance traveled and the time taken in each state.

Conclusion

TollGuru’s Taxi Fleet API and State Mileage API provide powerful tools for fleet management. By leveraging these APIs, fleet owners can optimize routes, reduce costs, and gain better insight into their operations. Whether you’re managing a taxi service or a long-haul trucking business, TollGuru’s APIs can provide the data you need to make informed decisions and improve your bottom line.