Get battery information
curl --request GET \
--url https://api.kapa.energy/bat/v1/{id}/info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kapa.energy/bat/v1/{id}/info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kapa.energy/bat/v1/{id}/info', 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.kapa.energy/bat/v1/{id}/info",
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.kapa.energy/bat/v1/{id}/info"
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.kapa.energy/bat/v1/{id}/info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapa.energy/bat/v1/{id}/info")
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{
"id": "bat_1",
"manufacturer": "Acme Storage",
"model": "Home 13",
"firmware_version": "4.2.1",
"nominal_capacity_wh": 14000,
"usable_capacity_wh": 13000,
"nominal_charge_power_w": 5000,
"nominal_discharge_power_w": 5000,
"power_measurement_side": "ac"
}{
"type": "https://api.kapa.energy/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"detail": "The access token has expired."
}{
"type": "https://api.kapa.energy/problems/battery-not-found",
"title": "Battery not found",
"status": 404,
"code": "battery_not_found",
"detail": "No battery with id bat_9 is accessible to this client."
}Batteries
Get battery information
Static characteristics of the battery, standardised across manufacturers.
GET
/
bat
/
v1
/
{id}
/
info
Get battery information
curl --request GET \
--url https://api.kapa.energy/bat/v1/{id}/info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.kapa.energy/bat/v1/{id}/info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kapa.energy/bat/v1/{id}/info', 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.kapa.energy/bat/v1/{id}/info",
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.kapa.energy/bat/v1/{id}/info"
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.kapa.energy/bat/v1/{id}/info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapa.energy/bat/v1/{id}/info")
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{
"id": "bat_1",
"manufacturer": "Acme Storage",
"model": "Home 13",
"firmware_version": "4.2.1",
"nominal_capacity_wh": 14000,
"usable_capacity_wh": 13000,
"nominal_charge_power_w": 5000,
"nominal_discharge_power_w": 5000,
"power_measurement_side": "ac"
}{
"type": "https://api.kapa.energy/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized",
"detail": "The access token has expired."
}{
"type": "https://api.kapa.energy/problems/battery-not-found",
"title": "Battery not found",
"status": 404,
"code": "battery_not_found",
"detail": "No battery with id bat_9 is accessible to this client."
}Authorizations
OAuth 2.0 client credentials. Obtain a token from POST /token.
Path Parameters
Battery identifier.
Response
Battery information.
Battery identifier.
Manufacturer name.
Model name, as reported by the manufacturer.
Firmware version, as reported by the manufacturer. Null if unknown.
Total capacity stated by the manufacturer, in Wh.
Required range:
x >= 0Capacity that can actually be charged and discharged, in Wh. All stored energy values range from 0 to this value.
Required range:
x >= 0Rated maximum charging power, in W. A magnitude, always positive.
Required range:
x >= 0Rated maximum discharging power, in W. A magnitude, always positive.
Required range:
x >= 0Where battery_power_w is measured: ac on the inverter's AC side, dc at
the battery terminals. Null if the manufacturer does not say.
Available options:
ac, dc, null