GET
/
vehicles
/
{id}
/
{make}
/
charge
/
records
/
billing
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/records/billing?page=12&startDate=2023-08-24" \
    -H "Authorization: Bearer {token}" \
    -X "GET" \
    -H "Content-Type: application/json" \
{
  "records": [
      {
          "chargeEnd": "2022-07-10T16:20:00.000Z",
          "chargeStart": "2022-07-10T15:40:00.000Z",
          "energyConsumed": 44.10293884
          "cost": {
              "currency": "USD",
              "energy": "41",
              "other": "41"
          },
          "location": "Los Gatos, CA",
          "recordId": "GF220075000028-3-1682903685"
      }
  ],
  "hasMoreData" : false
}

This endpoint is currently available for tesla

Permission

read_charge_records

Request

Path

id
string
required

The vehicle ID of the vehicle you are making a request to.

make
string
required

The make of the vehicle you are making a request to.

Query

startDate

Date of the first record to return in YYYY-MM-DD format. Defaults to 30 days prior or when the owner first granted your application access, whichever is shorter.

endDate

Date of the final record to return in YYYY-MM-DD format. Defaults to the date of the request.

page

The page number to fetch from Tesla where page 1 contains the most recent records.

curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/records/billing?page=12&startDate=2023-08-24" \
    -H "Authorization: Bearer {token}" \
    -X "GET" \
    -H "Content-Type: application/json" \

Response

records
[object]

An array of billing records for the vehicle associated with charging at public Tesla charging stations.

Can be empty if the specified page does not contain any records for the vehicle. This does not mean that subsequent pages will also contain no records. Please check the hasMoreData field for confirmation instead.

hasMoreData
bool

Indicates if there are any more records to fetch from Tesla for this vehicle. Does not guarantee a non-empty list for the next page when true.

{
  "records": [
      {
          "chargeEnd": "2022-07-10T16:20:00.000Z",
          "chargeStart": "2022-07-10T15:40:00.000Z",
          "energyConsumed": 44.10293884
          "cost": {
              "currency": "USD",
              "energy": "41",
              "other": "41"
          },
          "location": "Los Gatos, CA",
          "recordId": "GF220075000028-3-1682903685"
      }
  ],
  "hasMoreData" : false
}