> ## 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.

# Supply and Feed-In Interval Data for Energy Contracts

> Retrieve time-series consumption, feed-in, production forecast, and outage energy data for consumer and producer contracts with flexible aggregation.

## Overview

The supply and feed endpoints deliver **interval-based time-series data** for energy consumption (consumers) and energy generation (producers). Data can be returned at its original resolution or aggregated into hourly, daily, weekly, monthly, or yearly buckets. All aggregation periods are interpreted in the specified timezone.

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

### Aggregation Types

The `aggregation_type` parameter is shared across all endpoints in this section:

| Value | Description |
| - | - |
| `raw` | Original resolution as received from the meter operator. |
| `hour` | Aggregated into 1-hour buckets. |
| `day` | Aggregated into calendar-day buckets. |
| `week` | Aggregated into ISO week buckets. |
| `month` | Aggregated into calendar-month buckets. |
| `year` | Aggregated into calendar-year buckets. |

<Note>
  Aggregation period boundaries (e.g. start of day, start of week) are calculated
  in the **timezone** you specify. Defaults to `Europe/Berlin` if omitted.
</Note>

***

## Consumer Supply Data

### GET /v3/consumers/\{userID}/contracts/\{contractID}/supply/

Returns detailed consumption values for each time interval within the requested range. Energy is measured in Wh (integer).

<Warning>
  This endpoint is **only available for RLM** (registrierende Lastgangmessung)
  and **iMSys** customers. It is **not supported** for SLP (Standardlastprofil)
  or heat power customers.
</Warning>

### Path Parameters

| Parameter | Type | Description |
| - | - | - |
| `userID` | string | The unique ID of the consumer user. |
| `contractID` | string | The unique ID of the consumer contract. |

### Query Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | string | ✅ Yes | Start of the time range (ISO 8601 datetime). |
| `end` | string | ✅ Yes | End of the time range (ISO 8601 datetime). |
| `aggregation_type` | string | No | One of `raw`, `hour`, `day`, `week`, `month`, `year`. Defaults to `raw`. |
| `timezone` | string | No | Timezone for aggregation boundaries (IANA name). Defaults to `Europe/Berlin`. |
| `limit` | integer | No | Maximum number of intervals to return. |

### Response

An array of interval objects:

| Field | Type | Description |
| - | - | - |
| `start` | string | ISO 8601 start of the interval. |
| `end` | string | ISO 8601 end of the interval. |
| `supply` | integer/null | Energy consumed during this interval in Wh, or `null` if no data is available. |

### Example Request

```bash theme={null}
curl -X GET "https://api.lumenaza.de/v3/consumers/USR-4821/contracts/CON-9934/supply/?start=2024-06-01T00:00:00Z&end=2024-06-03T00:00:00Z&aggregation_type=day&timezone=Europe/Berlin" \
  -H "Authorization: Bearer <token>"
```

### Example Response

```json theme={null}
[
  {
    "start": "2024-06-01T00:00:00+02:00",
    "end": "2024-06-02T00:00:00+02:00",
    "supply": 14320
  },
  {
    "start": "2024-06-02T00:00:00+02:00",
    "end": "2024-06-03T00:00:00+02:00",
    "supply": 13750
  }
]
```

***

## Producer Feed-In Data

### GET /v3/producers/\{userID}/contracts/\{contractID}/feed/

Returns feed-in data from a producer's plant for each time interval. Data is only available if it has been received from the meter operator.

### Path Parameters

| Parameter | Type | Description |
| - | - | - |
| `userID` | string | The unique ID of the producer user. |
| `contractID` | string | The unique ID of the producer contract. |

### Query Parameters

Same as consumer supply:

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | string | ✅ Yes | Start of the time range (ISO 8601 datetime). |
| `end` | string | ✅ Yes | End of the time range (ISO 8601 datetime). |
| `aggregation_type` | string | No | One of `raw`, `hour`, `day`, `week`, `month`, `year`. Defaults to `raw`. |
| `timezone` | string | No | Timezone for aggregation boundaries. Defaults to `Europe/Berlin`. |
| `limit` | integer | No | Maximum number of intervals to return. |

### Response

| Field | Type | Description |
| - | - | - |
| `start` | string | ISO 8601 start of the interval. |
| `end` | string | ISO 8601 end of the interval. |
| `feed` | integer/null | Energy fed into the grid during this interval in Wh, or `null` if data is unavailable. |

### Example Response

```json theme={null}
[
  {
    "start": "2024-06-01T00:00:00+02:00",
    "end": "2024-06-02T00:00:00+02:00",
    "feed": 38500
  },
  {
    "start": "2024-06-02T00:00:00+02:00",
    "end": "2024-06-03T00:00:00+02:00",
    "feed": null
  }
]
```

***

## Producer Forecast Data

### GET /v3/producers/\{userID}/contracts/\{contractID}/forecast/

Returns predicted energy production values at **15-minute intervals** for the specified time range. Forecasts are calculated based on the plant's historical generation patterns and external conditions.

### Query Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | string | ✅ Yes | Start of the forecast window (ISO 8601 datetime). |
| `end` | string | ✅ Yes | End of the forecast window (ISO 8601 datetime). |

### Response

| Field | Type | Description |
| - | - | - |
| `start_time` | string | ISO 8601 start of the 15-minute interval. |
| `end_time` | string | ISO 8601 end of the 15-minute interval. |
| `forecast_value` | integer/null | Predicted generation for this interval in Wh, or `null`. |

### Example Response

```json theme={null}
[
  {
    "start_time": "2024-06-15T06:00:00+02:00",
    "end_time": "2024-06-15T06:15:00+02:00",
    "forecast_value": 1250
  },
  {
    "start_time": "2024-06-15T06:15:00+02:00",
    "end_time": "2024-06-15T06:30:00+02:00",
    "forecast_value": 1480
  },
  {
    "start_time": "2024-06-15T06:30:00+02:00",
    "end_time": "2024-06-15T06:45:00+02:00",
    "forecast_value": null
  }
]
```

***

## Producer Outage Energy

### GET /v3/producers/\{userID}/contracts/\{contractID}/outage\_energy/

Returns known outage energy values for a producer's plant. Data is only present if it has been received from the network operator, and represents energy that could not be generated due to grid curtailment or forced outages.

### Query Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `start` | string | ✅ Yes | Start of the time range (ISO 8601 datetime). |
| `end` | string | ✅ Yes | End of the time range (ISO 8601 datetime). |
| `aggregation_type` | string | No | One of `raw`, `hour`, `day`, `week`, `month`, `year`. Defaults to `raw`. |
| `timezone` | string | No | Timezone for aggregation boundaries. Defaults to `Europe/Berlin`. |
| `limit` | integer | No | Maximum number of intervals to return. |

### Response

| Field | Type | Description |
| - | - | - |
| `start` | string | ISO 8601 start of the interval. |
| `end` | string | ISO 8601 end of the interval. |
| `energy` | integer/null | Outage energy for this interval in Wh, or `null` if no data is available. |

### Example Response

```json theme={null}
[
  {
    "start": "2024-06-01T00:00:00+02:00",
    "end": "2024-06-02T00:00:00+02:00",
    "energy": 5200
  },
  {
    "start": "2024-06-02T00:00:00+02:00",
    "end": "2024-06-03T00:00:00+02:00",
    "energy": null
  }
]
```


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