Get All Charging Invoices
curl --request GET \
--url https://api.tessie.com/charging_invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/charging_invoices"
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/charging_invoices', 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/charging_invoices",
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/charging_invoices"
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/charging_invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/charging_invoices")
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": 242345313,
"started_at": 1699829921,
"ended_at": 1699833374,
"invoice_number": "3000P0085545388",
"vin": "7SA3CBE6XPF123456",
"location": "Yuma, AZ - South Fortuna Road",
"energy_used": 70,
"idle_minutes": 0,
"charging_fees": 24.5,
"idle_fees": 0,
"total_cost": 24.5,
"cost_per_kwh": 0.35,
"currency": "USD",
"invoice_url": "https://tesla.com/teslaaccount/charging/invoice/f4d990ab-f32f-4965-8f61-6e7603714a41"
},
{
"id": 242281757,
"started_at": 1699818910,
"ended_at": 1699821672,
"invoice_number": "3000P0085503265",
"vin": "7SA3CBE6XPF123456",
"location": "Tempe, AZ",
"energy_used": 72,
"idle_minutes": 0,
"charging_fees": 18.72,
"idle_fees": 0,
"total_cost": 18.72,
"cost_per_kwh": 0.26,
"currency": "USD",
"invoice_url": "https://tesla.com/teslaaccount/charging/invoice/ae422c93-7e86-43d3-a24f-58f0604a1b06"
}
]
}Vehicle Data
Get All Charging Invoices
Returns charging invoices for all vehicles.
For fleet accounts only.
GET
/
charging_invoices
Get All Charging Invoices
curl --request GET \
--url https://api.tessie.com/charging_invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/charging_invoices"
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/charging_invoices', 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/charging_invoices",
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/charging_invoices"
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/charging_invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/charging_invoices")
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": 242345313,
"started_at": 1699829921,
"ended_at": 1699833374,
"invoice_number": "3000P0085545388",
"vin": "7SA3CBE6XPF123456",
"location": "Yuma, AZ - South Fortuna Road",
"energy_used": 70,
"idle_minutes": 0,
"charging_fees": 24.5,
"idle_fees": 0,
"total_cost": 24.5,
"cost_per_kwh": 0.35,
"currency": "USD",
"invoice_url": "https://tesla.com/teslaaccount/charging/invoice/f4d990ab-f32f-4965-8f61-6e7603714a41"
},
{
"id": 242281757,
"started_at": 1699818910,
"ended_at": 1699821672,
"invoice_number": "3000P0085503265",
"vin": "7SA3CBE6XPF123456",
"location": "Tempe, AZ",
"energy_used": 72,
"idle_minutes": 0,
"charging_fees": 18.72,
"idle_fees": 0,
"total_cost": 18.72,
"cost_per_kwh": 0.26,
"currency": "USD",
"invoice_url": "https://tesla.com/teslaaccount/charging/invoice/ae422c93-7e86-43d3-a24f-58f0604a1b06"
}
]
}
