v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

Fetch the fuel purchases of your company

get/v1/fuel_purchases

Query parameters

start_datestring date

Specify the start date of the fuel purchases. Default: TODAY - 7 DAYS AGO

end_datestring date

Specify the end date of the fuel purchases. Default: TODAY

fuel_typestring

Specify the type of fuel for which you want to check the purchases. Allowed values are: [“diesel”, “gasoline”, “propane”, “lng”, “cng”, “ethanol”, “methanol”, “e85”, “m85”, “a55”, “biodiesel”, “other”]

vehicle_idsinteger

Specify the ID of the vehicle for which you want to check the fuel purchases.

vehicle_typestring

Specify the type of the vehicle for which you want to check the fuel purchases. Allowed values are: ["ifta", "all"]

jurisdictionsstring

Specify the jurisdictions under which you want to check the fuel purchases of your company.

sourcestring

Upload source of fuel purchase (manual, efs-integration etc.)

per_pageinteger

Denotes the number of records per page.

page_nointeger

The current page number

Response

200

Example response

{
  "fuel_purchases": [
    {
      "fuel_purchase": {
        "id": 684,
        "offline_id": "0053ddeb-2869-4918-8c2d-db7b8d3521f7",
        "purchased_at": "2018-06-13T18:43:00Z",
        "jurisdiction": "AL",
        "fuel_type": "diesel",
        "total_cost": 321,
        "currency": "USD",
        "fuel": 12,
        "fuel_unit": "gal",
        "odometer_unit": "mi",
        "uploader": {
          "id": 8011,
          "first_name": "Uploader",
          "last_name": "Test",
          "email": "uploader@keeptruckin.com",
          "role": "dispatcher"
        },
        "vehicle": {
          "id": 4116,
          "number": "Jason's Vehicle"
        },
        "driver": {
          "id": 2463,
          "first_name": "Paul",
          "last_name": "Walker",
          "username": "paul",
          "email": "demo@keeptruckin.com",
          "status": "active",
          "role": "driver"
        }
      }
    }
  ],
  "pagination": {
    "per_page": 25,
    "page_no": 1,
    "total": 2
  }
}