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

# Community Energy Data: Feed-In, Supply, and CO2 Savings

> Access aggregate energy statistics—feed-in, supply, CO2 savings, live feeds, and plant details—for all customers under your sales partner account.

## Overview

Community data provides **aggregate energy statistics** across all customers associated with your whitelabel customer account. This includes totals for feed-in and supply energy, CO2 savings, live feed-in data grouped by ZIP code, and an inventory of delivering plants.

All endpoints in this group are read-only and require a valid Bearer token.

**Base URL:** `https://api.lumenaza.de/` · **Test URL:** `https://api.test.lumenaza.de/`

<Note>
  Community data is updated **daily**. For near-real-time monitoring, use the
  `/live_feeds/` endpoint, which provides data at **5-minute resolution**.
</Note>

***

## GET /v3/community/

Returns aggregated feed-in and supply values for a given time range across your entire community.

### Query Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | string | ✅ Yes | Start of the time range (ISO 8601 datetime, UTC). E.g. `2024-01-01T00:00:00Z` |
| `end` | string | ✅ Yes | End of the time range (ISO 8601 datetime, UTC). E.g. `2024-12-31T23:59:59Z` |
| `type` | string | No | Aggregation bucket size. One of `day`, `week`, `month`, `year`, `alltime`. Defaults to `year`. |
| `limit` | integer | No | Maximum number of results to return. |

### Response

Returns an array of aggregated data points. Each item contains:

| Field | Type | Description |
| - | - | - |
| `timestamp` | string | Date marking the start of the bucket (ISO 8601 date). |
| `feed_in` | float | Total energy fed into the grid (kWh). |
| `supply` | float | Total energy supplied to consumers (kWh). |
| `self_sufficiency` | integer | Community self-sufficiency ratio (%). |
| `saved_co2` | integer | CO2 emissions saved compared to grid average (g). |

### Example Request

```bash theme={null}
curl -X GET "https://api.lumenaza.de/v3/community/?start=2024-01-01T00:00:00Z&end=2024-12-31T23:59:59Z&type=month&limit=12" \
  -H "Authorization: Bearer <token>"
```

### Example Response

```json theme={null}
[
  {
    "timestamp": "2024-01-01",
    "feed_in": 148320.5,
    "supply": 134200.0,
    "self_sufficiency": 62,
    "saved_co2": 54821200
  },
  {
    "timestamp": "2024-02-01",
    "feed_in": 162450.0,
    "supply": 140580.0,
    "self_sufficiency": 65,
    "saved_co2": 60210500
  },
  {
    "timestamp": "2024-03-01",
    "feed_in": 210340.0,
    "supply": 155300.0,
    "self_sufficiency": 71,
    "saved_co2": 78204800
  }
]
```

***

## GET /v3/community/live\_feeds/

Returns live feed-in data at **5-minute resolution**, grouped by ZIP code. Useful for real-time dashboards and monitoring current generation capacity across your community.

### Query Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | string | ✅ Yes | Start of the time range (ISO 8601 datetime, UTC). |
| `end` | string | ✅ Yes | End of the time range (ISO 8601 datetime, UTC). |
| `control_area` | string | No | Filter results to a specific control area, identified by its EIC code. |

### Response

Returns an **object keyed by ZIP code**. Each key maps to an array of 5-minute interval data points:

| Field | Type | Description |
| - | - | - |
| `timestamp` | string | ISO 8601 datetime for this 5-minute interval. |
| `live_feed` | integer | Measured feed-in power during this interval (W). |
| `capacity` | integer | Total installed generation capacity in this ZIP area (W). |

### Example Response

```json theme={null}
{
  "10115": [
    {
      "timestamp": "2024-06-15T08:00:00Z",
      "live_feed": 42500,
      "capacity": 75000
    },
    {
      "timestamp": "2024-06-15T08:05:00Z",
      "live_feed": 43100,
      "capacity": 75000
    }
  ],
  "20095": [
    {
      "timestamp": "2024-06-15T08:00:00Z",
      "live_feed": 18200,
      "capacity": 30000
    },
    {
      "timestamp": "2024-06-15T08:05:00Z",
      "live_feed": 17950,
      "capacity": 30000
    }
  ]
}
```

***

## GET /v3/community/number\_of\_plants/

Returns a count of actively delivering plants in your community, broken down by generation type.

### Response

```json theme={null}
{
  "solar": 5,
  "wind": 1,
  "biogas": 3,
  "water": 10
}
```

No query parameters are required. The response reflects the current state of plants registered and delivering under your sales partner account.

***

## GET /v3/community/plant\_details/

Returns a detailed list of all plants associated with your community, including geographic coordinates and plant type. This endpoint supports **pagination** via `limit` and `offset`.

### Query Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `limit` | integer | No | Number of results per page. |
| `offset` | integer | No | Number of results to skip before starting the page. |

### Response

Returns a paginated list of plant records. Each record includes:

| Field | Type | Description |
| - | - | - |
| `plant_id` | string | Unique identifier for the plant. |
| `plant_type` | string | Generation technology. One of `solar`, `wind`, `gas`, `water`, `battery`. |
| `latitude` | float | Geographic latitude of the plant. |
| `longitude` | float | Geographic longitude of the plant. |

### Example Response

```json theme={null}
{
  "count": 19,
  "next": "https://api.lumenaza.de/v3/community/plant_details/?limit=5&offset=5",
  "previous": null,
  "results": [
    {
      "plant_id": "PLANT-00142",
      "plant_type": "solar",
      "latitude": 52.5200,
      "longitude": 13.4050
    },
    {
      "plant_id": "PLANT-00201",
      "plant_type": "wind",
      "latitude": 53.5753,
      "longitude": 10.0153
    },
    {
      "plant_id": "PLANT-00318",
      "plant_type": "gas",
      "latitude": 48.1351,
      "longitude": 11.5820
    }
  ]
}
```


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