GET

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

curl --request GET \
  --url https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/records/billing \
  --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/billing" \
    -H "Authorization: Bearer {token}" \
    -X "GET" \
    -H "Content-Type: application/json" \
Python
billing = vehicle.request(
  "GET", 
  "{make}/charge/records/billing?startDate=2023-08-24"
)
Node
const billing = vehicle.request(
  "GET", 
  "{make}/charge/records/billing?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/billing?startDate=2023-08-24"
)

Response

records
[object]

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

chargeStart
string

The date and time of charging session start, formatted in ISO 8601 standard.

chargeEnd
Default: "string"
number

The date and time of charging session end, formatted in ISO 8601 standard.

cost
object

A cost breakout of the charging session.

currency
string

The currency code for the fees.

energy
number

Fess associated with charging the vehicle.

other
number

Fees associated with the session other than charging the vehicle e.g. parking.

location
string

The name of the charging site.

recordId
string

Tesla’s id for this charging session.

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