Skip to main content
This guide walks you through everything you need to make your first successful call to the Lumenaza API. By the end, you will have obtained an access token, confirmed connectivity to the test environment, and registered a consumer — all using plain HTTP requests you can run directly from your terminal.

Prerequisites

Before you begin, make sure you have the following:
  • OAuth 2.0 client credentials (client_id and client_secret) issued by Lumenaza for your organization. If you do not have these yet, contact your Lumenaza account manager.
  • curl or an equivalent HTTP client (Postman, Insomnia, etc.) installed locally.
  • Access to the test environment at https://api.test.lumenaza.de/ — no production data is affected during this guide.
All examples below target the test environment. To use the production environment, replace https://api.test.lumenaza.de/ with https://api.lumenaza.de/ in every URL. Never run exploratory or development requests against production.

Steps

1

Obtain an Access Token

The Lumenaza API uses the OAuth 2.0 client credentials flow. Send a POST request to the token endpoint with your credentials to receive a bearer token.Token endpoint: https://api.test.lumenaza.de/oauth2/token/
A successful response returns a JSON object containing your access_token and its lifetime in seconds:
Copy the value of access_token — you will use it as the Bearer token in all subsequent requests.
Access tokens expire after the number of seconds indicated by expires_in (typically 3 600 seconds / 1 hour). When a token expires, your requests will receive a 401 Unauthorized response. Simply repeat this step to obtain a fresh token. Build token refresh logic into your integration from the start so that long-running processes are never interrupted.
2

Make a Test API Call

Verify that your token works by fetching the list of consumers registered under your organization. This endpoint returns an empty list if you have not registered any consumers yet — that is expected.Endpoint: GET https://api.test.lumenaza.de/v3/consumers/
A successful response looks like this:
If you receive a 401 Unauthorized error, your token may have expired or been copied incorrectly. Re-run Step 1 to obtain a new token and try again.
Always include the Authorization: Bearer header on every request. Omitting it or using a malformed value results in a 401 error and the request will not be processed.
3

Register Your First Consumer

Now register a consumer (electricity buyer) under your organization. Send a POST request to /v3/consumers/create/ with a JSON body containing the required fields.Endpoint: POST https://api.test.lumenaza.de/v3/consumers/create/
The required fields for consumer registration are:A successful 201 Created response returns the new consumer and contract identifiers:
Store both identifiers — you will use consumer_id to manage the account and contract_id to interact with billing and metering endpoints.

Next Steps

You have authenticated, verified API access, and registered your first consumer. From here you can:
  • Explore the API Reference to see every available endpoint, full request schemas, and error codes.
  • Learn about contract lifecycle — how to activate, amend, and terminate contracts.
  • Submit metering data for consumers and producers.
  • Register producers (renewable energy plant operators) using a similar flow under /v3/producers/.