Get Historical States
curl --request GET \
--url https://api.tessie.com/{vin}/states \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/{vin}/states"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tessie.com/{vin}/states', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tessie.com/{vin}/states",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tessie.com/{vin}/states"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tessie.com/{vin}/states")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/{vin}/states")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 1644010150,
"timestamp": 1644010150,
"state": "online",
"charging_state": "Charging",
"shift_state": "P",
"battery_level": 88,
"usable_battery_level": 88,
"battery_range": 266.69,
"ideal_battery_range": 999,
"latitude": 40.7484,
"longitude": 73.9857,
"elevation": null,
"speed": null,
"power": null,
"odometer": 14096.5,
"charge_rate": 2,
"charger_actual_current": 12,
"charger_power": 1,
"charger_phases": 1,
"charger_voltage": 118,
"charge_energy_added": 4.64,
"charge_miles_added_rated": 1.5,
"charge_miles_added_ideal": 422,
"is_climate_on": 0,
"battery_heater_on": 0,
"inside_temp": 37.7,
"outside_temp": 20.5,
"locked": 1,
"sentry_mode": 0,
"lifetime_energy_used": 5224.71,
"energy_remaining": 51.26,
"pack_current": -0.7,
"pack_voltage": 419.79,
"module_temp_min": 25.5,
"module_temp_max": 26
}
]
}Vehicle Data
Get Historical States
Returns historical states for a vehicle during a timeframe.
If no interval is specified, a sensible interval based on the timeframe is used.
GET
/
{vin}
/
states
Get Historical States
curl --request GET \
--url https://api.tessie.com/{vin}/states \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/{vin}/states"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tessie.com/{vin}/states', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tessie.com/{vin}/states",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tessie.com/{vin}/states"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tessie.com/{vin}/states")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/{vin}/states")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 1644010150,
"timestamp": 1644010150,
"state": "online",
"charging_state": "Charging",
"shift_state": "P",
"battery_level": 88,
"usable_battery_level": 88,
"battery_range": 266.69,
"ideal_battery_range": 999,
"latitude": 40.7484,
"longitude": 73.9857,
"elevation": null,
"speed": null,
"power": null,
"odometer": 14096.5,
"charge_rate": 2,
"charger_actual_current": 12,
"charger_power": 1,
"charger_phases": 1,
"charger_voltage": 118,
"charge_energy_added": 4.64,
"charge_miles_added_rated": 1.5,
"charge_miles_added_ideal": 422,
"is_climate_on": 0,
"battery_heater_on": 0,
"inside_temp": 37.7,
"outside_temp": 20.5,
"locked": 1,
"sentry_mode": 0,
"lifetime_energy_used": 5224.71,
"energy_remaining": 51.26,
"pack_current": -0.7,
"pack_voltage": 419.79,
"module_temp_min": 25.5,
"module_temp_max": 26
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The associated VIN.
Query Parameters
The start of the timeframe. Unix timestamp in seconds.
The end of the timeframe. Unix timestamp in seconds.
The desired number of seconds between data points. Set to 1 to return all data points.
Example:
1
Whether to condense data output.
The IANA timezone name.
Whether to return data in miles or kilometers.
Available options:
mi, km Whether to return data in Fahrenheit or Celsius.
Available options:
c, f Whether to output the results in JSON or CSV.
Available options:
json, csv Response
200 - application/json
Success
- Option 1
- Option 2
Show child attributes
Show child attributes

