Get Charges
curl --request GET \
--url https://api.tessie.com/{vin}/charges \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/{vin}/charges"
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}/charges', 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}/charges",
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}/charges"
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}/charges")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/{vin}/charges")
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": 434159,
"started_at": 1628906796,
"ended_at": 1628911246,
"location": "South Las Vegas Boulevard, Las Vegas, Nevada 89119, United States",
"latitude": 36.070656,
"longitude": -115.172968,
"is_supercharger": true,
"odometer": 12345.67,
"energy_added": 81.41,
"energy_used": 81.5,
"miles_added": 256,
"miles_added_ideal": 512,
"starting_battery": 11,
"ending_battery": 96,
"cost": 0
}
]
}Vehicle Data
Get Charges
Returns the charges for a vehicle.
GET
/
{vin}
/
charges
Get Charges
curl --request GET \
--url https://api.tessie.com/{vin}/charges \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/{vin}/charges"
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}/charges', 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}/charges",
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}/charges"
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}/charges")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/{vin}/charges")
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": 434159,
"started_at": 1628906796,
"ended_at": 1628911246,
"location": "South Las Vegas Boulevard, Las Vegas, Nevada 89119, United States",
"latitude": 36.070656,
"longitude": -115.172968,
"is_supercharger": true,
"odometer": 12345.67,
"energy_added": 81.41,
"energy_used": 81.5,
"miles_added": 256,
"miles_added_ideal": 512,
"starting_battery": 11,
"ending_battery": 96,
"cost": 0
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The associated VIN.
Query Parameters
Whether to return data in miles or kilometers.
Available options:
mi, km Whether to output the results in JSON or CSV.
Available options:
json, csv Whether to only include charges from Superchargers.
The latitude of the charging station.
Example:
37.4925
The longitude of the charging station.
Example:
121.9447
The radius from the charging station, in meters.
Example:
80
Whether to exclude the charging station.
The IANA timezone name.
The start of the timeframe. Unix timestamp in seconds.
The end of the timeframe. Unix timestamp in seconds.
The minimum energy added to the battery, in kWh.
Example:
1
The maximum number of results.
Response
200 - application/json
Success
Show child attributes
Show child attributes

