Energy Export
curl --request GET \
--url https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export', 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://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export",
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://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export"
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://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export")
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{
"power_curve": [
{
"date": "<string>",
"avg_kw": 123,
"kwh": 123
}
],
"charger_summary": [
{
"charger_identity": "<string>",
"charger_reference": "<string>",
"total_kwh": 123,
"transaction_count": 123
}
]
}Insights
Energy Export
GET
/
v3
/
sites
/
{site}
/
insights
/
energy-export
Energy Export
curl --request GET \
--url https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export', 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://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export",
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://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export"
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://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/sites/{site}/insights/energy-export")
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{
"power_curve": [
{
"date": "<string>",
"avg_kw": 123,
"kwh": 123
}
],
"charger_summary": [
{
"charger_identity": "<string>",
"charger_reference": "<string>",
"total_kwh": 123,
"transaction_count": 123
}
]
}Exports energy usage data for a location at 15-minute intervals, including the location power curve and per-charger summary.
The UUID of the location.
The start date for the export range. Must be a valid date string (e.g.,
2024-01-01). Data is returned from the start of this day.The end date for the export range. Must be a valid date string and equal to or after
started_from. Data is returned through the end of this day.Response
The location-level power curve, sampled at 15-minute intervals from site statistics.
A per-charger energy summary derived from completed transactions, ordered by total energy delivered (descending).
Show charger object
Show charger object
The OCPP identity of the charger.
The viewing team’s reference for the charger, or an empty string if none is set.
The total energy delivered by the charger over the range, in kilowatt-hours (rounded to 2 decimals).
The number of completed transactions for the charger over the range.
⌘I