Fuel and Energy

Get fuel and energy efficiency vehicle reports.

Get fuel and energy efficiency vehicle reports for the requested time range.

<b>Rate limit:</b> 25 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Read Fuel & Energy under the Fuel & Energy category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

get/fleet/reports/vehicles/fuel-energy

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

startDatestring required

A start date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.

endDatestring required

An end date in RFC 3339 format. This parameter ignores everything (i.e. hour, minutes, seconds, nanoseconds, etc.) besides the date and timezone. If no time zone is passed in, then the UTC time zone will be used. This parameter is inclusive, so data on the date specified will be considered. Note that the most recent 72 hours of data may still be processing and is subject to change and latency, so it is not recommended to request data for the most recent 72 hours. For example, 2022-07-13T14:20:50.52-07:00 is a time in Pacific Daylight Time.

vehicleIdsstring

A filter on the data based on this comma-separated list of vehicle IDs and externalIds. Example: vehicleIds=1234,5678,samsara.vin:1HGBH41JXMN109186

energyType'fuel' | 'hybrid' | 'electric'

The type of energy used by the vehicle. Valid values: fuel, hybrid, electric

tagIdsstring

A filter on the data based on this comma-separated list of tag IDs. Example: tagIds=1234,5678

parentTagIdsstring

A filter on the data based on this comma-separated list of parent tag IDs, for use by orgs with tag hierarchies. Specifying a parent tag will implicitly include all descendent tags of the parent tag. Example: parentTagIds=345,678

afterstring

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

Response

OK response.

Example response

{
  "data": {
    "vehicleReports": [
      {
        "distanceTraveledMeters": 1384000,
        "efficiencyMpge": 21.4,
        "energyUsedKwh": 73.2,
        "engineIdleTimeDurationMs": 4320000,
        "engineRunTimeDurationMs": 576000,
        "estCarbonEmissionsKg": 22.7,
        "estFuelEnergyCost": {
          "amount": 94.01,
          "currencyCode": "USD"
        },
        "fuelConsumedMl": 162773,
        "vehicle": {
          "energyType": "fuel",
          "id": "494123",
          "name": "Fleet Truck #1"
        }
      }
    ]
  },
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.