GET

/v2.0/vehicles/{id}/{make}/charge/records

curl --request GET \
  --url https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/records \
  --header 'Authorization: Bearer <token>'

This endpoint is currently available for TESLA

Permission

read_charge_records

Request

Path

idrequired
string

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

makerequired
string

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.

cURL
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/records" \
    -H "Authorization: Bearer {token}" \
    -X "GET" \
    -H "Content-Type: application/json" \
Python
billing = vehicle.request(
  "GET", 
  "{make}/charge/records?startDate=2023-08-24"
)
Node
const billing = vehicle.request(
  "GET", 
  "{make}/charge/records?startDate=2023-08-24"
);
Java
SmartcarVehicleRequest request =
    new SmartcarVehicleRequest.Builder()
        .method("GET")
        .path("ford/charge/schedule_by_location")
        .addQueryParameter("startDate", "2023-08-24")
        .build();

VehicleResponse billing = vehicle.request(request);
Ruby
billing = vehicle.request(
  "GET", 
  "{make}/charge/records?startDate=2023-08-24"
)

Response

records
[object]

An array of charge records for the vehicle.

date
string

The date of the charging record, formatted in ISO 8601 standard.

home
Default: "kWh"
number

The amount of energy consumed at home as defined by the vehicle owner.

other
Default: "kWh"
number

The amount of energy consumed at locations other than home or Superchargers

superCharger
Default: "kWh"
number

The amount of energy consumed at Superchargers.

total
Default: "kWh"
number

The total amount of energy consumed to charge the vehicle for a given date.

{
"records": [
{
  "date": "2022-07-10T15:40:27.000Z",
  "home": 10,
  "other": 15,
  "superCharger": 25,
  "total": 50
}
]
}