What is the default fuel price provided in the API response, and how can we integrate diesel prices?

Last updated on Apr 15, 2024 · 1 minute

Our API provides gas/petrol rates by default for fuel cost calculations. Currently, we do not have an option in the request parameters to differentiate between fuel types. Only in the case of EVs do we provide the electricity costs. However, you have the flexibility to update the fuel cost manually in the request parameter ‘fuelCost’ within ‘fuelOptions’, allowing you to set pricing according to your specific needs. Below is a code snippet demonstrating how to do this:

   1  {
   2  "fuelOptions": {
   3      "fuelCost": {
   4          "value": 1.305,
   5          "units": "USD/gallon",
   6          "currency": "USD",
   7          "fuelUnit": "gallon"
   8      },
   9   },
  10  }

Looking to optimize trip tolls and calculate toll bills for your fleet? Integrate Toll API for pre-trip, on-trip, and post-trip toll and other route cost information.

Related FAQs