> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapa.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect

> Read information about a battery accessible to your client.

This section currently covers battery information. You need the ID of a battery
accessible to your client and an [access token](https://docs.kapa.energy/authenticate/index.md).

## Read battery information

Set `KAPA_BATTERY_ID` to your battery ID, then send the token in the `Authorization` header:

```bash theme={null}
curl "https://api.kapa.energy/bat/v1/$KAPA_BATTERY_ID/info" \
  --header "Authorization: Bearer $KAPA_ACCESS_TOKEN"
```

The response describes the battery's manufacturer, model, usable capacity, and nominal power ratings.
Energy values use watt-hours (Wh), and power values use watts (W).

## Units

Energy is in watt-hours (Wh), as integers. Battery levels are expressed as stored
energy in Wh rather than state of charge in %, because the meaning of SoC differs
between manufacturers. Stored energy is measured against the usable capacity: it
ranges from 0 to `usable_capacity_wh`.

Power ratings use watts (W). Nominal ratings such as `nominal_charge_power_w` are positive magnitudes.

## Errors

Errors use RFC 9457 Problem Details (`application/problem+json`). The `code` field is
stable and meant for programs; `title` and `detail` are meant for humans.

| `code` | HTTP | Meaning |
| - | - | - |
| `unauthorized` | 401 | The access token is missing, invalid or expired. |
| `battery_not_found` | 404 | No battery with this id is accessible to the client. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.