# Add an asset Source: https://docs.nomos.energy/api-reference/assets/add-an-asset /openapi/openapi.gauss.json post /assets Add a device, such as an inverter, a battery or a wallbox, to one of your households. # Decommission an asset Source: https://docs.nomos.energy/api-reference/assets/decommission-an-asset /openapi/openapi.gauss.json post /assets/{id}/decommission Mark a device as gone. The asset stays readable. # List assets Source: https://docs.nomos.energy/api-reference/assets/list-assets /openapi/openapi.gauss.json get /assets List the assets of your households. # List the newest asset snapshots Source: https://docs.nomos.energy/api-reference/assets/list-the-newest-asset-snapshots /openapi/openapi.gauss.json get /asset-snapshots The newest snapshot of each asset of the households or assets you filter by, from the last 24 hours. A household or asset filter is required. # Retrieve an asset Source: https://docs.nomos.energy/api-reference/assets/retrieve-an-asset /openapi/openapi.gauss.json get /assets/{id} Retrieve an asset by its Nomos ID. # Retrieve an asset schedule Source: https://docs.nomos.energy/api-reference/assets/retrieve-an-asset-schedule /openapi/openapi.gauss.json get /assets/{id}/schedule The plan in force for an asset over Berlin delivery dates: one slot per planned quarter hour. A quarter hour without a slot runs the device's own logic. # Send asset snapshots Source: https://docs.nomos.energy/api-reference/assets/send-asset-snapshots /openapi/openapi.gauss.json post /asset-snapshots Send the live power and state of one household's assets, up to 10,000 snapshots per request. Every valid snapshot is stored, and a snapshot that breaks a rule is left out and listed in `rejected` with the path of the field at fault. When no snapshot is valid, the request answers with an error listing every problem in `errors`. A body that does not match the schema is refused as a whole. # Update an asset Source: https://docs.nomos.energy/api-reference/assets/update-an-asset /openapi/openapi.gauss.json patch /assets/{id} Change the data of an asset. Send only the fields that change. # Authorize Source: https://docs.nomos.energy/api-reference/authentication/authorize /openapi/openapi.gauss.json get /oauth/authorize Create an authorized session # Create a magic link (customer portal) Source: https://docs.nomos.energy/api-reference/authentication/create-a-magic-link-customer-portal /openapi/openapi.gauss.json post /admin/magic_link This endpoint can be used to create a customer portal magic link. The link (returned in the `link` property) allows your customer to directly access the customer portal. This is useful if you want to integrate the customer portal into your own application. Remember that it is your responsibility to make sure to provide the correct `customerId` for your user you'd like to log in. # Create a token Source: https://docs.nomos.energy/api-reference/authentication/create-a-token /openapi/openapi.gauss.json post /oauth/token Retrieve a token # List customers Source: https://docs.nomos.energy/api-reference/customers/list-customers /openapi/openapi.gauss.json get /customers Retrieve all customers with cursor pagination # Retrieve a customer Source: https://docs.nomos.energy/api-reference/customers/retrieve-a-customer /openapi/openapi.gauss.json get /customers/{id} Retrieve customer details by their id # Update a customer Source: https://docs.nomos.energy/api-reference/customers/update-a-customer /openapi/openapi.gauss.json patch /customers/{id} Update the name of a customer: `first_name` and `last_name`, and `company_name` on a company customer. Send only the fields that change. Returns the updated customer. From API version 2026-09-08.gauss, the body must be JSON without repeated keys, and any other field is rejected with `400 BAD_REQUEST`. # Retrieve an event Source: https://docs.nomos.energy/api-reference/events/retrieve-an-event /openapi/openapi.gauss.json get /events/{id} Retrieve event details by their id # Create a grid fee reduction Source: https://docs.nomos.energy/api-reference/grid-fee-reductions/create-a-grid-fee-reduction /openapi/openapi.gauss.json post /grid-fee-reductions Create a new grid fee reduction for §14a EnWG modules. Not applicable for feed-in subscriptions, which do not pay grid fees. **Grid fee reduction status:** - If the subscription is active: grid fee reduction is created with `ordered` status. Order is submitted immediately - If the subscription is pending: grid fee reduction is created with `intended` status. Order will be submitted once the subscription is confirmed **Re-ordering after rejection:** Re-ordering is allowed if the previous grid fee reduction was rejected or ended. **Ended and terminated subscriptions:** From `2026-09-08.gauss`, a subscription that has ended is refused with `ended_subscription`, and one with `terminated_at` set with `terminated_subscription`. # List grid fee reductions Source: https://docs.nomos.energy/api-reference/grid-fee-reductions/list-grid-fee-reductions /openapi/openapi.gauss.json get /grid-fee-reductions Retrieve all grid fee reductions for the organization. Customer users will only see their own. # Retrieve a grid fee reduction Source: https://docs.nomos.energy/api-reference/grid-fee-reductions/retrieve-a-grid-fee-reduction /openapi/openapi.gauss.json get /grid-fee-reductions/{id} Retrieve a grid reduction details by its id # List households Source: https://docs.nomos.energy/api-reference/households/list-households /openapi/openapi.gauss.json get /households Retrieve all households with cursor pagination # Retrieve a household Source: https://docs.nomos.energy/api-reference/households/retrieve-a-household /openapi/openapi.gauss.json get /households/{id} Retrieve a household by its id, with its customer and address expanded # List invoices Source: https://docs.nomos.energy/api-reference/invoices/list-invoices /openapi/openapi.gauss.json get /invoices Invoices summarise the amounts owed/payed for a subscription. Usage invoices (`type: "usage"`) bill the metered electricity consumption of a billing period and include all line items such as energy, grid fees and taxes. Prepayment invoices (`type: "prepayment"`) charge a fixed advance amount and carry no usage; an unpaid prepayment that is cancelled surfaces with `status: "uncollectible"`. Void invoices (`type: "void"`) are Storno documents that reverse a previously paid invoice and reference the original via `voids`. Voided originals are included with `status: "voided"`. The related PDFs are available via the `/invoices/{id}/file` endpoint. Customer users will only see their own. Use filter[subscription][eq]= to scope to a single subscription. Exit summaries (`type: "exit_summary"`) are the closing document of an ended subscription: they settle corrections to periods already billed and carry no usage of their own. # Retrieve an invoice Source: https://docs.nomos.energy/api-reference/invoices/retrieve-an-invoice /openapi/openapi.gauss.json get /invoices/{id} Download the PDF of an invoice # Retrieve an invoice PDF Source: https://docs.nomos.energy/api-reference/invoices/retrieve-an-invoice-pdf /openapi/openapi.gauss.json get /invoices/{id}/file Retrieve a PDF file of an invoice from the storage # Create a lead Source: https://docs.nomos.energy/api-reference/leads/create-a-lead /openapi/openapi.gauss.json post /leads This endpoint can be used to create a secure, pre-filled checkout link. The link (returned in the "link" property) contains all provided customer, address and meter data, allowing the prospect to finalize their signup with only providing the missing payment information, essentially enabling a 2-click checkout experience. Leads are tracked in the Nomos Dashboard for detailed conversion analytics. Leads can be created for both consumption and feed-in plans. # List leads Source: https://docs.nomos.energy/api-reference/leads/list-leads /openapi/openapi.gauss.json get /leads Retrieve all leads with cursor pagination. Leads for feed-in plans are only available from the `2026-05-27.curie` API version onwards. # Retrieve a lead Source: https://docs.nomos.energy/api-reference/leads/retrieve-a-lead /openapi/openapi.gauss.json get /leads/{id} Retrieve lead details by its id # Update a lead Source: https://docs.nomos.energy/api-reference/leads/update-a-lead /openapi/openapi.gauss.json patch /leads/{id} Update the editable fields of a lead. Send only the fields that change. `metadata` is merged key-by-key onto the stored object (a key set to `null` is removed; `metadata: null` clears every key). The request body must be JSON without repeated keys, and any unknown field is rejected with `400 BAD_REQUEST`. # List market partners Source: https://docs.nomos.energy/api-reference/market-partners/list-market-partners /openapi/openapi.gauss.json get /market-partners This is a list of all German electricity retailers, which a customer can select as their previous supplier in the checkout process. It can be used to build a dropdown menu in an embedded checkout to select the previous supplier. # Calculate a quote Source: https://docs.nomos.energy/api-reference/plans/calculate-a-quote /openapi/openapi.gauss.json post /plans/{id}/quote Price a plan for one delivery address and one annual consumption. All prices are inclusive of VAT, with one exception: feed-in payouts to a tax-exempt customer (`is_tax_exempt: true`, e.g. a Kleinunternehmer under § 19 UStG) are quoted without VAT, matching what the customer is later credited. The §14a EnWG grid fee reductions only apply to consumption plans, as feed-in plans pay no grid fees. This replaces `GET /plans/{id}/quote`, which is not served from the 2026-09-08.gauss API version onwards: same path, `POST` instead of `GET`. The inputs moved into a body so the §14a EnWG modules travel as one `grid_fee_reductions` object, and so the response of Calculate savings can be posted here field for field: `usage`, `optimization_rate` and `grid_fee_reductions` are named and shaped the same on both sides, `usage` carrying the priced kWh under `usage.consumption`. There is no `meter_type` any more either: it follows from the optimization rate that gets priced, since load shifting needs a smart meter. Nothing is read or written; the quote is computed and discarded. Two changes to the response from this version onwards. The load-shifting discount is a subcomponent of its own (`subgroup: "optimization"`, a negative amount) instead of being folded into `energy`, so `energy` is the undiscounted day-ahead average and the subcomponents still sum to `unit_amount`. And with `14a_module_3`, the `grid` subcomponent is the operator's low, standard and high windows blended over the share of the year the schedule is in effect, rather than the static rate. # Calculate savings Source: https://docs.nomos.energy/api-reference/plans/calculate-savings /openapi/openapi.gauss.json post /plans/{id}/savings Estimate what a household saves per year on this plan against the tariff it pays today, or against the market benchmark when none is given. All amounts are EUR per year, gross. The household is described by its base consumption plus one object per asset it owns. Presence is the signal: send `assets.ev` and the household has an electric vehicle. The optimization rate and the §14a EnWG eligibility follow from that mix and from what the plan sells; they cannot be requested, because a household that qualifies is quoted as qualifying and whether it later declines the registration is a signup answer rather than a property of the setup. The saving is the difference between two quotes on this plan with the same usage, one at market prices without §14a EnWG and one at the derived rate with the eligible modules, so `components` is that difference line by line and sums to `savings`. Nothing is read or written; the calculation is performed and discarded. The fields the response and Calculate a quote share are named and shaped the same: post `usage`, `optimization_rate` and `grid_fee_reductions` back unchanged to price the same household there and reconcile every figure. Feed-in plans are rejected with `400 BAD_REQUEST`. # List plans Source: https://docs.nomos.energy/api-reference/plans/list-plans /openapi/openapi.gauss.json get /plans Retrieve all plans with cursor pagination # Retrieve a plan Source: https://docs.nomos.energy/api-reference/plans/retrieve-a-plan /openapi/openapi.gauss.json get /plans/{id} Retrieve a plan details by its id # Retrieve a subscription price time series Source: https://docs.nomos.energy/api-reference/prices/retrieve-a-subscription-price-time-series /openapi/openapi.gauss.json get /subscriptions/{id}/prices Retrieve a price object for a given subscription. For a consumption subscription this is the variable price time series the customer pays and can optimize consumption against; for a feed-in subscription it is the payout the customer is credited per kWh, based on EPEX day-ahead spot prices and without grid fees. All prices are inclusive of VAT, except feed-in payouts to a VAT-exempt customer. # Create a smart meter order Source: https://docs.nomos.energy/api-reference/smart-meter-orders/create-a-smart-meter-order /openapi/openapi.gauss.json post /meter-orders Create a new meter order for a subscription. The subscription's plan must support a smart-meter product type. Not applicable for feed-in subscriptions, as a smart meter must be present before starting a feed-in subscription. From `2026-09-08.gauss`, a subscription that has ended is refused with `ended_subscription`, and one with `terminated_at` set with `terminated_subscription`. # List smart meter orders Source: https://docs.nomos.energy/api-reference/smart-meter-orders/list-smart-meter-orders /openapi/openapi.gauss.json get /meter-orders Retrieve all meter orders for the organization # Retrieve a smart meter order Source: https://docs.nomos.energy/api-reference/smart-meter-orders/retrieve-a-smart-meter-order /openapi/openapi.gauss.json get /meter-orders/{id} Retrieve a meter order by its ID # Create a subscription Source: https://docs.nomos.energy/api-reference/subscriptions/create-a-subscription /openapi/openapi.gauss.json post /subscriptions Create a new subscription. The plan's direction decides which signup rules apply. **Consumption plans:** - `meter.type` may be `smart` or `analog` - `customer.vat_id` is optional - `intended_start_date` may be any future date; a date in the past is corrected to the next possible date, and when omitted, the next possible start date is used - `previous_supplier` may be set to cancel the customer's existing contract - `product_orders` may order a smart meter or §14a EnWG grid fee reductions, if the plan supports them **Feed-in plans:** - `meter.type` must be `smart`: a smart meter has to be installed before the signup - `customer.vat_id` is required when `customer.type` is `company`, optional for persons - `intended_start_date` must be the first day of a month, at least one month in the future; when omitted, the next possible production start date is used - `previous_supplier` is not required for previous EEG customers. - `product_orders` are not supported: §14a EnWG does not apply to feed-in, and the smart meter must already be present Requests that break one of these rules are rejected with `400 BAD_REQUEST` and a message naming the violated rule. From API version 2026-09-08.gauss, the body must be JSON without repeated keys, an unknown field is rejected with `400 BAD_REQUEST` instead of being ignored, and `next_possible_start: false` requires `intended_start_date`. # List subscriptions Source: https://docs.nomos.energy/api-reference/subscriptions/list-subscriptions /openapi/openapi.gauss.json get /subscriptions Retrieve all subscriptions # Retrieve a subscription Source: https://docs.nomos.energy/api-reference/subscriptions/retrieve-a-subscription /openapi/openapi.gauss.json get /subscriptions/{id} Retrieve a subscription details by its id # Terminate a subscription Source: https://docs.nomos.energy/api-reference/subscriptions/terminate-a-subscription /openapi/openapi.gauss.json post /subscriptions/{id}/terminate Terminate a subscription. Three reasons are supported: - `ORDINARY`: regular termination. `intended_end_at` is optional; when omitted, the plan's cancellation period applies. - `MOVE_OUT`: special termination right tied to a move-out date. `intended_end_at` is mandatory and still has to leave the grid operator a few working days of notice. - `WITHDRAWAL`: 14-day cooling-off period (Widerruf) after contract confirmation. The end date is calculated to comply with grid-operator notice periods. All end dates in the request and response are **exclusive** midnight Europe/Berlin: from that moment the customer is no longer supplied. The customer's last day of supply is the day before the named date. Every termination reason has to clear the grid operator's working-day notice; ORDINARY additionally has to respect the plan's cancellation period. Conflict responses (`409`) carry a dedicated `errors[].code`: - `invalid_termination_date` — the requested date is in the past or violates the plan's / grid operator's notice period. - `withdrawal_not_allowed` — the 14-day withdrawal window has elapsed (or the subscription has no confirmed_at to count from). # Update a subscription Source: https://docs.nomos.energy/api-reference/subscriptions/update-a-subscription /openapi/openapi.gauss.json patch /subscriptions/{id} Update the editable fields of a subscription. Only the allow-listed properties may be changed; any other field is ignored. `billing_address` replaces the subscription's billing address (all of street, house number, zip, city are required); the address row is mutated in place, so a row shared across a customer's subscriptions changes everywhere it is referenced. `payment_method` attaches a new SEPA direct-debit mandate to the subscription, replacing the current mandate. `metadata` is merged key-by-key onto the stored metadata (a key set to `null` is removed; `metadata: null` clears every key). Returns the updated subscription. From API version 2026-09-08.gauss, the body must be JSON without repeated keys. # Create a meter reading Source: https://docs.nomos.energy/api-reference/usage/create-a-meter-reading /openapi/openapi.gauss.json post /meter-readings Submit a customer-reported analog meter reading. The reading is attributed to the meter that was installed on the reading date. # List meter readings Source: https://docs.nomos.energy/api-reference/usage/list-meter-readings /openapi/openapi.gauss.json get /meter-readings Retrieve all meter readings for the organization with cursor pagination. Customer users will only see their own. Use filter[subscription][eq]= to scope to a single subscription. # Retrieve usage data Source: https://docs.nomos.energy/api-reference/usage/retrieve-usage-data /openapi/openapi.gauss.json get /subscriptions/{id}/usage Retrieve the usage data for a subscription. Usage is the electricity consumed from the grid, or fed into the grid for feed-in subscriptions. Values are positive magnitudes for both directions; the direction comes from the plan. Results depend on the meter type. **Smart meters**: Usage data becomes available from 4pm on the following day. Metering Service Providers (MSB) might share preliminary values until replaced by final values up to the 8th working day of the following month. Data is available as soon as provided by the responsible MSB. Delays or missing data may occur. **Analog meters**: Data is based on meter readings by customers and MSBs and available on a monthly level. In the absence of metering readings, Nomos creates a preliminary estimation at the end of each month. Subsequent meter readings take precedence over existing estimates and trigger invoice corrections if applicable. # Authentication Source: https://docs.nomos.energy/api-references/authentication Authenticate with the Nomos API using OAuth 2.0. The Nomos API uses [OAuth 2.0](https://datatracker.ietf.org/doc/html/rfc6749). You'll need a `client_id` and `client_secret` issued to your organization. Keep the secret server-side. Most integrations use the [Client Credentials](#client-credentials-grant) flow for server-to-server access against your own organization's data. If your app instead acts on behalf of a customer (for example, a HEMS provider reading prices for a specific subscription), use the [Authorization Code](#authorization-code-grant) flow. ## Client Credentials Grant Server-to-server flow against your own organization's data ([RFC 6749 §4.4](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)). No customer interaction is involved. ### Request a token ```bash cURL theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=client_credentials ``` ```ts Node.js theme={null} const credentials = Buffer.from( `${process.env.CLIENT_ID}:${process.env.CLIENT_SECRET}`, ).toString("base64"); const res = await fetch("https://api.nomos.energy/oauth/token", { method: "POST", headers: { Authorization: `Basic ${credentials}`, "Content-Type": "application/x-www-form-urlencoded", }, body: "grant_type=client_credentials", }); const { access_token, refresh_token, expires_in } = await res.json(); ``` ```python Python theme={null} import os, requests res = requests.post( "https://api.nomos.energy/oauth/token", auth=(os.environ["CLIENT_ID"], os.environ["CLIENT_SECRET"]), data={"grant_type": "client_credentials"}, ) res.raise_for_status() access_token = res.json()["access_token"] ``` `/oauth/token` responds with: ```json theme={null} { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "21cc84a3ad98736f4e5eddc88a1f4b58a29ae96206027c9b59d874cb2a7f7e02", "scope": "read:* write:*" } ``` The `scope` field is a space-delimited list of scopes granted on the token, mirroring the standard OAuth 2.0 [`scope` claim](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3). See [Scopes](#scopes) for what each value allows. ### Use the access token Send it in the `Authorization` header on every API request: ```bash theme={null} curl https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` ### Refresh Access tokens last **60 minutes**. When yours expires, exchange the refresh token at `/oauth/token` for a new pair: ```bash theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=refresh_token \ -d refresh_token=${REFRESH_TOKEN} ``` ## Authorization Code Grant If your app acts on a customer's behalf instead of running server-to-server, use this flow ([RFC 6749 §4.1](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1)). The token response, header usage, and refresh model are identical to [Client Credentials](#client-credentials-grant); only the way you obtain the initial token differs. Your callback URI must be registered against your `client_id`; subpaths under the registered origin are accepted. **1. Redirect the customer to /oauth/authorize** ``` https://api.nomos.energy/oauth/authorize? client_id=${CLIENT_ID}& response_type=code& redirect_uri=${REDIRECT_URI}& state=${STATE} ``` `state` is a per-request opaque value you generate, store, and verify on callback (CSRF protection). > [!TIP] > > For [PKCE](#pkce), also send `code_challenge` and `code_challenge_method` (use `S256`). Public clients (no `client_secret`) must use PKCE. > [!NOTE] > > While the redirect is open, the customer signs in and grants consent on Nomos-hosted screens. See the [third-party login guide](/guides/third-party-oauth) for the customer journey. **2. Handle the callback** Nomos redirects with a single-use code (10-minute TTL) and your `state`. Reject the callback if `state` doesn't match. ``` https://your-app.com/callback? code=${AUTHORIZATION_CODE}& state=${STATE} ``` **3. Exchange the code at /oauth/token** ```bash theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=authorization_code \ -d code=${AUTHORIZATION_CODE} \ -d redirect_uri=${REDIRECT_URI} ``` For PKCE, also send `code_verifier`. ### PKCE PKCE (Proof Key for Code Exchange) hardens the flow against code interception ([RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636)). Prefer `S256` over `plain`. **1. Generate a verifier and challenge** Pick a random `code_verifier` of 43–128 characters from `[A-Za-z0-9-._~]`. With `S256`, the `code_challenge` is the base64url-encoded SHA-256 of the verifier; with `plain`, it's the verifier itself. **2. Send the challenge on /oauth/authorize** Add `code_challenge` and `code_challenge_method` to the authorize URL. **3. Send the verifier on /oauth/token** Include the original `code_verifier` in the token request. Nomos validates it against the challenge. ## Scopes Each API key is issued with one or more scopes. Two scopes are defined today: | Scope | Allows | | - | - | | `read:*` | All `GET` requests across the API. | | `write:*` | All non-`GET` requests (`POST`, `PATCH`, `PUT`, `DELETE`). | A key with both scopes (`read:* write:*`) is full-access, the default. A read-only key carries only `read:*` and is rejected with `403 FORBIDDEN` on any mutating request. Choose read-only when issuing a key for a programmatic agent, ETL job, or BI consumer that should never mutate state. Scopes are set when the key is created and cannot be changed later. To switch a key from full access to read-only (or vice versa), create a new key and rotate. The `scope` field is `*` because future iterations may introduce resource-named scopes (`read:invoice`, `write:subscription`) that narrow access further. Keys with the wildcard scopes continue to behave as supersets. > [!NOTE] > > Auth failures return `401 UNAUTHORIZED` with the standard error envelope. > Scope failures return `403 FORBIDDEN`. See > [Errors](/api-references/errors/UNAUTHORIZED) for the response shape and > common causes. # Changelog Source: https://docs.nomos.energy/api-references/changelog What changed between Nomos API versions. Each entry below corresponds to a date-based version you can pin per Auth Client or per request. See [Versioning](/api-references/versioning) for how to upgrade. **2026-09-08.gauss** Gauss introduces households, assets with live data and schedules, day-ahead price forecasts, and savings estimates, and moves quotes to a request body. Older versions keep the removed routes and previous response shapes. **Breaking changes** | Old route | Replacement | | - | - | | `GET /plans/{id}/quote` | `POST /plans/{id}/quote` | | `POST /load-forecasts` | Removed | * [Calculate a quote](/api-reference/plans/calculate-a-quote) takes its inputs in the request body. The §14a EnWG modules move into one `grid_fee_reductions` object, and the consumption moves to `usage.consumption`. * The quote response drops `meter_type` and states the load-shifting discount as its own `optimization` subcomponent. `energy` is now the undiscounted day-ahead average. * `POST /plans/{id}/quote` and `POST /plans/{id}/savings` require a `write:*` token. * On every version, list endpoints return `400` for an unknown filter field or an unsupported operator. See [Filtering](/api-references/filtering). **New features** * `GET /households` and `GET /households/{id}` expose the households a customer's subscriptions belong to. * `POST /assets`, `GET /assets`, `GET /assets/{id}`, `PATCH /assets/{id}`, and `POST /assets/{id}/decommission` manage the devices behind a household's meter: inverters, solar, batteries, wallboxes, and heat pumps. * `POST /asset-snapshots` and `GET /asset-snapshots` send and read the live state of a household's assets. * `GET /assets/{id}/schedule` reads the quarter-hour plan in force for a steerable asset. * `GET /subscriptions/{id}/prices` adds an optional `type` parameter. `day_ahead_forecast` prices the series on the Nomos day-ahead price forecast, and the default stays the realized auction. * `POST /plans/{id}/savings` estimates what a household saves per year on a plan. * [Calculate a quote](/api-reference/plans/calculate-a-quote) accepts an optional `optimization_rate` and §14a EnWG module 3 (`14a_module_3`). * On every version, subscriptions carry a `household` field. * Invoices add support for exit summaries via a new `type` value (`exit_summary`). * `PATCH /leads/{id}` updates a lead's editable fields and merges `metadata` key by key. **2026-05-27.curie** Curie introduces feed-in support, improved smart meter orders, webhook events, the first `PATCH` endpoints, and restructures key resources around top-level endpoints. Older versions keep the removed routes and previous response shapes. **Breaking changes** Several routes are replaced by top-level endpoints. The old routes are removed from this version onwards: | Old route | Replacement | | - | - | | `GET /subscriptions/{id}/invoices` | `GET /invoices` | | `GET /subscriptions/{id}/meter_readings` | `GET /meter-readings` | | `POST /subscriptions/{id}/meter_readings` | `POST /meter-readings` | | `GET /suppliers`, `GET /suppliers/search` | `GET /market-partners` | | `GET /subscriptions/{id}/consumption` | `GET /subscriptions/{id}/usage` | Scope the new list endpoints to a single subscription with `filter[subscription][eq]=` * The [Retrieve usage data](/api-reference/usage/retrieve-usage-data) response `object` field changes from `consumption` to `usage`. * Meter order responses collapse `status` from 14 internal partner-specific states to 8 public values and drop `updated_at`; see [Retrieve a smart meter order](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order) for the full list. `POST /meter-orders` is unchanged. **New features** * [Feed-in](/guides/feed-in) plans compensate customers for electricity they feed into the grid, for example from rooftop solar. Plans and subscriptions carry a `type` field (`consumption` or `feed_in`). * `POST /subscriptions/{id}/terminate` terminates a subscription via a discriminated `reason` field: `ORDINARY`, `MOVE_OUT`, or `WITHDRAWAL`. * `PATCH /subscriptions/{id}` updates the billing address, payment method, or metadata. * `PATCH /customers/{id}` updates the customer's name. * Meter orders report lifecycle timestamps and reasons for cancelled or blocked orders. * Invoices add support for prepayments and voided invoices via new `type` values (`prepayment`, `void`) and statuses (`voided`, `uncollectible`). * [Structured validation errors](/api-references/errors): failures return an `errors[]` array with one entry per invalid field instead of a single message. * [Webhook events](/webhooks/introduction) for invoices and smart meter orders. **2026-01-29.edison** Edison adds grid fee reductions for §14a EnWG modules, smart meter orders, and filtering on all list endpoints. **New features** * `GET /grid-fee-reductions`, `GET /grid-fee-reductions/{id}`, and `POST /grid-fee-reductions` manage grid fee reductions for §14a EnWG modules. * `GET /meter-orders`, `GET /meter-orders/{id}`, and `POST /meter-orders` manage smart meter orders for a subscription. * All list endpoints support [Filtering](/api-references/filtering). **2025-12-16.batman** Batman introduces pagination on all list endpoints and API versioning. **Breaking changes** * List endpoints are paginated. See [Pagination](/api-references/pagination). Affects `/customers`, `/leads`, `/plans`, `/subscriptions`, `/subscriptions/{id}/invoices`, `/subscriptions/{id}/meter_readings`, `/suppliers`, and `/suppliers/search`. **New features** * [Versioning](/api-references/versioning). Routes stay the same; pin a version per Auth Client or per request via `X-API-Version`. **2025-12-01.chucky** Initial public version of the Nomos API. # Errors Source: https://docs.nomos.energy/api-references/errors Decode the Nomos error envelope and handle each error code. Every error response uses the same JSON envelope, with a status code that follows standard HTTP semantics. ```json theme={null} { "code": "BAD_REQUEST", "message": "Invalid input: expected string, received undefined", "requestId": "37a04f8f-e791-491c-81e1-86cd304649bb", "docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST" } ``` | Field | Description | | - | - | | `code` | Machine-readable error code. Switch on this in your handler. | | `message` | Human-readable description of what went wrong. | | `requestId` | Unique request identifier. Include it when contacting support. | | `docs` | Link to the reference page for this code. | | `errors` | Optional. Per-field breakdown of a validation or business-rule failure (see [Structured errors](#structured-errors)). | > [!TIP] > > Always log the `requestId` alongside the request that caused the error. It's > the fastest way for support to find the corresponding trace. ## Structured errors When a request fails validation or a business rule, the envelope carries an additional `errors` array with a per-field breakdown. Switch on each entry's `code` to map the failure back to a specific input, instead of parsing the human-readable `message`. > [!NOTE] > > The `errors` array is available from version `2026-05-27.curie` onwards. On > earlier versions the envelope omits it and only `code`, `message`, > `requestId`, and `docs` are returned. ```json theme={null} { "code": "BAD_REQUEST", "message": "We don't currently serve this postal code.", "requestId": "37a04f8f-e791-491c-81e1-86cd304649bb", "docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST", "errors": [ { "code": "unserviceable_zip", "field": "address.zip", "message": "We don't currently serve this postal code." } ] } ``` Each entry has these fields: | Field | Description | | - | - | | `code` | Machine-readable reason for this field. Either a standard validation code (`invalid_type`, `too_small`, ...) or a Nomos-specific business code (`unserviceable_zip`). | | `field` | Dot-path to the offending field (`address.zip`). Empty for a top-level issue. | | `message` | Human-readable description of this specific issue. | The top-level `code` stays the coarse HTTP class (for example `BAD_REQUEST`); the `errors[].code` values are the granular reasons you switch on. ### Validation codes These cover schema validation failures and map to the underlying validator's issue codes. | Code | Description | | - | - | | `invalid_type` | Wrong type for the field, or the field is missing entirely. | | `too_big` | Value exceeds its maximum (number too large, string or array too long). | | `too_small` | Value is below its minimum (number too small, string or array too short). | | `invalid_format` | String doesn't match the expected format (email, UUID, ISO date, ...). | | `not_multiple_of` | Number isn't a multiple of the required step. | | `unrecognized_keys` | The object contains keys that aren't allowed, or a filter the endpoint rejects. | | `invalid_union` | Not surfaced directly in `errors[]`; unions are flattened into their branch issues. | | `invalid_key` | A key in a record or map is invalid. | | `invalid_element` | An element of a set or map is invalid. | | `invalid_value` | Value isn't one of the allowed options (enum or literal mismatch). | | `custom` | A custom validation rule failed with no more specific code. | ### Business error codes Beyond the validation codes above, `errors[].code` can carry a Nomos-specific business code: > [!NOTE] > > Business error codes are available from version `2026-05-27.curie` onwards. On > earlier versions these failures surface only through the top-level `code` and > `message`. | Code | Status | Description | | - | - | - | | `unserviceable_zip` | `400` | The postal code in `address.zip` is outside the area Nomos serves. | | `unsupported_product` | `400` | A requested entry in `product_orders`, or from `2026-09-08.gauss` a §14a EnWG module on a grid fee reduction, isn't offered by the plan. | | `duplicate_customer_email` | `400` | A customer with this email already exists under a different type, name, or company. Reconcile before retrying. | | `invalid_iban` | `400` | The IBAN in `payment_method.sepa_debit.iban` failed checksum validation. | | `unsupported_meter` | `400` | The plan doesn't support the capacity (RLM) meter named in `meter.type`. | | `unsupported_meter_order` | `400` | The subscription's plan offers no smart meter product, so a meter order can't be placed. | | `duplicate_meter_order` | `409` | An active meter order of this product already exists for the subscription. | | `ended_subscription` | `400` | The subscription has ended, so a grid fee reduction (from `2026-09-08.gauss` also a meter order) can't be created for it. | | `terminated_subscription` | `400` | The subscription has `terminated_at` set, so from `2026-09-08.gauss` it takes no new grid fee reduction or meter order, even before it ends. | | `duplicate_grid_reduction` | `400` | An active §14a EnWG grid fee reduction already exists for this module on the subscription, or the module is requested twice. | | `missing_smart_meter` | `400` | §14a EnWG module 3 requires a smart meter, which the subscription doesn't have. | | `missing_module_1` | `400` | §14a EnWG module 3 can only be ordered together with module 1, in the same signup or next to an active module 1. | | `incompatible_grid_reduction` | `400` | §14a EnWG module 2 cannot be combined with module 1 or module 3, in the same signup or next to an active reduction. From `2026-09-08.gauss`. | | `out_of_period_meter_reading` | `400` | The reading `timestamp` is outside the subscription period or in the future. | | `unsupported_meter_reading` | `400` | Meter readings can only be reported for analog meters; this subscription's meter is smart. | | `duplicate_meter_reading` | `409` | A meter reading already exists for this day. Resubmitting the identical value returns the stored reading instead. | | `implausible_meter_reading` | `422` | The reading implies a daily consumption that is implausibly high or low compared to previous readings. | | `upgrade_api_version` | `400` | The request targets a feature (such as feed-in subscriptions) not available on the requested API version. Upgrade to a newer version. | | `invalid_termination_date` | `409` | The requested `intended_end_at` is in the past, or earlier than the plan's cancellation period or the grid operator's notice period allow. | | `withdrawal_not_allowed` | `409` | The 14-day withdrawal window has passed, or the subscription has no confirmation date to count it from. | | `subscription_not_started` | `400` | The subscription never started supply (e.g. it was withdrawn before the switch completed), so no prices are available for it. | | `missing_household` | `400` | Several of the customer's households match the meter, so Nomos cannot pick one. Pass the household explicitly. | | `invalid_household_customer` | `400` | The household in `household` belongs to a different customer than the one in this request. | | `invalid_household_meter` | `400` | The meter is not registered at the household in `household`. Pass the household the meter belongs to, or leave it empty to create one. | | `duplicate_consumption_subscription` | `400` | The household in `household` already has a live consumption subscription on another meter. A separately metered device needs its own household. | | `invalid_inverter` | `400` | `parent_inverter` is not an active inverter in the same household, is set on a type other than `solar` or `battery`, or is missing on a solar asset. | | `read_only_asset` | `400` | Nomos maintains `household_net` and `household_residual`: they can't be added or decommissioned, and an update only changes their `metadata`. | | `duplicate_external_id` | `409` | An asset of your organization already has this `external_id`, active or decommissioned. The message names its ID. | | `asset_has_children` | `409` | The inverter still has active solar or battery assets behind it. Decommission them or move them to another inverter first. | | `asset_decommissioned` | `409` | The asset is decommissioned: it can't be updated or decommissioned again, and takes no snapshots measured after its decommissioning. | | `asset_not_found` | `404` | An asset in the request does not exist or belongs to another organization. | | `mixed_households` | `400` | One request may only carry the assets of one household. Send each household in its own request. | | `field_not_allowed` | `400` | The field does not apply here, for example a charge level on a solar asset or any value on an offline snapshot. | | `invalid_direction` | `400` | The power flows in a direction the asset cannot have, for example solar consuming. Power is positive into the asset and negative out of it. | | `duplicate_timestamp` | `400` | Two snapshots of one asset have the same timestamp. Send one value per asset and moment. | ## Retrying Retry only when retrying could plausibly succeed. Use exponential backoff with jitter and cap the attempts. | Status | Retry | | - | - | | `4xx` | No. Fix the request before retrying. | | `5xx` | Yes, with exponential backoff. | ## Error reference | Status | Code | Description | | - | - | - | | `400` | `BAD_REQUEST` | The request is invalid: a field fails validation, a business rule rejects it, or the body isn't valid JSON. `errors[]` names each field and its reason. | | `401` | `UNAUTHORIZED` | No credentials, or the access token is invalid or expired. Refresh and retry. See [Authentication](/api-references/authentication). | | `403` | `FORBIDDEN` | Valid token, but it may not use this endpoint: its scope lacks `read:*` or `write:*`, or its role has no access. | | `404` | `NOT_FOUND` | A resource in the path or the body doesn't exist, or belongs to another organization. Double-check the ID. | | `409` | `CONFLICT` | The request conflicts with the current state of a resource: a duplicate such as an existing meter order, or a resource in the wrong state such as an already terminated subscription. | | `422` | `UNPROCESSABLE_ENTITY` | A query parameter is invalid, such as a filter value outside its allowed options or a date that doesn't exist, or a meter reading is implausible. Read `errors[]` for the details. | | `500` | `INTERNAL_SERVER_ERROR` | Unexpected error on Nomos's side. Retry with backoff. If it persists, email [support@nomos.energy](mailto:support@nomos.energy) with the `requestId`. | # Filtering Source: https://docs.nomos.energy/api-references/filtering Narrow list endpoints with bracket-notation query filters. Every list endpoint supports filtering through query parameters in the form `filter[][]=`. Multiple filters combine with **AND**. ```bash theme={null} curl -G "https://api.nomos.energy/customers" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[type][eq]=person" \ --data-urlencode "filter[created_at][gte]=2024-01-01T00:00:00Z" ``` The endpoint reference lists each filterable field and the operators it accepts. The tables below show the most each field type allows, and a field can accept fewer. A filter on an unknown field, an operator the field does not accept, the same filter sent twice, or more than one of `eq`, `ne` and `in` on one field returns `400 BAD_REQUEST`, so a typo never returns the unfiltered list. An empty `in` list matches nothing. ## Operators by field type **String** | Operator | Description | Example | | - | - | - | | `eq` | Exact match | `filter[email][eq]=john@example.com` | | `ne` | Not equal | `filter[status][ne]=cancelled` | | `in` | Comma-separated list | `filter[status][in]=active,pending` | | `is_null` | Null check (`true`/`false`) | `filter[deleted_at][is_null]=true` | | `contains` | Case-insensitive contains | `filter[last_name][contains]=mueller` | | `starts_with` | Case-insensitive prefix | `filter[email][starts_with]=john` | | `ends_with` | Case-insensitive suffix | `filter[email][ends_with]=@example.com` | **Number** | Operator | Description | Example | | - | - | - | | `eq` | Equal to | `filter[amount][eq]=100` | | `ne` | Not equal | `filter[amount][ne]=0` | | `gt` | Greater than | `filter[amount][gt]=100` | | `gte` | Greater than or equal | `filter[amount][gte]=100` | | `lt` | Less than | `filter[amount][lt]=1000` | | `lte` | Less than or equal | `filter[amount][lte]=1000` | | `in` | Comma-separated list | `filter[amount][in]=10,20,30` | | `is_null` | Null check | `filter[amount][is_null]=false` | **Date** Dates must be ISO 8601 with timezone, between `0001-01-01` and `9999-12-31` UTC. | Operator | Description | Example | | - | - | - | | `gte` | On or after | `filter[created_at][gte]=2024-01-01T00:00:00Z` | | `lte` | On or before | `filter[created_at][lte]=2024-12-31T23:59:59Z` | | `is_null` | Null check | `filter[terminated_at][is_null]=true` | **Boolean** | Operator | Description | Example | | - | - | - | | `eq` | `true` / `false` | `filter[is_verified][eq]=true` | | `is_null` | Null check | `filter[is_verified][is_null]=false` | **Enum** | Operator | Description | Example | | - | - | - | | `eq` | Exact match | `filter[status][eq]=active` | | `ne` | Not equal | `filter[status][ne]=cancelled` | | `in` | Comma-separated list | `filter[status][in]=active,pending` | The endpoint reference lists the allowed values for each enum field. ## Common patterns ### Filter by date range ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[created_at][gte]=2024-01-01T00:00:00Z" \ --data-urlencode "filter[created_at][lte]=2024-01-31T23:59:59Z" ``` ### Filter by multiple values ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][in]=active,pending" ``` ### Search by substring ```bash theme={null} curl -G "https://api.nomos.energy/market-partners" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[name][contains]=stadtwerke" ``` ### Exclude ended subscriptions ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][ne]=ended" ``` ### Combine with pagination Pass the same filter parameters with each page when [paginating](/api-references/pagination): ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][eq]=active" \ --data-urlencode "limit=20" \ --data-urlencode "cursor=${NEXT_PAGE}" ``` > [!NOTE] > > Malformed filter syntax returns `400 BAD_REQUEST` and an invalid value returns > `422 UNPROCESSABLE_ENTITY`, each with a message naming the offending > parameter. See [Errors](/api-references/errors) for the full envelope. # API Reference Source: https://docs.nomos.energy/api-references/introduction Understand general concepts, response codes, and authentication strategies. ## Base URL The Nomos API is built on REST principles. We enforce HTTPS in every request to improve data security, integrity, and privacy. The API does not support HTTP. All requests contain the following base URL: ``` https://api.nomos.energy ``` > [!NOTE] > > When using the sandbox for testing, take: `https://api.sandbox.nomos.energy` ## Resources > **[Authentication](/api-references/authentication)** > > Get a Bearer token using OAuth 2.0. > **[Versioning](/api-references/versioning)** > > Pin a version per Auth Client or per request. > **[Pagination](/api-references/pagination)** > > Walk list endpoints with cursor-based pagination. > **[Filtering](/api-references/filtering)** > > Narrow lists with bracket-notation query filters. > **[Errors](/api-references/errors)** > > Decode the error envelope and handle each code. > **[Changelog](/api-references/changelog)** > > See what changed between API versions. ## Need help? Email [support@nomos.energy](mailto:support@nomos.energy) and include the `requestId` from the error response. # Pagination Source: https://docs.nomos.energy/api-references/pagination Walk list endpoints with cursor-based pagination. Every list endpoint returns the same envelope and uses cursor-based pagination. Cursors guarantee no duplicates or missing items even if data changes between requests. Items come back newest first, ordered by `created_at`. ## Request parameters | Parameter | Description | | - | - | | `limit` | Page size, 1–100. Defaults to 10. | | `cursor` | The `next_page` value from the previous response. Omit on the first request. | ## Response envelope ```json theme={null} { "object": "list", "items": [ /* … */ ], "has_more": true, "next_page": "eyJsYXN0X2NyZWF0ZWRfYXQiOiIyMDI1LTAxLTE1VDEwOjMwOjAwLjAwMFoiLCJsYXN0X2lkIjoic3ViXzEyMzQ1Njc4OSIsImxpbWl0IjoyMH0=" } ``` | Field | Description | | - | - | | `items` | The page of results. | | `has_more` | `true` when more pages exist; `false` when this is the last page. | | `next_page` | Opaque cursor for the next request, or `null` on the last page. | > [!WARNING] > > Keep the same query parameters across the whole iteration (filters, `limit`, > etc.). Changing them mid-walk invalidates the cursor. ## Walk a list **1. Fetch the first page** ```bash theme={null} curl "https://api.nomos.energy/customers?limit=20" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` **2. Fetch each next page** Pass `next_page` from the previous response as `cursor` on the next request: ```bash theme={null} curl "https://api.nomos.energy/customers?limit=20&cursor=${NEXT_PAGE}" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` **3. Stop when has\_more is false** The last page returns `"has_more": false` and `"next_page": null`. ## Loop in code ```ts theme={null} async function listAll(path: string, token: string): Promise { const items: T[] = []; let cursor: string | null = null; do { const url = new URL(path, "https://api.nomos.energy"); if (cursor) url.searchParams.set("cursor", cursor); const res = await fetch(url, { headers: { Authorization: `Bearer ${token}` }, }); const page = (await res.json()) as { items: T[]; has_more: boolean; next_page: string | null; }; items.push(...page.items); cursor = page.has_more ? page.next_page : null; } while (cursor); return items; } ``` > [!NOTE] > > A malformed or tampered `cursor` returns `400 BAD_REQUEST`. See > [Errors](/api-references/errors) for the full envelope. # Versioning Source: https://docs.nomos.energy/api-references/versioning Pin an API version per Auth Client or per request. The `X-API-Version` header controls the request and response shapes your code sees. Each Auth Client has a default version, used when the header isn't sent. New Auth Clients default to the latest stable release. Breaking changes only ship in a new version, so existing integrations keep working until you opt in. Additive changes (new response fields, new endpoints) can land in existing versions, so build your client to ignore fields it does not recognize. Every response echoes the version it was processed with: ```http theme={null} HTTP/1.1 200 OK X-API-Version: 2026-09-08.gauss ``` ## Upgrade an Auth Client **1. Review the changelog** Check what changed between your current version and the target in the [Changelog](/api-references/changelog). **2. Test against your existing traffic** Send the target version as `X-API-Version` to override the Auth Client's default on a per-request basis. Confirm everything still works before changing the default. ```bash theme={null} curl https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "X-API-Version: 2026-09-08.gauss" ``` **3. Switch the default in the dashboard** In the Nomos dashboard, open **Developer**, edit the Auth Client, pick the new version, and save. Future tokens minted by that client use the new version. Tokens issued earlier stay on the previous version until they expire (see [Authentication](/api-references/authentication) for token lifetime). ## Available versions | Version | Status | | - | - | | `2026-09-08.gauss` | Latest stable | | `2026-05-27.curie` | Previous release | | `2026-01-29.edison` | Previous release | | `2025-12-16.batman` | Previous release | | `2025-12-01.chucky` | Initial stable release | See the [Changelog](/api-references/changelog) for what changed in each release. # AI agents Source: https://docs.nomos.energy/guides/ai-agents Give a coding or operations agent working knowledge of the Nomos API with an installable skill. If you build against Nomos with an AI agent (a coding assistant, an internal ops bot, an autonomous integration), you can hand it a skill that teaches it the API in one shot: the base URL, OAuth, versioning, pagination, filtering, error handling, and every endpoint grouped by the scope it needs. The agent then makes correct calls without you pasting docs into each prompt. The skill is scope-aware. It separates the read surface (every `GET`, available to a `read:*` token) from the write surface (mutating calls, which need `write:*`), so an agent holding a read-only key knows up front which endpoints it can use and treats the rest as unavailable. ## Install the skill The skill follows the [Agent Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview) format: a `SKILL.md` file with a name, a description, and a body the agent loads when the description matches the task. **1. Get the skill file** Copy the skill from the code block at the bottom of this page and save it as `SKILL.md` inside a folder named `nomos-api`. **2. Drop it where your agent looks for skills** ```bash Claude Code theme={null} mkdir -p ~/.claude/skills/nomos-api # save the file as ~/.claude/skills/nomos-api/SKILL.md ``` ```bash Project-scoped theme={null} mkdir -p .claude/skills/nomos-api # commit .claude/skills/nomos-api/SKILL.md with your repo ``` For the [Claude Agent SDK](https://docs.claude.com/en/api/agent-sdk/overview), point your agent at the same `skills` directory. For Cursor or another assistant, add the file to its rules or context directory. **3. Let the agent use it** The agent loads the skill when a task matches its description (building or debugging a Nomos integration). Ask it to call the API as usual; it now knows the endpoints and conventions. > [!TIP] > > Every page on this site can be sent straight to Claude, ChatGPT, or Cursor > with the menu at the top right. The skill packages that knowledge into one > reusable file instead. ## What the skill knows, and what it defers The skill carries the stable, conceptual knowledge: which endpoints exist, what they do, how auth and scopes work, and the shared conventions for pagination, filtering, and errors. It does not hard-code field-level request and response schemas, which change per version. Instead it points the agent at the live OpenAPI spec for the version it targets: ``` https://api.nomos.energy/openapi.2026-09-08.gauss.json ``` So the skill is the map and the spec is the source of truth for exact fields. An agent that follows it fetches the spec before constructing a call. > [!NOTE] > > The skill defaults guidance to the latest stable version, `2026-09-08.gauss`. > Earlier versions use different route names for invoices, meter readings, > market partners, and usage; the skill calls out where version matters. ## The skill Save everything below as `nomos-api/SKILL.md`. ````markdown SKILL.md theme={null} --- name: nomos-api description: >- Knowledge of the Nomos energy REST API (api.nomos.energy): base URL, OAuth authentication, versioning, pagination, filtering, error handling, and the full endpoint catalog for the German whitelabel energy platform. Use when building or debugging an integration that calls the Nomos API (subscriptions, leads, plans, customers, invoices, prices, consumption/usage, smart meter orders, grid fee reductions, market partners), or when an agent holds a Nomos OAuth token and needs to know which endpoints its scope (read:* vs write:*) allows. --- # Nomos API Nomos runs a whitelabel energy platform: partners sell electricity under their own brand while Nomos handles onboarding, supplier switching, metering, pricing, billing, and support. This skill describes the public REST API so an agent can call it correctly. The API is REST over HTTPS only (plain HTTP is rejected). All requests share the base URL: ``` https://api.nomos.energy ``` Authoritative request and response schemas live in the OpenAPI spec, not in this file. Fetch the spec for exact field names, types, enums, and which fields are required: ``` https://api.nomos.energy/openapi.2026-09-08.gauss.json ``` Swap the version segment to target another version (see Versioning). A browsable reference is at https://docs.nomos.energy. ## Authentication The API uses OAuth 2.0. An integration holds a `client_id` and `client_secret` (created in the Nomos dashboard) and exchanges them for a short-lived bearer token. Most integrations use the client credentials grant for server-to-server access against their own organization's data: ```bash curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=client_credentials ``` The response carries the token, its lifetime, a refresh token, and the granted scope: ```json { "access_token": "eyJhbGciOiJI...", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "21cc84a3ad98...", "scope": "read:* write:*" } ``` Access tokens last 60 minutes. Cache the token and reuse it; when it expires, exchange the refresh token (`grant_type=refresh_token`, `refresh_token=...`) for a new pair rather than requesting a fresh token every call. Send the token on every request: ```bash curl https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` If the integration acts on behalf of an end customer (for example a home energy manager reading one subscription's prices), use the authorization code grant with PKCE instead. The token usage and refresh model are identical. ## Scopes This is the most important rule for an agent: what you can do is bounded by the token's scope. Two scopes exist today. | Scope | Grants | | --------- | ------------------------------------------------------------ | | `read:*` | Every `GET` request across the API (the read surface below). | | `write:*` | Every mutating request (`POST`, `PATCH`, `PUT`, `DELETE`). | The granted scope is in the `scope` field of the token response, space-delimited. Behavior to enforce: - A token with only `read:*` can call every endpoint in the Read surface. Any call in the Write surface returns `403 FORBIDDEN`. Do not attempt writes with a read-only token; treat them as unavailable. - A token with `read:* write:*` (the default, full access) can call everything. - Scopes are fixed when the key is created and cannot be narrowed per request. To change a key's scope, a new key must be issued and rotated. When you only need to read data (an ETL job, a BI sync, a monitoring agent), request a read-only key so a bug cannot mutate state. ## Versioning The `X-API-Version` header selects the request and response shapes. Each Auth Client has a default version, used when the header is absent; new clients default to the latest stable release. Breaking changes ship only in a new version, so omitting the header keeps an integration stable. Build clients to ignore unrecognized response fields, since additive changes land in existing versions. ```bash curl https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "X-API-Version: 2026-09-08.gauss" ``` Every response echoes the version it was processed with in the `X-API-Version` header. | Version | Status | | ------------------- | ----------------------- | | `2026-09-08.gauss` | Latest stable (default) | | `2026-05-27.curie` | Previous release | | `2026-01-29.edison` | Previous release | | `2025-12-16.batman` | Previous release | | `2025-12-01.chucky` | Initial stable release | Version-specific behavior worth knowing: - `GET /plans/{id}/quote` becomes `POST /plans/{id}/quote` from `2026-09-08.gauss` onwards: same path, the inputs move into a body, and the `GET` returns `NOT_FOUND` pointing at the `POST`. The quote's load-shifting discount is a subcomponent of its own (`subgroup: "optimization"`, a negative amount) from the same version; earlier versions fold it into `energy`. The subcomponents sum to `unit_amount` either way. - Feed-in subscriptions (selling power back to the grid) require `2026-05-27.curie` or later. On earlier versions, leads, subscriptions, prices, and quotes for feed-in plans return `400 BAD_REQUEST`. - Several routes were renamed in `2026-05-27.curie`. On earlier versions use the old names: `GET /subscriptions/{id}/usage` was `GET /subscriptions/{id}/consumption`, `GET /invoices` was `GET /subscriptions/{id}/invoices`, `GET`/`POST /meter-readings` was `GET`/`POST /subscriptions/{id}/meter_readings`, and `GET /market-partners` was `GET /suppliers`. On `curie` the old paths return `NOT_FOUND` pointing at the new ones. - Validation errors are structured from `2026-05-27.curie` onward: a `400` carries an `errors` array with one entry per invalid field, alongside the usual envelope. Earlier versions return only the single `message`. ## Conventions ### Identifiers IDs are prefixed by type: `cus_` (customer), `sub_` (subscription), `pln_` (plan), `lead_` (lead), `inv_` (invoice), `mp_` (market partner), `dom_` (household), `ha_` (asset). Pass them verbatim in paths. ### Pagination Every list endpoint returns the same envelope and uses cursor-based pagination, newest first by `created_at`. ```json { "object": "list", "items": [], "has_more": true, "next_page": "eyJsYXN0X2NyZWF0ZWRfYXQiOi..." } ``` - `limit`: page size, 1 to 100, default 10. - `cursor`: pass the previous response's `next_page`. Omit on the first request. - Stop when `has_more` is `false` (`next_page` is then `null`). - Keep every other query parameter (filters, `limit`) identical across the walk, or the cursor is invalidated. A tampered cursor returns `400 BAD_REQUEST`. From `2026-09-08.gauss`, so does a cursor sent with another `limit` or to another list. Leaving `limit` out keeps the cursor's own. ### Filtering List endpoints filter through bracket-notation query parameters: `filter[][]=`. Multiple filters combine with AND. ```bash curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][eq]=active" \ --data-urlencode "filter[created_at][gte]=2026-01-01T00:00:00Z" ``` Operators by field type, the most a field of that type accepts: - String: `eq`, `ne`, `in`, `is_null`, `contains`, `starts_with`, `ends_with` (the last three are case-insensitive). - Number: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `is_null`. - Date (ISO 8601 with timezone): `gte`, `lte`, `is_null`. - Boolean: `eq`, `is_null`. - Enum: `eq`, `ne`, `in`. `in` takes a comma-separated list. The per-endpoint reference lists each filterable field and the operators it accepts, which can be fewer than its type allows. An unknown field, an operator the field does not accept, a filter sent twice, more than one of `eq`, `ne` and `in` on one field, or malformed syntax returns `400 BAD_REQUEST`. An invalid value returns `422 UNPROCESSABLE_ENTITY`. Both name the parameter. ### Errors Every error uses one envelope with standard HTTP status semantics: ```json { "code": "BAD_REQUEST", "message": "invalid_type in 'customer.email': Required", "requestId": "37a04f8f-e791-491c-81e1-86cd304649bb", "docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST" } ``` Switch on `code`, not on the message. Log `requestId` for support. From `2026-05-27.curie`, validation failures additionally carry an `errors` array with one entry per invalid field; use it to report every invalid field at once instead of parsing `message`. | Status | Code | Meaning and handling | | ------ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | 400 | `BAD_REQUEST` | Validation failed, a business rule rejected the request, or the JSON is unparseable. Fix the request, do not retry. | | 401 | `UNAUTHORIZED` | Missing, invalid, or expired token. Refresh and retry. | | 403 | `FORBIDDEN` | Valid token without permission, often a scope mismatch (write with `read:*`). | | 404 | `NOT_FOUND` | Resource does not exist or is outside your organization. Check the ID. | | 409 | `CONFLICT` | Conflicts with the current state: a duplicate, or a resource already ended or decommissioned. Check the resource before retrying. | | 422 | `UNPROCESSABLE_ENTITY` | Invalid query parameter, such as a filter value or a date, or an implausible meter reading. Read `errors`, do not retry. | | 500 | `INTERNAL_SERVER_ERROR` | Nomos-side error. Retry with backoff; if it persists, contact support. | Retry only `5xx`. Never retry a `4xx` without changing the request. ## Read surface (requires `read:*`) All endpoints below are `GET`. A read-only token can call every one of them. ### Plans - `GET /plans` - list plans (the tariffs configured on your organization). - `GET /plans/{id}` - retrieve a plan. - `GET /plans/{id}/quote` - retrieve a quote for a plan. Prices include VAT. Feed-in quotes require `2026-05-27.curie`. On `2026-09-08.gauss` the `GET` is gone: use `POST /plans/{id}/quote` in the Write surface. ### Leads - `GET /leads` - list leads (pre-filled checkout links you created). - `GET /leads/{id}` - retrieve a lead. ### Subscriptions - `GET /subscriptions` - list subscriptions. Scope to one household with `filter[household][eq]=`. A household is the set of contracts at one metering point, one consumption subscription at a time plus feed-in on the same meter, so a separately metered heat pump is its own household. - `GET /subscriptions/{id}` - retrieve a subscription. A terminated or withdrawn subscription keeps `status` `pending` or `active` until its `end_at`, then turns `ended`. `terminated_at` is what marks the termination: check it, not `status`, to find subscriptions that are ending. ### Customers - `GET /customers` - list customers. - `GET /customers/{id}` - retrieve a customer. ### Households - `GET /households` - list households. A household groups the contracts at one metering point: one consumption subscription at a time, plus the feed-in subscriptions on that same meter. It belongs to one customer and stays the same when they cancel and sign up again. A separately metered device, such as a heat pump with its own meter and consumption subscription, is a household of its own, so one customer at one address can have two. Scope to one customer with `filter[customer][eq]=`. Requires `2026-09-08.gauss`. - `GET /households/{id}` - retrieve a household with its customer and address expanded. Requires `2026-09-08.gauss`. ### Assets - `GET /assets` - list the devices in households, active and decommissioned. Filter by `household`, `external_id` (to find the Nomos ID for your own device ID), `status`, `type` or `parent_inverter`. Requires `2026-09-08.gauss`. - `GET /assets/{id}` - retrieve one asset. Requires `2026-09-08.gauss`. - `GET /asset-snapshots` - the newest snapshot of each asset from the last 24 hours: online state, power, battery charge, car connection, who controls the device. Filter by `household` or `asset` (`eq` or `in`), one of them is required. Requires `2026-09-08.gauss`. - `GET /assets/{id}/schedule` - the quarter-hour plan in force for a steerable asset over Berlin delivery dates `start` and `end` (inclusive), one slot per planned quarter hour with its `mode` and `author`. A quarter hour without a slot runs the device's own logic. Requires `2026-09-08.gauss`. ### Usage - `GET /subscriptions/{id}/usage` - retrieve usage data for a subscription. Usage is electricity drawn from, or fed into, the grid; values are positive in both directions and the direction comes from the plan. Named `/subscriptions/{id}/consumption` before `2026-05-27.curie`. - `GET /meter-readings` - list meter readings. Scope to one subscription with `filter[subscription][eq]=`. Was `GET /subscriptions/{id}/meter_readings` before `2026-05-27.curie`. Smart meters: data becomes available from 4pm the following day, with preliminary values possibly replaced by final values up to the 8th working day of the next month. Analog meters: monthly values from customer or operator readings, with Nomos estimating at month-end until a reading arrives. ### Prices - `GET /subscriptions/{id}/prices` - retrieve the price time series for a subscription to optimize consumption against. Prices include VAT. For feed-in subscriptions this is the per-kWh payout (EPEX day-ahead spot, no grid fees); feed-in requires `2026-05-27.curie`. From `2026-09-08.gauss`, `type=day_ahead_forecast` prices the series on Nomos's day-ahead forecast instead. Forecasts need separate partner enablement and cover yesterday through seven days ahead. ### Invoices - `GET /invoices` - list monthly invoices, including all line items (energy, grid fees, taxes). Scope to one subscription with `filter[subscription][eq]=`. `type: "usage"` bills metered consumption; `type: "prepayment"` charges a fixed advance. From `2026-09-08.gauss`, `type: "exit_summary"` also appears: the closing document of an ended subscription, with corrections to periods already billed (positive total charged, negative paid out). Was `GET /subscriptions/{id}/invoices` before `2026-05-27.curie`. - `GET /invoices/{id}` - retrieve an invoice. - `GET /invoices/{id}/file` - retrieve the invoice PDF. ### Smart meter orders - `GET /meter-orders` - list smart meter orders. - `GET /meter-orders/{id}` - retrieve a smart meter order. ### Grid fee reductions - `GET /grid-fee-reductions` - list §14a EnWG grid fee reductions. Customer-scoped tokens see only their own. - `GET /grid-fee-reductions/{id}` - retrieve a grid fee reduction. ### Market partners - `GET /market-partners` - list German electricity retailers, used to populate a "previous supplier" dropdown in checkout. Filter by name with `filter[name][contains]=`. Was `GET /suppliers` before `2026-05-27.curie`. ### Events - `GET /events/{id}` - retrieve an event by id (the payload referenced by a webhook). ## Write surface (requires `write:*`) A token without `write:*` gets `403 FORBIDDEN`. Before calling, fetch the endpoint's request schema from the OpenAPI spec; bodies are validated against it. All of these mutate state except `POST /plans/{id}/quote` and `POST /plans/{id}/savings` below, which are a `POST` only because their input is a nested object; the required scope follows the HTTP method, not the effect. ### Plans - `POST /plans/{id}/quote` - price a plan for one address and one annual usage. Reads and changes nothing. Takes an optional `optimization_rate` and a `grid_fee_reductions` object carrying the §14a EnWG modules. There is no `meter_type`: a smart meter is priced whenever the optimization rate that applies is above zero, an analog one otherwise. Requires `2026-09-08.gauss`. - `POST /plans/{id}/savings` - estimate what a household saves per year on a plan, broken down into the tariff, the §14a EnWG grid fee reductions, and optimization. Reads and changes nothing. Describe the household in the body by its base `household.usage` plus one object per asset it owns under `assets` (`ev`, `heatpump`, `pv`, `battery`), and optionally a `current_tariff` (`base_fee` in EUR per year, `var_fee` in EUR per kWh) to compare against instead of the market benchmark. Post `usage`, `optimization_rate` and `grid_fee_reductions` from the response back to `POST /plans/{id}/quote` unchanged to price the same household. Requires `2026-09-08.gauss`. ### Subscriptions - `POST /subscriptions` - create a subscription. Consumption plans support meter types, optional VAT ID, flexible start dates, previous-supplier cancellation, and product orders (smart meters, §14a). Feed-in plans require `2026-05-27.curie`, a present smart meter, a mandatory VAT ID for companies, future start dates, and no product orders. From `2026-09-08.gauss`, an unknown field, a body that is not JSON, or a repeated key returns `400`, and `next_possible_start: false` requires `intended_start_date`. - `PATCH /subscriptions/{id}` - update the editable fields of a subscription: `billing_address`, `payment_method`, and `metadata`. Only allow-listed properties are accepted; any other field is ignored. A `billing_address` (all of street, house number, zip, city) replaces the subscription's billing address; the address row is mutated in place, so a row shared across a customer's subscriptions changes everywhere it is referenced. `metadata` keys are merged onto the stored metadata; set a key to `null` to remove it, or send `metadata: null` to clear all keys. An empty body is a no-op. From `2026-09-08.gauss`, a body that is not JSON or repeats a key returns `400`. Requires `2026-05-27.curie`. - `POST /subscriptions/{id}/terminate` - terminate a subscription with a discriminated `reason`: `ORDINARY` (optional `intended_end_at`, otherwise the plan's cancellation period applies), `MOVE_OUT` (`intended_end_at` mandatory), or `WITHDRAWAL`. End timestamps must be exactly midnight Europe/Berlin. Requires `2026-05-27.curie`. ### Customers - `PATCH /customers/{id}` - update a customer's name. Only `first_name` and `last_name` are accepted; both are optional so a request may update just one, and an empty body is a no-op. From `2026-09-08.gauss`, any other field, a body that is not JSON, or a repeated key returns `400`. ### Leads - `POST /leads` - create a lead: a secure, pre-filled checkout link returned in `link`, so a prospect finishes signup with only payment details. Feed-in leads require `2026-05-27.curie`. ### Meter readings - `POST /meter-readings` - submit a customer-reported analog meter reading (`value` in kWh, `timestamp`, and the `subscription` id in the body) for the subscription's active meter. Was `POST /subscriptions/{id}/meter_readings` before `2026-05-27.curie`. ### Load forecasts - `POST /load-forecasts` - transmit a load forecast for a subscription. Submit by 09:00 local time the previous day for the day-ahead auction. Intervals must start at least 15 minutes in the future, be strictly consecutive, and start on a 15-minute boundary. Not available on `2026-09-08.gauss`, where it returns `NOT_FOUND`. ### Assets - `POST /assets` - add one device to a household: `type` (`inverter`, `solar`, `battery`, `wallbox`, `heat_pump`), your own `external_id` (unique in the organization and never reused, a duplicate returns `409` with the existing asset's ID), `is_steerable`, and the type's data in an object named like the type. A solar asset, and a battery behind a hybrid inverter, names that inverter's Nomos ID in `parent_inverter`, so add the inverter first. The household's first asset also creates `household_net` and `household_residual`. Unknown fields inside a type data object return `400`, unknown top-level fields are ignored. Requires `2026-09-08.gauss`. - `PATCH /assets/{id}` - change the fields sent. A field left out stays, `null` clears it, and the type data object and `metadata` merge key by key. `parent_inverter` moves a solar asset or battery, `null` detaches a battery. Requires `2026-09-08.gauss`. - `POST /assets/{id}/decommission` - mark a device as gone. It stays readable, and its `external_id` is never reused. An inverter with active assets behind it returns `409`. Requires `2026-09-08.gauss`. - `POST /asset-snapshots` - send the live state of one household's assets, up to 10,000 snapshots per request, each with the asset's Nomos ID, a `timestamp` with an offset (at most a minute in the future) and `is_online`. Power is positive into the asset and negative out of it. Every valid snapshot is stored, and each invalid one is left out and listed in `rejected` with the path of the field at fault. When no snapshot is valid the request answers `400` listing every problem by its path. Requires `2026-09-08.gauss`. ### Grid fee reductions - `POST /grid-fee-reductions` - create a §14a EnWG grid fee reduction (consumption only, not feed-in). Active subscriptions create with `ordered` status and submit immediately; pending subscriptions create with `intended` and submit on confirmation. From `2026-09-08.gauss` it applies the same module rules as signup `product_orders`: module 3 needs module 1 and a smart meter, module 2 is never combined with module 1 or 3, and the plan must offer the module. A subscription that has ended or has `terminated_at` set takes no new reduction. ### Smart meter orders - `POST /meter-orders` - create a smart meter order for a subscription whose plan supports the smart-meter product. Not applicable to feed-in (a smart meter must already exist before feed-in signup). From `2026-09-08.gauss`, a subscription that has ended or has `terminated_at` set takes no new order. ## Working effectively against this API - Read the granted `scope` from the token response and refuse to attempt out-of-scope calls; do not learn the scope by triggering `403`s. - Pin `X-API-Version` explicitly so behavior does not shift when the default moves. Use `2026-05-27.curie` unless the integration was built against an earlier version's route names. - Fetch the OpenAPI spec for the chosen version to get exact request bodies and response fields before constructing a call. Treat this file as the map, the spec as the schema. - Paginate fully when a list endpoint is the source of truth; do not assume the first page is complete. - On error, branch on `code`, retry only `5xx` with backoff, and surface `requestId` to the user when reporting a failure. ```` # Checkout Source: https://docs.nomos.energy/guides/checkout Take a customer from quote to active subscription using your own UI, with Nomos handling the contract, supplier switch, and billing in the background. A custom checkout takes a customer from quote to active subscription with three calls. Nomos handles the rest: cancelling the old contract, registering with the grid operator, starting billing. Every call runs from your backend. ## How it works **1. Quote** [Calculate a quote](/api-reference/plans/calculate-a-quote) with the plan, zip code, and expected usage. The response includes the working price (`Arbeitspreis`) and basic price (`Grundpreis`), broken down so you can render a transparent estimate. For a layer-by-layer walkthrough of each component, see [Pricing breakdown](/guides/pricing). > [!TIP] > > If you don't yet know the customer's expected usage, ask them how many > people live in the household. 1 person ≈ 1500 kWh, 2 ≈ 2500, 4 ≈ 4500. **2. Resolve the previous supplier** Pick the previous supplier from the directory using [List market partners](/api-reference/market-partners/list-market-partners). Filter by `name` for autocomplete, or fetch the full list for a static dropdown. Store the `id`; you'll send it back at submission. For move-ins, omit `previous_supplier` entirely. **3. Create the subscription** POST to [Create a subscription](/api-reference/subscriptions/create-a-subscription) with `plan`, `customer`, `address`, `meter`, `payment_method`, and `previous_supplier`. To enable smart-meter rollout or §14a EnWG modules in the same call, include a `product_orders` array; see [Smart meters](/guides/order-smart-meters) and [§14a grid fee reductions](/guides/grid-fee-reductions). The response contains the new `subscription.id`; store it for invoices, prices, meter readings, and status changes. ## FAQ > **What's the minimum I need to ship?** > > Quote, supplier search, and the create call. Address validation, > plausibility checks, and IBAN formatting can come from your existing > libraries; everything else, Nomos handles after `subscription.created`. > **How do I know when the supplier switch actually goes through?** > > Two webhooks tell the story. > [`subscription.created`](/webhooks/events/subscription-created) fires > immediately on creation; use it to provision your own user record. > [`subscription.confirmed`](/webhooks/events/subscription-confirmed) fires > once the grid operator accepts the switch, typically 2 to 3 weeks later; use > it for confirmation emails and to unlock portal access. > **What's the difference between a move-in and a supplier switch?** > > A supplier switch (Lieferantenwechsel) replaces an existing contract: pass > the previous supplier's `id` in `previous_supplier`, and Nomos cancels the > old contract and handles the handover with the grid operator. A move-in > (Einzug) is a fresh signup with no prior contract: omit `previous_supplier` > entirely. Switches respect the existing contract's notice period; move-ins > can start as early as the move-in date itself. # Customer Portal Source: https://docs.nomos.energy/guides/customer-portal Surface a customer's contract, invoices, meter readings, and consumption inside your own app, with no Nomos UI involved. If you're running a white-labeled energy product on Nomos, your customers should never see our brand. The same API that powers our hosted portal is available to you: the contract, the invoices, the meter readings, the historical consumption. ## What you'll wire up **1. Read the active subscription** [Retrieve a subscription](/api-reference/subscriptions/retrieve-a-subscription) returns plan, status, address, start and end dates, and projected annual usage. Enough to render a "your contract" card. **2. List invoices** [List invoices](/api-reference/invoices/list-invoices) under the subscription, with [filters](/api-references/filtering) (`status`, `period_start`) and [pagination](/api-references/pagination). Link directly to the hosted PDF rather than re-rendering the document. **3. Submit a meter reading** For analog-meter customers, [Create a meter reading](/api-reference/usage/create-a-meter-reading) accepts a `value` in kWh and a `timestamp`. If the value is implausible, the API rejects it with `UNPROCESSABLE_ENTITY`; show that as a soft hint, not a hard error. **4. Show consumption** [Retrieve usage data](/api-reference/usage/retrieve-usage-data) returns 15-minute intervals (smart meters) or monthly totals (analog). Pair it with [Retrieve a price time series](/api-reference/prices/retrieve-a-subscription-price-time-series) to show "you used X kWh during cheap hours." **5. Keep state fresh** Subscribe to [webhooks](/webhooks/introduction); your portal stays in sync without a single cron job. ## State you'll listen for | Webhook | What changes in the portal | | - | - | | [`subscription.activated`](/webhooks/events/subscription-activated) | Unlock the live-contract view, prices, consumption. | | [`subscription.terminated`](/webhooks/events/subscription-terminated) | Show the offboarding state and end date. | | [`subscription.ended`](/webhooks/events/subscription-ended) | Archive the user. | ## FAQ > **How do I authenticate the customer to my own app?** > > Run your own identity. Map your user record to the Nomos `customer.id` (or > `subscription.id`) and use server-side [Client > Credentials](/api-references/authentication#client-credentials-grant) when > calling Nomos. > **Can the customer download invoice PDFs?** > > Yes. Each invoice has a hosted URL on the response. Link to it; don't proxy > or re-render the document. > **What if the meter reading I receive looks wrong?** > > The API runs plausibility checks against recent values and rejects with > `UNPROCESSABLE_ENTITY` when something looks off. Surface the rejection as > "this number looks off, double-check" rather than a fatal error. > **Should I poll for status changes?** > > No. Drive portal state from [webhooks](/webhooks/introduction). The same > events that change the subscription's `status` trigger your portal's render > path. # Feed-in Source: https://docs.nomos.energy/guides/feed-in Sign up customers who feed solar power into the grid, with Nomos handling grid registration, metering, and monthly credits. A feed-in subscription is the mirror image of a consumption subscription: energy flows from the customer's PV system into the grid, and money flows to the customer. You create it with the same [Create a subscription](/api-reference/subscriptions/create-a-subscription) call you already use for consumption signups; the plan's direction decides which rules apply. After reading this page you can identify feed-in plans, submit a valid feed-in signup, and know what Nomos does after the call returns. > [!NOTE] > > Feed-in plans are available from the `2026-05-27.curie` API version onwards. > On earlier versions they are hidden from the plans endpoints, and requesting a > quote for a feed-in plan returns `400 BAD_REQUEST`. Pin your Auth Client or > request to this version or later to work with feed-in. ## How feed-in differs from consumption * **Money flows the other way.** The customer is credited per kWh fed in, based on EPEX day-ahead spot prices. Credits surface through [List invoices](/api-reference/invoices/list-invoices) like any other billing document. * **There is no supplier switch.** A feed-in signup registers the customer's generation with the grid operator; there is no previous contract to cancel. * **Delivery starts on the first of a month.** Grid operators register feed-in to the start of a month and need about one month of lead time. * **A smart meter must already be installed.** Feed-in quantities are metered per quarter-hour; without a smart meter (iMSys) there is nothing to credit. ## How it works **1. Find a feed-in plan** [List plans](/api-reference/plans/list-plans) and pick one with `type: "feed_in"`. Consumption plans carry `type: "consumption"`. Feed-in plans are configured per organization; ask Nomos support if none appear for yours. **2. Create the subscription** POST to [Create a subscription](/api-reference/subscriptions/create-a-subscription) with the feed-in plan. The shape is the same as a consumption signup, with the rules listed below. ```bash cURL theme={null} curl -X POST https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "plan": "pln_bn1sny3aczwq5jkz8xcf4klf", "customer": { "type": "company", "company_name": "Sonnendach GmbH", "first_name": "Erika", "last_name": "Musterfrau", "email": "erika@sonnendach.example", "vat_id": "DE123456789" }, "address": { "street": "Torstraße", "house_number": "119", "zip": "10115", "city": "Berlin" }, "meter": { "number": "1APA0195124010", "type": "smart", "estimated_usage": 8500 }, "payment_method": { "type": "sepa_debit", "sepa_debit": { "iban": "DE68500105178297336485", "account_holder": "Sonnendach GmbH" } }, "intended_start_date": "2026-08-01", "next_possible_start": false }' ``` The response is the same subscription object as for a consumption signup; store its `id` for invoices, prices, and status changes, exactly as you would for consumption. For feed-in, `estimated_usage` is the expected annual feed-in quantity in kWh, not consumption. > [!TIP] > > Omit `intended_start_date` and set `next_possible_start` to `true` to > start on the earliest possible date. Nomos picks the first of the next > month that satisfies the lead time. **3. Nomos registers the feed-in** Nomos identifies the customer's market location (MaLo) with the grid operator and registers the generation to the start date. No action is needed from you. The subscription behaves like a consumption subscription from here: [Retrieve a subscription](/api-reference/subscriptions/retrieve-a-subscription) returns `status: "pending"` until the start date is reached, then `"active"`. ## Signup rules Requests that break a rule are rejected with `400 BAD_REQUEST` and a message naming the violated rule. | Field | Rule for feed-in plans | | - | - | | `meter.type` | Must be `smart`. A smart meter has to be installed before the signup. | | `customer.vat_id` | Required when `customer.type` is `company`, optional for `customer.type: "person"` (see [How feed-in is taxed](#how-feed-in-is-taxed)). | | `intended_start_date` | Must be the first day of a month, at least one month out. | | `previous_supplier` | Not supported. There is no contract to cancel. | | `product_orders` | Not supported. Smart meter ordering and §14a EnWG only apply to consumption. | ## How feed-in is taxed Feed-in remuneration is taxable revenue, and the rules depend on who operates the system. This is the background for the API's `vat_id` rule. * **Private operators usually charge no VAT.** Most fall under the small business scheme of [§ 19 UStG](https://www.gesetze-im-internet.de/ustg_1980/__19.html) (up to 25,000 EUR previous-year revenue), so their credits are paid out without VAT. If a private customer does not fall under the scheme, pass their `vat_id` at signup and their credits break out VAT on top of the remuneration. * **Companies receive credits that must satisfy invoice rules.** Nomos pays feed-in as a self-billing credit (Gutschrift), and [§ 14 UStG](https://www.gesetze-im-internet.de/ustg_1980/__14.html) requires such a document to carry the supplier's tax identification. To preview the payout a customer will actually be credited, set `is_tax_exempt` in the body of [Calculate a quote](/api-reference/plans/calculate-a-quote): an exempt customer is quoted the net payout, everyone else sees VAT included. Set it to match how the customer signs up (a person you submit without a `vat_id` is exempt, a company or a person with a `vat_id` is not) to keep the preview and the invoices in agreement. > [!NOTE] > > This section summarizes the rules so the API behavior makes sense; it is not > tax advice. Whether a specific operator is exempt depends on their overall > situation, which their tax advisor can assess. ## FAQ > **Can a private person sign up without a VAT ID?** > > Yes. Without a VAT ID, a person's credits are treated as small-business > payouts and show no VAT; with a VAT ID, the credits break out VAT (see [How > feed-in is taxed](#how-feed-in-is-taxed)). Companies are assumed to be > VAT-registered regardless, which is why `vat_id` is required for them. > **How is the credited price determined?** > > Feed-in is credited based on EPEX day-ahead spot prices for the > quarter-hours in which the customer fed in. Use [Retrieve a price time > series](/api-reference/prices/retrieve-a-subscription-price-time-series) to > show customers the prices their feed-in earns. > **Can the customer order a smart meter as part of the signup?** > > No. A feed-in signup requires the smart meter to be in place already, so > `product_orders` of type `smart-meter` are rejected. If the customer doesn't > have one yet, the metering point operator (or a consumption signup with a > smart meter order) has to get them there first. > **Can one customer have both a consumption and a feed-in subscription?** > > Yes, and this is the common case for PV households: one consumption > subscription for what they draw from the grid and one feed-in subscription > for what they export. The two are separate subscriptions, typically on the > same address with different meters or meter registers. # Grid Fee Reductions (§14a EnWG) Source: https://docs.nomos.energy/guides/grid-fee-reductions Quote, order, and track Module 1, 2, and 3 grid fee reductions for customers with controllable consumption devices. [§14a EnWG](https://www.gesetze-im-internet.de/enwg_2005/__14a.html) governs the relationship between a household and its grid operator (Verteilnetzbetreiber, VNB) when that household runs a "controllable consumption device" (steuerbare Verbrauchseinrichtung) over 4.2 kW. Heat pumps, wallboxes, home batteries, and AC units all qualify. Under the BNetzA ruling [BK6-22-300](https://www.bundesnetzagentur.de/enwg14a), every VNB is obliged to throttle these devices to maintain grid stability when needed and, in exchange, has to grant the customer a reduction on their grid fees. ## The two paths The customer chooses one of two paths. ### Module 1, optionally with Module 3 Module 1 is a flat annual deduction on the base grid fee, available to anyone with a registered §14a-eligible device. For a heat pump customer consuming 5,000 kWh/year, it's worth around 120 to 155 EUR/year net by the [BNetzA](https://www.bundesnetzagentur.de/enwg14a) formula `80 EUR + (Standard-AP × 3,750 kWh × 0.2)`. Module 3 stacks on top and adds a time-variable grid fee with three windows (low, standard, peak). It can be worth another 100 to 200 EUR/year if the customer plans high-demand hours around the cheap windows. Module 3 requires an intelligent metering system (iMSys) and can only be ordered together with Module 1. ### Module 2, on its own A 60% reduction on the variable (kWh) grid fee, applied through a separate sub-meter behind the controllable device. Savings scale with consumption: a wallbox doing 4,000 kWh/year typically saves 150 to 250 EUR/year. Module 2 cannot be combined with Module 1 or Module 3. > [!TIP] > > Module 1 + Module 3 is the default path for most setups: it stacks reliably, > needs no extra metering hardware beyond the iMSys, and works for any > §14a-eligible device. ## How time-variable grid fees work (Module 3) A Module 3 schedule splits the day into three windows: * **NT (Niedrigtarif):** the cheap window, typically a few ct/kWh below the standard rate. * **ST (Standardtarif):** the regular grid fee, applied outside NT and HT hours. * **HT (Hochtarif):** the expensive window, typically a few ct/kWh above the standard rate. Each VNB publishes its own windows and price spread; schedules are revised at least annually. **Example: Netze BW, 2025/26** ([source](https://www.netze-bw.de/neuregelung-14a-enwg)): | | NT | ST | HT | | - | - | - | - | | Time | 10:00–14:00 | rest of the day | 17:00–22:00 | | Price | -7 ct/kWh | baseline | +7 ct/kWh | A customer who shifts an EV charge from 18:00 to 12:00 saves around 14 ct/kWh on grid fees. ## How to order **1. Enable the modules on your plan** The plan needs §14a enabled with the modules you want to sell. Ask Nomos support to enable them. The modules apply to consumption plans only: feed-in subscriptions pay no grid fees, so §14a requests on them are rejected. Module 3 additionally requires the customer's meter to be a smart meter (iMSys), see [Smart meters](/guides/order-smart-meters). **2. Show the reduction in the quote** Set `14a_module_1` to `true` in `grid_fee_reductions` when you [Calculate a quote](/api-reference/plans/calculate-a-quote), and the response includes a negative line item for the pauschale Netzentgeltreduktion in the `base` component. For Module 2, set `14a_module_2` instead: the quote drops the base grid fee and prices the variable grid fee at the reduced rate. The [hosted checkout](/guides/hosted-checkout) renders this automatically. **3. Order at checkout, or after the subscription exists** During checkout, include a `product_orders` entry of `type: "14a_enwg"` with the modules flagged on [Create a subscription](/api-reference/subscriptions/create-a-subscription). For an existing subscription, call [Create a grid fee reduction](/api-reference/grid-fee-reductions/create-a-grid-fee-reduction) with the subscription ID and `type` (e.g. `enwg-14a-module-3`) in the body. **4. Track status** Use [List grid fee reductions](/api-reference/grid-fee-reductions/list-grid-fee-reductions) with a status filter such as `filter[status][eq]=rejected` or `filter[status][in]=intended,ordered` to monitor a cohort, or [Retrieve a grid fee reduction](/api-reference/grid-fee-reductions/retrieve-a-grid-fee-reduction) for a single one. > [!NOTE] > > Module 3 is quoted together with Module 1: set `14a_module_3` and > `14a_module_1`, and the quote prices the grid line on the grid operator's low, > standard and high windows, blended over the share of the year the schedule is > in effect. The blended rate can exceed the static one, so the grid line can go > up. From API version `2026-09-08.gauss`, signup `product_orders` and [Create a grid fee reduction](/api-reference/grid-fee-reductions/create-a-grid-fee-reduction) apply the same rules, and refuse a request with `400` and one of these codes: * `missing_module_1`: Module 3 without Module 1 in the same signup or active on the subscription. * `missing_smart_meter`: Module 3 on a subscription without a smart meter. * `incompatible_grid_reduction`: Module 2 together with Module 1 or Module 3. * `duplicate_grid_reduction`: a module that is already active, or requested twice. * `unsupported_product`: a module the plan does not offer. Parallel requests for one subscription are checked one after the other, so only the first of two conflicting orders succeeds. Behind the scenes Nomos creates one `grid_fee_reduction` per requested module and sends an EDIFACT order to the VNB once the subscription is confirmed. ## Status lifecycle | Status | Meaning | | - | - | | `intended` | Order has been recorded but the subscription isn't confirmed yet. No EDIFACT message has been sent. | | `ordered` | EDIFACT order has been sent to the VNB. Awaiting their reply. | | `activated` | The VNB confirmed the reduction. Billing applies it from `valid_from`, which can still be in the future. | | `ended` | The reduction has stopped (subscription ended, or the customer switched modules). | | `rejected` | The VNB declined the order. Inspect the reason, fix the underlying cause, then re-order. | ## Clearing rejections Rejections are part of normal operation, not an exception. For Module 1, the most common cause is that the controllable consumption device hasn't been registered with the VNB yet. The customer (or their installer) registers the device through the VNB's portal; once that's done, you retrigger the order. You can drive clearing through the API or the [dashboard](https://dashboard.nomos.energy). The dashboard view also shows the rejection reason returned by the VNB and lets you start a clearing conversation directly. > [!WARNING] > > Don't loop on `POST /grid-fee-reductions` to "force" a reorder while one is > already `ordered`. The API blocks duplicates with a `400` carrying the error > code [`duplicate_grid_reduction`](/api-references/errors). ## FAQ > **Can I add a module after the customer is live?** > > Yes. Customers often install a heat pump or wallbox months after switching > supplier. Call [Create a grid fee > reduction](/api-reference/grid-fee-reductions/create-a-grid-fee-reduction) > against the existing subscription. > **Can I re-order after a rejection?** > > Yes. The endpoint refuses a new order only if there's an active (`intended`, > `ordered`, or `activated`) reduction of the same type for the same > subscription. Once the previous one is `rejected` or `ended`, you can > re-order. > **Are there webhooks for grid fee reductions?** > > Coming soon. Until then, poll the list endpoint with a status filter > (`filter[status][eq]=...`) or react to > [`subscription.activated`](/webhooks/events/subscription-activated) to know > when an order is eligible to ship. > **Can the customer cancel a reduction?** > > Module changes are usually triggered by switching devices or moving to a > different VNB. The customer (or your support team) reaches out; the > underlying mechanism is the same `POST /grid-fee-reductions` flow plus an > end on the previous record. # Checkout Source: https://docs.nomos.energy/guides/hosted-checkout Your brand, your Checkout. ## We built a checkout so you don't have to Launch a branded, conversion-optimized signup for the German energy market. Our hosted checkout handles address validation, supplier search, IBAN, plausibility checks, and accessibility. Customers land on a per-plan subdomain derived from `plans.slug`, fill out the form, and get redirected back to you once Nomos creates the subscription. ``` https://{plan.slug}.checkout.energy/ ``` ![Hosted checkout page with plan summary on the left and signup form on the right](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/hosted-checkout.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=97af2d5a410b5c674d58c9dcba672553) Example: a plan with slug lumio is reachable at lumio.checkout.energy, themed to your organization ## Pre-fill query parameters Pass through anything you already know about the customer and the form arrives pre-filled. | Param | Type | What it does | | - | - | - | | `zip` | string | German postal code. Drives the price quote and unlocks the rest of the form. | | `usage` | integer | Annual electricity usage in kWh. `2500` is a reasonable default for a 2-person household. | | `id` | string | A [lead](/guides/leads) ID (`lead_…`). Pre-fills name, email, address, and IBAN from the lead record. | | `metadata.` | string | Arbitrary key/value pairs persisted on the resulting subscription's `metadata`. See [Attach metadata](#attach-metadata). | | `metadata.email` | string | Email of the rep or partner credited for the conversion. Persisted as `credited_to` on the subscription. | **Fresh prospect** `https://lumio.checkout.energy/?zip=10115&usage=3500` **Existing lead** `https://lumio.checkout.energy/?id=lead_a8n8ol7yd4h0wohx824f0bui` **With attribution** `https://lumio.checkout.energy/?zip=10115&metadata.campaign=spring-2026` ## Attach metadata Anything you pass as metadata on the checkout link is stored on the subscription's `metadata` once the customer submits the form. Use it to tie the signup back to your own records: a user ID, a campaign, an installer, a referral code. There are two ways to pass it, and you can combine them. **Dotted params** Add one `metadata.` param per value. Values arrive as strings. ``` https://lumio.checkout.energy/?zip=10115&metadata.user_id=usr_1234&metadata.utm_campaign=spring-2026 ``` **JSON param** Pass a URL-encoded JSON object as `metadata`. Use this for numbers, booleans, arrays, or nested objects. ``` https://lumio.checkout.energy/?zip=10115&metadata=%7B%22user_id%22%3A%22usr_1234%22%2C%22referral%22%3A%7B%22code%22%3A%22FRIEND10%22%7D%7D ``` Decoded, the `metadata` param is `{"user_id":"usr_1234","referral":{"code":"FRIEND10"}}`. The dotted link above produces a subscription with this `metadata`: ```json theme={null} { "user_id": "usr_1234", "utm_campaign": "spring-2026" } ``` When the same key is set more than once, the more specific source wins: 1. Metadata on the [lead](/guides/leads) referenced by `id`. 2. Dotted `metadata.` params. 3. The JSON `metadata` param. Metadata survives the landing page: if the link has no `zip` or `id`, the customer first enters their postal code on the start page, and the metadata carries over to the form. Webhook payloads carry IDs only, so read it back with [Retrieve a subscription](/api-reference/subscriptions/retrieve-a-subscription) after [`subscription.created`](/webhooks/events/subscription-created) fires. > [!NOTE] > > `metadata.email` is reserved for attribution. Besides being stored in > `metadata`, it sets `credited_to` on the subscription to the rep or partner > who brought in the customer. > [!WARNING] > > Metadata is visible in the URL and can be edited by the customer before > submitting. Don't put secrets in it, and don't trust it for anything that > grants money or access without checking it on your side. ## Redirect after submission By default, Nomos shows a branded confirmation page once the form is submitted. ![Confirmation screen reading 'Erfolgreich abgeschlossen' with a three-step list of what happens next](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/hosted-checkout-confirmation.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=447d605b7fe7d7f484751006be1ec043) Default confirmation page, themed to your organization Three URLs on the plan control where the customer can navigate. Set them in the plan settings in the [dashboard](https://dashboard.nomos.energy/products). | Setting | When it applies | Default | | - | - | - | | `redirect_url` | After submission, instead of the confirmation page | The confirmation page above | | `referrer_url` | The back button and logo in the checkout form | The browser history, or `/start` | | `confirmation_back_url` | The back link on the confirmation page | `referrer_url` | With `redirect_url` set, the customer lands on your page with the subscription ID appended, for example `https://example.com/thanks?subscription=sub_mi4f0oda6x9m7gcsvjk0ole1`, and never sees the confirmation page. `confirmation_back_url` then has no effect. ## React on your backend Subscriptions originating from hosted checkout are tagged with `source: "checkout"`, so you can distinguish them when processing [webhooks](/webhooks/introduction). Two events fire over the lifetime of a signup, separated in time: * [`subscription.created`](/webhooks/events/subscription-created) immediately, when the form is submitted. Use it to provision your own user record. * [`subscription.confirmed`](/webhooks/events/subscription-confirmed) later, once the grid operator has accepted the switch. Use it for confirmation emails and to unlock portal access. The supply start date isn't in the payload: read `start_at` with [Retrieve a subscription](/api-reference/subscriptions/retrieve-a-subscription) after each `subscription.confirmed`, since the event fires again when the date changes. Not every signup reaches supply: * If the grid operator or previous supplier rejects the switch, Nomos handles the rejection and the subscription stays pending. No event fires until the switch is confirmed. * If the customer withdraws before supply starts, [`subscription.terminated`](/webhooks/events/subscription-terminated) fires immediately, followed by [`subscription.ended`](/webhooks/events/subscription-ended) once the end date has passed. ## FAQ > **Can I use my own domain instead of checkout.energy?** > > Not yet. Plans live on `{plan.slug}.checkout.energy`. The subdomain reads > your plan slug, applies your branding, and serves the form. > **Can I customize the form fields?** > > The form is fixed: address, supplier, household size, IBAN, marketing > consent. To collect anything else, use [Build your own](/guides/checkout) > where you control the entire UI. > **What languages are supported?** > > Currently only German (default) in a formal (Sie) and informal (Du) setting. # Customer Portal Source: https://docs.nomos.energy/guides/hosted-customer-portal Designed for self-service. ## We built a customer portal so you don't have to Launch a self-service portal for invoices, prices, consumption, and account management without writing a frontend. The portal is themed to your brand, signs customers in with a one-time email code, and ships every new Nomos feature automatically. ``` https://{plan.slug}.customerportal.energy/ ``` ![Hosted customer portal dashboard with consumption chart, invoices, and account panels](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/hosted-customer-portal.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=5db0852544eaba6c3c900a2dff5c3fab) Example: a plan with slug lumio is reachable at lumio.customerportal.energy, themed to your organization ## What customers get Every section is a real route. There is no feature flag to enable any of it. * **Dashboard.** Today's and tomorrow's dynamic prices, current consumption, contract status, the next bill at a glance. * **Invoices.** A paginated list of every invoice on the subscription. Each opens to a detail view with a consumption breakdown and a downloadable PDF. * **Consumption.** Daily, weekly, and monthly meter data charted against price. Customers without a smart meter can submit a manual reading from the same screen. * **Tariff overview.** Working price, basic price, grid fees, contract dates, cancellation, meter swap. * **Account.** Personal details, payment method (SEPA / IBAN), delivery and billing addresses. * **Product orders.** Smart-meter rollout status and any add-on products the customer has ordered. * **Help.** A localized help center wired to your support channel. ## Sign-in The default is a one-time code by email. To drop an already-authenticated customer straight in from your own app, use [portal single sign-on](/guides/magic-link). **1. Customer visits the portal** They open `https://{plan.slug}.customerportal.energy/login`. **2. Enters their email** Nomos checks the email against the customers on your plan and sends a six-digit code. **3. Enters the code** They're signed in. The session persists; no password is involved. ## FAQ > **Can I deep-link to a specific page?** > > Yes. Append the path to the portal URL (e.g. `https://{plan.slug} > .customerportal.energy/invoices`). The customer is prompted to sign in if > needed and lands on the deep-linked page after. [Portal single > sign-on](/guides/magic-link) accepts a `next` parameter for the same outcome > when minting from your backend. > **Can customers manage multiple subscriptions in one portal?** > > Yes. If a customer has more than one active subscription, the portal shows a > switcher in the header. > **Can I A/B test or modify portal copy?** > > Not in the hosted portal. If you need bespoke copy or layout, [build your > own](/guides/customer-portal) against the API. # Leads & Checkout Links Source: https://docs.nomos.energy/guides/leads Designed for one-tap signup. ## Pre-fill the checkout with what you already know Create a lead with everything you know about the prospect, and the response includes a pre-filled checkout link. Send it however you want (email, SMS, in-app, QR code) and the customer confirms instead of typing. Every field you set on the lead is one field they don't see, and the link stays valid until the lead converts. ``` https://{plan.slug}.checkout.energy/?id={lead.id} ``` ![Hosted checkout opened from a lead link, with name, address, previous supplier, meter, and IBAN already filled in](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/leads.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=287c70f93e08ca2e5e0460acb14f797b) Example: opening a lead link drops the customer on the checkout with their data pre-filled ## What goes on a lead Create leads via the [dashboard](https://dashboard.nomos.energy/leads) or API ([Create a lead](/api-reference/leads/create-a-lead)). The minimum useful lead carries `plan`, an `address` with at least a `zip`, and a `meter.estimated_usage`. Add `customer`, `payment_method`, and `previous_supplier` as you collect them; every field you set is one field the customer doesn't see. `meter.estimated_usage` is the yearly consumption in kWh, at least 100. It sets the price the customer sees first, and once they sign up it becomes the starting consumption forecast, which sets the monthly prepayment on prepaid plans. If you don't know it, send a typical value such as `2500`: the customer can correct it in the form, which also offers an estimate from their household size. ## Attribution Set `created_by` when you create the lead. It's the email of the rep or agent credited for the conversion. Combined with `metadata` (UTMs, campaign IDs, internal user IDs), you have everything needed to attribute every signup back to the prospecting flow that produced it. When the lead converts, a [`subscription.created`](/webhooks/events/subscription-created) webhook fires with the lead ID in the event context. The lead also carries `subscription` and `subscribed_at`. Poll [Retrieve a lead](/api-reference/leads/retrieve-a-lead) if that fits your stack better than webhooks. ## FAQ > **How long does the link stay valid?** > > Indefinitely, as long as the lead hasn't been converted. Send follow-up > reminders without re-creating the lead. > **Can the customer edit pre-filled data?** > > Yes. Every field is editable in the form; the lead provides defaults, not a > lock. > **What if I don't have a previous supplier yet?** > > Omit `previous_supplier`. The customer picks one in the form. Move-ins don't > need a previous supplier at all. > **Can multiple subscriptions come from one lead?** > > No. A lead converts to exactly one subscription. Create a new lead for a > second product. > **Can I update or delete a lead?** > > Not through the API: leads are create-only. Edit or delete them in the > [dashboard](https://dashboard.nomos.energy/leads), or create a new lead when > the data changes and send that link instead. > **What happens if I create two leads for the same person?** > > Nomos doesn't deduplicate leads, so both exist and both links work. Only the > lead the customer signs up through converts. # Load Shifting and Optimization Source: https://docs.nomos.energy/guides/load-shifting Pull a customer's 15-minute electricity prices, shift their flexible loads into the cheap intervals, and verify the result against actual consumption. A Home Energy Management System (HEMS) decides when flexible loads (heat pumps, EV chargers, batteries, thermal storage) should run. To do that well, it needs the customer's actual electricity price, interval by interval. With a Nomos dynamic plan that's straightforward: pull prices, schedule loads against the cheap intervals, and after the fact compare against the realized consumption. ## How it works **1. Find the customer's active subscription** [List subscriptions](/api-reference/subscriptions/list-subscriptions) and pick the one with `status: "active"`. If none is active yet, subscribe to [`subscription.activated`](/webhooks/events/subscription-activated) and show a "we're still setting up your contract" state in the meantime. **2. Pull the day-ahead price time series** [Retrieve a price time series](/api-reference/prices/retrieve-a-subscription-price-time-series) returns 15-minute intervals with `timestamp`, `amount` (all-in ct/kWh, incl. taxes, levies, grid fees), and a `components` breakdown. **3. Schedule loads against the cheap intervals** Pick the cheapest N intervals that fit your load's run time. The algorithm below is the simplest possible version. **4. Verify against actual consumption** [Retrieve usage data](/api-reference/usage/retrieve-usage-data) returns 15-minute usage in kWh. Aligned with the price intervals, `usage * amount` gives you cost per interval. > [!NOTE] > > Intervals are 15 minutes long. Since the EPEX day-ahead auction switched to > quarter-hourly products on 1 October 2025, that's the native resolution of the > underlying market and what we expose. ## Picking the cheapest window The simplest version: sort intervals ascending by price, take the cheapest N. ```ts theme={null} function pickChargingWindow(prices, requiredHours) { const sorted = [...prices].sort((a, b) => a.amount - b.amount); const slotsNeeded = requiredHours * 4; // 15-min intervals return sorted.slice(0, slotsNeeded); } ``` A real HEMS layers on its own constraints: battery cycle caps, comfort bounds for heat pumps, grid-export revenues, contiguous-window requirements, and so on. Nomos doesn't take a position on any of that; we just give you accurate, customer-specific prices to schedule against. ## When data is available * **Tomorrow's prices.** Available in one batch from \~13:00 CET, within minutes of EPEX publishing at \~12:45 CET, and as late as \~14:20 CET when the auction is delayed. Tolerate "tomorrow's prices not yet available" in your UI; don't render zero-cent intervals as cheap windows. * **Smart-meter consumption.** Appears from \~16:00 on D+1, once the metering operator forwards the previous day's values. Preliminary readings may be replaced by final ones up to the 8th working day of the following month. Don't expect same-day verification. * **Auction failures.** The price endpoint omits intervals that haven't cleared. Treat missing intervals as "no schedule decision yet" rather than zero. # Portal Single Sign-On Source: https://docs.nomos.energy/guides/magic-link Designed to skip the second sign-in. ## Drop authenticated customers straight into the portal Once a customer is signed in to your own app, hand them off to the hosted Nomos portal as a fully logged-in user. Your backend calls [Create a magic link](/api-reference/authentication/create-a-magic-link-customer-portal) with the customer's `id`, gets back a short-lived URL, and redirects the customer there. The portal verifies the token, creates a session, and reuses it on subsequent visits until the session expires. ![Customer's account hub in the hosted portal with quick links to data, invoices, orders, tariff, and help](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/magic-link.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=b8756e2bf5a56ff6999be18ec7cae56e) Customer clicks an entry point in your app and lands signed in to the portal ## Where to mint and where to redirect The endpoint is server-only. The resulting URL is safe to send to the browser; the access token used to mint it is not. The simplest pattern: a handler in your app mints the link and redirects. ```ts theme={null} app.get("/portal", requireAuth, async (req, res) => { const link = await mintNomosMagicLink(req.user.nomosCustomerId); res.redirect(link); }); ``` An "Open energy account" button becomes a plain link to `/portal`; every click mints a fresh, single-use URL. In a mobile app, mint from your backend and open in an in-app webview (`SFSafariViewController` on iOS, `Custom Tabs` on Android, a `WebView` in React Native). The customer stays inside your app shell while the portal renders inside. > [!NOTE] > > If the customer exists on Nomos but has no subscription yet, the response URL > points at the hosted checkout for your plan (`/start`) instead. The same call > always lands the customer in the right place. ## FAQ > **Where do I get the customer's Nomos ID?** > > Fetch the full record of the subscription and use `subscription.customer`. > Use the [`subscription.created`](/webhooks/events/subscription-created) > webhook when a subscription is first created to get the subscription id. > Persist it on your user record. > **Can I deep-link past `/overview`?** > > Yes. The URL accepts a `next` path (e.g. `/invoices/inv_abc`); the portal > redirects there after sign-in. > **What happens if the customer is signed out elsewhere?** > > Magic-link sessions are independent of any other Nomos sessions. Signing out > on one device or expiring a session won't affect a separate magic-link > session minted from your backend. # Smart Meter Installation Partnerships Source: https://docs.nomos.energy/guides/order-smart-meters Order smart meters (iMSys) for your customers on a predictable timeline through Nomos's wMSB partnerships, the precondition for dynamic pricing, §14a savings, and HEMS integrations. A smart meter (an *intelligentes Messsystem*, or iMSys) is the precondition for almost every product you can offer beyond a flat-rate tariff. Getting one is the bottleneck: the grundzuständige Messstellenbetreiber (gMSB) is obliged to roll out to the §29 MsbG mandatory cohort first; for everyone else, going through a wettbewerblicher Messstellenbetreiber (wMSB) is the only path with a predictable timeline. Through Nomos's wMSB partnerships, your customers (mandatory cohort or not) reach an installed iMSys at a target lead time of around eight weeks. ## What a smart meter unlocks * **Dynamic pricing.** The customer pays the actual hourly wholesale price they consumed at, not a smoothed annual average. * **§14a EnWG savings.** Heat pumps and wallboxes can claim Module 1, 2, or 3. The VNB only meters and dims a controllable load if there's an iMSys behind it. * **HEMS and EV-charger optimisation.** Live 15-minute consumption data instead of monthly estimates. * **Hands-off readings.** The meter reports automatically; your ops team stops chasing customers for annual self-readings. ## How to order **1. Enable the smart-meter product on your plan** Ask Nomos support to enable a smart-meter product on the plan you'll be selling. **2. Order at checkout, or after the subscription exists** During checkout, include `{ type: "smart-meter" }` in the `product_orders` array on [Create a subscription](/api-reference/subscriptions/create-a-subscription). For an existing subscription, call [Create a smart meter order](/api-reference/smart-meter-orders/create-a-smart-meter-order) with the subscription ID in the body. **3. Track status** Poll [List smart meter orders](/api-reference/smart-meter-orders/list-smart-meter-orders) or [Retrieve a smart meter order](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order) until the order reaches `activated`. Daily polling is plenty; meter orders move on the timescale of weeks. > [!TIP] > > A heat-pump customer typically wants both: a smart meter to enable dynamic > billing, and §14a Module 1 for the reduced grid fee. You can include both > entries in a single `product_orders` array. See [§14a grid fee > reductions](/guides/grid-fee-reductions). Customers can also place the order from the [hosted customer portal](/guides/hosted-customer-portal), and your team can place one from the [dashboard](https://dashboard.nomos.energy). Both call the same endpoint under the hood. ## Status lifecycle The happy path is `created → placed → check_submitted → check_reviewed → scheduled → installed → activated`. Once the order reaches `activated`, dynamic prices are real and you can start showing them to the customer. * `created`: Order accepted; metering details are being collected before the order goes to the wMSB. * `placed`: Order is with the wMSB partner. * `check_submitted`: The smart meter check for the location has been submitted. * `check_reviewed`: The wMSB has reviewed the check and confirmed they will install. * `scheduled`: An installation appointment is set; `appointment_at` carries the date. * `installed`: The meter is in place; `installed_at` carries the timestamp. * `activated`: The meter is live and reporting; dynamic pricing and automatic readings are now possible. * `cancelled`: Terminal. `cancelled_reason` tells you whether a smart meter was already present (`pre_existing`) or the order was cancelled on request (`customer_request`). A temporarily blocked order keeps reporting the milestone it is parked on; `blocked_at` and `blocked_reason` explain why it is not progressing. ## FAQ > **How long does installation take?** > > Around eight weeks end to end through a Nomos wMSB partner, though it > depends on the customer's region, meter access, and the wMSB's local > capacity. > **Can I retry a cancelled order?** > > Not directly. A subscription can have at most one meter order ever; once > `cancelled`, a second `POST /meter-orders` returns `409 CONFLICT`. Email > [support@nomos.energy](mailto:support@nomos.energy) to retry. > **Are there webhooks for meter orders?** > > See [Smart Meter Order webhooks](/webhooks/events/meter_order-created) for > the full set of events emitted as an order moves through its lifecycle. > Daily polling on the list endpoint remains fine as a fallback; meter orders > move on the timescale of weeks. > **What if the customer already has a smart meter?** > > No new installation is needed. The order reports `cancelled` with > `cancelled_reason` set to `pre_existing`, and moves to `activated` once the > existing meter is registered to the new contract. # Pricing Breakdown Source: https://docs.nomos.energy/guides/pricing Render checkout quote breakdowns and customer-portal price displays for a German dynamic tariff, layer by layer. ## The shape of a German electricity bill Every household tariff in Germany is built from two charges: | Charge | What it is | Unit | | - | - | - | | Base price (Grundpreis) | Fixed monthly charges | €/year | | Variable price (Arbeitspreis) | Per-kWh charge that scales with consumption | ct/kWh | On a Nomos dynamic plan the variable price moves with EPEX spot prices every 15 minutes; the base price is steady. ## What's inside the base price Annual charges, billed monthly. Surfaced on [Calculate a quote](/api-reference/plans/calculate-a-quote) as the component with `group: "base"`. | Layer | Set by | Variable per | | - | - | - | | Grundgebühr (basic fee) | Your Nomos plan | Plan, fixed in contract | | Local grid fee (fixed component) | The customer's DSO | DSO, annually | | Metering charges | Metering operator | Meter type (analog vs. iMSys) | | §14a Module 1 deduction (optional) | Federal, applied by DSO | Active only with §14a Module 1 | For Module 1 ordering, see [§14a grid fee reductions](/guides/grid-fee-reductions). ## What's inside the variable price Per 15-minute interval, summed in this order. Per-customer interval prices for an active subscription are on [Retrieve a price time series](/api-reference/prices/retrieve-a-subscription-price-time-series), with components broken out as `electricity`, `grid`, and `levies`. | Layer | Set by | Variable per | | - | - | - | | EPEX spot price (day-ahead) | EPEX SPOT auction | 15 minutes | | Procurement margin | Your Nomos plan | Plan, fixed in contract | | Local grid fee | The customer's DSO | DSO, annually + time-of-use | | Concession fee (Konzessionsabgabe) | Federal, scaled by city size | Municipality population | | Statutory levies (KWKG, §19, offshore) | Federal transmission operators | Calendar year | | Electricity tax (Stromsteuer) | Federal government | Calendar year | Prices returned by the API are gross; VAT (19%) is already included in every component. ## Components in detail ### EPEX spot price (day-ahead) The day-ahead auction at [EPEX SPOT](https://www.epexspot.com/en) sets a single clearing price for every 15-minute interval of tomorrow. Bids close at 12:00 CET and EPEX publishes results from \~12:45 CET, by \~14:20 CET at the latest. Nomos imports them within minutes of publication, so the API normally serves tomorrow's prices from \~13:00 CET, and as late as \~14:20 CET when the auction is delayed. Tomorrow's 96 quarter-hour prices appear in one batch and are final for billing once published; there are no revisions. Auctions occasionally fail or are delayed. The price endpoint omits intervals that haven't cleared yet, so build your UI to tolerate "tomorrow's prices not yet available" and avoid placeholders that look like zero-cent intervals. ### Local grid fee (Netzentgelt) The one component that's genuinely local. Every customer's grid fee depends on which distribution system operator (Verteilnetzbetreiber, DSO) runs the wires to their meter. Germany has roughly 850 DSOs, each setting their own annual tariff under § 20 EnWG and the StromNEV. Two customers on the same Nomos plan in different cities see different grid fees. Grid fees vary widely. A rural DSO might charge \~12 ct/kWh; an urban DSO might be closer to 6 ct/kWh. Often a larger slice of the bill than the EPEX spot price itself. ### Time-variable rates under §14a Module 3 Customers with a controllable consumption device (heat pumps, wallboxes, home batteries) registered under §14a EnWG can opt into Module 3, which splits the grid fee into three time windows (high, standard, low). Each DSO publishes its own schedule, and for each 15-minute interval the customer is billed one of the three rates. The price endpoint handles the lookup per subscription. Module 3 requires a smart meter (iMSys), and not every DSO has shipped a usable schedule yet; where a schedule is missing, the endpoint falls back to the static grid fee. For ordering, see [§14a grid fee reductions](/guides/grid-fee-reductions). ### Statutory levies and electricity tax KWKG (cogeneration), §19 (industrial relief), and the offshore levy fund federal energy programs. They're set annually per kWh by the four transmission system operators. The electricity tax (Stromsteuer) is a flat federal rate. All flow through unchanged from regulator to bill. # Savings calculator methodology Source: https://docs.nomos.energy/guides/savings-calculator Every value, assumption and source behind the Nomos savings estimate, so you can explain and defend the number your customers see. The savings calculator estimates what a household saves per year on a Nomos dynamic plan compared to a typical fixed-price tariff. This page lists every figure the calculation rests on, where each one comes from, and how they combine, so you can answer a customer's "where does this number come from?" without guessing. The customer-facing "Erfahre mehr" disclosure in checkout shows the same figures. The tables below are generated from the calculator's source code, so they always match what the calculator actually computes. ## How the estimate is built The saving is the sum of five rows in three buckets. Each bucket only credits what the one before it left off, so the rows never double-count. | Bucket | Row | What it compares | | - | - | - | | 1. Better plan conditions | Base fee | The plan's base fee against the market-average supplier base fee | | 1. Better plan conditions | Energy price | The plan's unoptimized energy price (spot plus margin) against the market-average supplier energy price | | 2. §14a EnWG grid fee reduction | Module 1 | The flat yearly grid fee deduction for a controllable device | | 2. §14a EnWG grid fee reduction | Module 3 | The time-variable grid fee against the operator's static grid fee | | 3. Optimization | Load shifting | Shifting consumption into cheap hours, plus battery arbitrage | All amounts are gross, including 19 % VAT. ### What is left out on purpose Grid fees, metering charges, levies and taxes are the same whoever supplies the electricity. They appear on both sides of the comparison and cancel, so Bucket 1 compares supplier components only. Counting them would inflate both bills without changing the difference. Feed-in revenue is not part of the estimate. For households with PV the result is therefore conservative. ### Bucket 1: better plan conditions When the customer does not enter their current tariff, the calculator compares against the market benchmark below. The result is marked as an estimate. When the customer enters their current tariff, the base fee is taken as entered (without grid and metering base fee), and the regional grid fee, levies and taxes are subtracted from their all-in energy price before comparing. ```text theme={null} base fee row = comparison base fee - plan base fee energy price row = (comparison ct/kWh - (spot ct/kWh + plan margin ct/kWh)) x consumption / 100 ``` The spot price and plan margin are the ones the plan's own quote is priced on for the customer's postcode. ### Bucket 2: §14a EnWG A household qualifies with at least one controllable device: an EV wallbox, a heat pump, or a battery above the power threshold listed under [defaults and thresholds](#defaults-and-thresholds). * **Module 1** is read directly from the plan's quote for the customer's grid operator. It is a fact about their bill, not an estimate. * **Module 3** compares the operator's static grid fee against a blend of the operator's own low, standard and high window rates, weighted by the window shares listed below. Operators only have to apply time-variable rates in some quarters, so the saving is scaled by the share of the year the schedule is active. ```text theme={null} module 3 row = (static rate - (low share x low rate + standard share x standard rate + high share x high rate)) x consumption / 100 x active share of the year ``` A row is zero when the household does not qualify, declines §14a, the plan does not offer the module, or the grid operator publishes no Module 3 schedule. The calculator never substitutes a national average for a missing schedule. ### Bucket 3: optimization Each part of the household's consumption gets its own reduction on the spot share of the price. An EV can move almost all of its charging into cheap hours, base load hardly any. The household's optimization rate is the consumption-weighted average of those reductions. ```text theme={null} optimization rate = 1 - (base kWh x (1 - base reduction) + EV kWh x (1 - EV reduction) + heat pump kWh x (1 - heat pump reduction)) / total kWh load shifting row = spot ct/kWh x optimization rate x consumption / 100 + battery arbitrage ``` The plan margin is not reduced. A battery adds a fixed yearly amount instead of a percentage, because its earnings scale with cycles, not consumption. A battery behind a PV system adds nothing: it serves self-consumption, and charging it from the grid would put the EEG feed-in remuneration at risk. ### Consumption The customer enters base load (or picks a household size), plus each asset's consumption. EV consumption is distance x consumption per 100 km x home charging share. With PV, every component is scaled down by the self-sufficiency share, so the mix and with it the optimization rate stay the same. ## Values and sources > [!NOTE] > > Partners integrating the API get the same calculation from `POST /plans/{id} > /savings`, available from API version `2026-09-08.gauss`. Its response carries > the five rows, the optimization rate and the §14a eligibility described above. Figures as of **2026-08-26**. Every saving the calculator returns is stamped with this version. ### Market benchmark | Parameter | Value | Source | As of | Rationale shown to customers | | - | - | - | - | - | | Market-average supplier base fee | 78 EUR/year (gross) | CHECK24-Stichprobe Jul 2026 (via Rabot „Strompreise 2026“), bereinigt um BNetzA-Monitoringbericht 2025 Tab. 24 (S. 106) und Tab. 38 (S. 169–170) | 2026-07-21 | Durchschnittliche Grundgebühr des Lieferanten am Markt, ohne Netz- und Messstellengebühr. Diese beiden Posten werden unverändert weitergerechnet, ein Vergleich würde also Ersparnis vortäuschen, die es nicht gibt. | | Market-average supplier energy price | 15.9 ct/kWh (gross) | BDEW-Strompreisanalyse April 2026, Folien 2, 6, 11 | 2026-04-30 | Durchschnittlicher Arbeitspreis des Lieferanten am Markt, ohne Netzentgelte, Messstellengebühr, Umlagen und Steuern. Auf 3.500 kWh/Jahr normiert, die Grundgebühr ist anteilig herausgerechnet. | The energy price benchmark is normalized to 3,500 kWh per year. ### Optimization | Parameter | Value | Source | As of | Rationale shown to customers | | - | - | - | - | - | | Spot reduction, household base load | 5 % | Neon-Kurzstudie für naturstrom 2025, S. 7 (20–70 €/a ohne Flexgeräte) | 2025-12-31 | Grundlast lässt sich kaum verschieben. Die 5 % entstehen dadurch, dass Verbrauch wie Waschmaschine oder Trockner in günstige Stunden rutscht. Bandbreite der Studien: 3–8 %. | | Spot reduction, EV charging at home | 65 % | Neon 2025, S. 8 Abb. 3 (−31 % auf die gesamte Laderechnung); FfE 2024 (197–422 € pro E-Auto und Jahr) | 2025-12-31 | Ein E-Auto lädt planbar und über viele Stunden, deshalb landet der Ladevorgang fast vollständig in den günstigsten Stunden. Bandbreite: 60–70 %. | | Spot reduction, heat pump | 25 % | Neon 2025, S. 9 (124 €/a); Pufferkurve Ali et al. 2014, Tab. 4.I | 2025-12-31 | Eine Wärmepumpe kann nur so weit vorheizen, wie der Pufferspeicher und die Gebäudeträgheit es zulassen. Bandbreite: 20–30 %, mit größerem Puffer mehr. | | Battery arbitrage without PV, up to 7.5 kWh | 70 EUR/year (gross) | HTW Berlin / Meissner 2025, S. 3 (69 €/a) | 2025-12-31 | Ein Heimspeicher ohne Solaranlage verdient an der Differenz zwischen günstigen und teuren Stunden. Bandbreite der Studien: 0–225 €/Jahr. | | Battery arbitrage without PV, above 7.5 kWh | 120 EUR/year (gross) | HTW Berlin / Meissner 2025, S. 3, hochgerechnet | 2025-12-31 | Ein größerer Speicher verdient mehr, aber nicht proportional: die zusätzliche Kapazität lohnt nur an Tagen mit besonders großer Preisspanne. | | Battery arbitrage with PV | 0 EUR/year (gross) | Lorenz et al. 2026 | 2026-01-31 | Ein Speicher hinter einer Solaranlage puffert den eigenen Solarstrom. Ihn zusätzlich aus dem Netz zu laden würde die EEG-Einspeisevergütung gefährden, deshalb rechnen wir hier keine Ersparnis an. | ### Optimization rate by household The optimization rate is the consumption-weighted average of the spot reductions above, computed with the default consumption figures below. Real households get the rate their own mix earns. | Household | Base load | EV charging | Heat pump | Optimization rate | | - | - | - | - | - | | Household only | 2,800 kWh | 0 kWh | 0 kWh | 5 % | | Household and heat pump | 2,800 kWh | 0 kWh | 5,800 kWh | 18 % | | Household and EV | 2,800 kWh | 1,477 kWh | 0 kWh | 26 % | | Household, EV and heat pump | 2,800 kWh | 1,477 kWh | 5,800 kWh | 25 % | ### Time-variable grid fees (Module 3) | Window | Assumed share of consumption | | - | - | | Low | 50 % | | Standard | 40 % | | High | 10 % | The calculator prices Module 3 on the grid operator's published schedule. The fallback rates below are national averages, used only where no postcode is known yet. They never replace a missing operator schedule. | Parameter | Value | Source | As of | Rationale shown to customers | | - | - | - | - | - | | Fallback grid fee, low window | 2.6 ct/kWh (gross) | Branchenportal Variable Netzentgelte (via Vattenfall); bestätigt durch Meissner 2025, S. 32 (Median 2,5 über 14 Netzbetreiber) | 2026-01-31 | Durchschnittliches Netzentgelt im Niedrigtarif-Fenster über alle 866 deutschen Netzbetreiber. | | Fallback grid fee, standard window | 8.7 ct/kWh (gross) | Branchenportal Variable Netzentgelte (via Vattenfall); bestätigt durch Meissner 2025, S. 32 (Median 8,5) | 2026-01-31 | Durchschnittliches Netzentgelt im Standardtarif-Fenster. Ohne Modul 3 zahlt man diesen Satz rund um die Uhr. | | Fallback grid fee, high window | 12.5 ct/kWh (gross) | Branchenportal Variable Netzentgelte (via Vattenfall); bestätigt durch Meissner 2025, S. 32 (Median 12,8) | 2026-01-31 | Durchschnittliches Netzentgelt im Hochtarif-Fenster. | ### Consumption and solar | Parameter | Value | Source | As of | Rationale shown to customers | | - | - | - | - | - | | EV consumption | 21 kWh/100 km | Neon 2025, Tab. 1; Gegenprobe Stute & Klobasa 2024 (0,15–0,20 kWh/km) | 2025-12-31 | Durchschnittlicher Verbrauch eines Elektroautos inklusive Ladeverlusten. | | Self-sufficiency, PV without battery | 30 % | Fraunhofer ISE (typisch 25–40 %) | 2026-01-31 | Ohne Speicher deckt eine Solaranlage rund 30 % des Verbrauchs, weil der Strom dann anfällt, wenn niemand zu Hause ist. | | Self-sufficiency, PV and battery with heat pump | 50 % | Worms 2026, S. 5 | 2026-01-31 | Mit Speicher und Wärmepumpe steigt der Eigenverbrauch, weil die Wärmepumpe den Solarstrom tagsüber abnimmt. | | Self-sufficiency, PV and battery without heat pump | 75 % | Worms 2026, S. 5 | 2026-01-31 | Ein Speicher in einem Haushalt ohne Wärmepumpe deckt einen großen Teil des Verbrauchs, weil der Verbrauch insgesamt klein ist. | | Cost of self-consumed solar power | 6 ct/kWh (gross) | HTW Berlin Speicherrechner; noch gegen weitere Quellen zu prüfen | 2026-01-31 | Solarstrom vom eigenen Dach ist nicht kostenlos: über die Lebensdauer der Anlage kostet er rund 6 ct/kWh. | ### Defaults and thresholds | Parameter | Default | | - | - | | Base load, 1 person | 1,800 kWh/year | | Base load, 2 people | 2,800 kWh/year | | Base load, 3 people | 3,600 kWh/year | | Base load, 4 people | 4,200 kWh/year | | EV distance | 10,500 km/year | | EV home charging share | 67 % | | Heat pump consumption | 5,800 kWh/year | | PV peak power | 8 kWp | | Battery | 10 kWh, 5 kW | | Minimum battery power for §14a EnWG | more than 4.2 kW | ## Literature The values above are derived from these publications. Ranges in the rationale column are the spread across studies. The value column is the figure the calculator uses. | Short name | Publication | | - | - | | Neon 2025 | [Neon Energiesysteme, Kurzstudie für naturstrom: Dynamischer Stromtarif (Oct 2025)](https://neon.energy/Neon-Dynamischer-Stromtarif.pdf) | | FfE 2024 | [FfE: Is charging electric vehicles with variable tariffs worthwhile?](https://www.ffe.de/en/publications/is-charging-electric-vehicles-with-variable-tariffs-worthwile/) | | Ali et al. 2014 | [Ali et al., via Aalto University dissertation, Table 4.I](https://aaltodoc.aalto.fi/server/api/core/bitstreams/21de074f-78d1-48c0-83ae-2aed24f23570/content) | | Stute & Klobasa 2024 | [Stute and Klobasa, Energy Policy 189 (2024)](https://www.sciencedirect.com/science/article/pii/S030142152400082X) | | Meissner 2025 | [Meissner, HTW Berlin: Einfluss dynamischer Stromtarife (2025)](https://solar.htw-berlin.de/publikationen/einfluss-dynamischer-stromtarife/) | | Lorenz et al. 2026 | [Lorenz et al., Energy Policy 209 (2026)](https://www.sciencedirect.com/science/article/pii/S0301421525004598) | | Worms 2026 | [BNS Fachstudie: Effizienz von Batteriespeichersystemen mit dynamischen Stromtarifen (2026)](https://www.worms.de/neu-de-wAssets/docs/zukunft-gestalten/klima-umwelt/Energie/BuergerSolarBeratung/_BNS_3_Studie_A_Effizienz_von_Batteriespeichersystemen_mit_dynamischen_Stromtarifen-Fachstudie_2026_mit_Querverweisen-final.pdf) | | HTW Stromspeicher-Inspektion 2026 | [HTW Berlin: Stromspeicher-Inspektion 2026](https://solar.htw-berlin.de/studien/stromspeicher-inspektion-2026/) | | BDEW-Strompreisanalyse | BDEW Strompreisanalyse, April 2026 | | BNetzA-Monitoringbericht | Bundesnetzagentur and Bundeskartellamt, Monitoringbericht 2025 | # Third-Party Login Source: https://docs.nomos.energy/guides/third-party-oauth Designed for customer-consented access. ## Get customer-consented access via OAuth 2.0 Standard authorization-code flow with PKCE. Your app (a HEMS, an EV charger, a home-automation hub) redirects the customer to `/oauth/authorize` with your `client_id` and pre-registered `redirect_uri`. After they approve on a Nomos-hosted consent page, your backend exchanges the resulting code at `/oauth/token` for a short-lived access token plus a rotating refresh token. ![Hosted sign-in page asking the customer for the email address tied to their Nomos contract](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/oauth-sign-in.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=8d4300a7a3fa87ba1bc223d99ba3bc63) Step 1: customer enters their Nomos email ![Hosted verification page with six input boxes for the one-time code](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/oauth-verify.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=63f03fa8d32dfc4d7cc02fb92c6920d6) Step 2: customer enters the one-time code ![Hosted consent screen listing the data scopes the application is requesting, with allow and deny buttons](https://mintcdn.com/riverslate/rFuRSKXuhnC74OsD/images/oauth-consent.png?fit=max\&auto=format\&n=rFuRSKXuhnC74OsD\&q=85\&s=50b965805d4a6f31e10525f34a81d627) Step 3: customer grants the requested access > [!WARNING] > > This is the right flow if you act on behalf of a customer. If you're an > organization on Nomos and just need server-to-server access to your own data, > use the [Client Credentials > grant](/api-references/authentication#client-credentials-grant) instead. ## What you can do with the access token Tokens minted through this flow are scoped to a single customer. They authorize the same read endpoints the customer sees in their portal: subscriptions, prices, consumption, invoices. Writes are limited to meter readings for that customer's subscriptions: [Create a meter reading](/api-reference/usage/create-a-meter-reading). Access tokens last 60 minutes. Refresh tokens rotate on every use, so always persist the new one and call `/oauth/token` again before the access token expires. For full request and response shapes, including PKCE details, see [Authentication](/api-references/authentication#authorization-code-grant). Once you have tokens, continue with [Load shifting and optimization](/guides/load-shifting) to pull prices and drive flexible loads. ## FAQ > **Why PKCE if I'm exchanging on the server?** > > PKCE protects the authorization code from interception in transit, even on a > server-to-server flow. It costs nothing to add and closes a class of > redirect-URI attacks. > **What happens when a refresh fails?** > > An `UNAUTHORIZED` response means the customer has revoked access (or the > refresh token expired). Send them through `/oauth/authorize` again to mint a > fresh pair. > **Can I refresh from the browser?** > > No. Refresh tokens must stay on the server. Build a thin endpoint on your > side that proxies the refresh and hands the new access token to the client > if needed. > **Can a customer authorize multiple third-party apps?** > > Yes. Each app gets its own token pair. Revoking one doesn't affect the > others. # Nomos Documentation Source: https://docs.nomos.energy/home Guides, API reference, and webhooks for the Nomos energy platform. *** ### Nomos is a full-stack power company. We are a fully licensed and regulated electricity retailer in Germany. We run procurement, billing, metering, and supplier switching, while you keep control of your brand and customer experience. Every part of the stack is exposed through one consistent API. > **[Plans](/api-reference/plans/list-plans)** > **[Subscriptions](/api-reference/subscriptions/create-a-subscription)** > **[Metering](/api-reference/usage/retrieve-usage-data)** > **[Devices](/api-reference/assets/list-assets)** > **[Billing](/api-reference/invoices/list-invoices)** *** ### Built to take bills to zero. Beyond the basics, our API unlocks dynamic tariffs with day-ahead wholesale prices, §14a grid fee reductions, and device-level load shifting. Together they let your customers run their home on the cheapest hours of the day and move closer to a zero energy bill. > **[Smart meter installations](/guides/order-smart-meters)** > **[§14a grid fee reductions](/guides/grid-fee-reductions)** > **[Load shifting and optimization](/guides/load-shifting)** *** ### Two paths, one platform. Embed Nomos-hosted pages to launch a branded customer experience in days, or build every screen yourself against our API and webhooks for a deeply integrated product. Both paths produce the same resources, fire the same webhooks, and can coexist on one account. > **[Hosted Components](/guides/hosted-checkout)** > > A branded checkout, customer portal, and pre-filled signup links. No > frontend code required. > **[Build your own](/guides/checkout)** > > REST endpoints and webhooks for full control over UI, data, and edge cases. *** ### Take the next step. > **[We're hiring!](https://jobs.ashbyhq.com/nomos)** > **[Book a demo](https://nomos.energy/demo)** > **[Dashboard](https://dashboard.nomos.energy)** > **[Quickstart](/quickstart)** # Quickstart Source: https://docs.nomos.energy/quickstart Pick your integration path and set up API access in under five minutes. ## Integration Paths > **[Hosted Components](/guides/hosted-checkout)** > > Send customers to a branded, Nomos-hosted checkout and customer portal. No > frontend code required. > **[Build your own](/guides/checkout)** > > Quote pricing, collect customer info, and create a subscription against the > API end-to-end. ## Make your first authenticated request **1. Get an access token** The Nomos API uses OAuth 2.0. This quickstart uses the client credentials grant for server-to-server requests; for third-party integrations acting on behalf of a customer, see [Authentication](/api-references/authentication). Create a `client_id` and `client_secret` in the [Nomos dashboard](https://dashboard.nomos.energy). If you don't have dashboard access yet, ask your dedicated Nomos contact. Exchange your credentials for a short-lived access token: ```bash cURL theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=client_credentials ``` ```ts Node.js theme={null} const credentials = Buffer.from( `${process.env.CLIENT_ID}:${process.env.CLIENT_SECRET}`, ).toString("base64"); const res = await fetch("https://api.nomos.energy/oauth/token", { method: "POST", headers: { Authorization: `Basic ${credentials}`, "Content-Type": "application/x-www-form-urlencoded", }, body: "grant_type=client_credentials", }); const { access_token } = await res.json(); ``` ```python Python theme={null} import os, requests res = requests.post( "https://api.nomos.energy/oauth/token", auth=(os.environ["CLIENT_ID"], os.environ["CLIENT_SECRET"]), data={"grant_type": "client_credentials"}, ) res.raise_for_status() token = res.json()["access_token"] ``` The access token is valid for 60 minutes. Cache it; when it expires, [refresh it](/api-references/authentication#token-lifecycle) instead of asking for a new one. **2. Make a request** List the plans configured on your organization. This proves your token works. ```bash cURL theme={null} curl https://api.nomos.energy/plans \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` ```ts Node.js theme={null} const res = await fetch("https://api.nomos.energy/plans", { headers: { Authorization: `Bearer ${access_token}` }, }); const { items } = await res.json(); ``` ```python Python theme={null} res = requests.get( "https://api.nomos.energy/plans", headers={"Authorization": f"Bearer {token}"}, ) res.raise_for_status() items = res.json()["items"] ``` If you see an `UNAUTHORIZED` error, your token is missing, malformed, or expired. See [Errors](/api-references/errors). ## Test in the sandbox The sandbox is a separate copy of Nomos for building your integration. It has its own data, so credentials, plan IDs, leads, and webhook endpoints created there don't exist in production, and you create them again when you go live. | Production | Sandbox | | - | - | | `api.nomos.energy` | `api.sandbox.nomos.energy` | | `dashboard.nomos.energy` | `sandbox.dashboard.nomos.energy` | | `{plan.slug}.checkout.energy` | `{plan.slug}.sandbox.checkout.energy` | | `{plan.slug}.customerportal.energy` | `{plan.slug}.sandbox.customerportal.energy` | > [!WARNING] > > The sandbox sends real webhooks and real customer emails, in your branding. > Sign up only with email addresses you control. No grid operator or previous supplier is involved, so the sandbox moves new subscriptions forward on its own: about five minutes after signup it confirms the subscription with today as the start date, and about five minutes later it activates it. Each step sends the same webhooks and emails as in production. To send any other `subscription.*` event, open the subscription's row actions on the customers page of the sandbox dashboard and choose **Status ändern**. These test events go to every active endpoint once, without retries. # Authentication Source: https://docs.nomos.energy/api-references/authentication Authenticate with the Nomos API using OAuth 2.0. The Nomos API uses [OAuth 2.0](https://datatracker.ietf.org/doc/html/rfc6749). You'll need a `client_id` and `client_secret` issued to your organization. Keep the secret server-side. Most integrations use the [Client Credentials](#client-credentials-grant) flow for server-to-server access against your own organization's data. If your app instead acts on behalf of a customer (for example, a HEMS provider reading prices for a specific subscription), use the [Authorization Code](#authorization-code-grant) flow. ## Client Credentials Grant Server-to-server flow against your own organization's data ([RFC 6749 §4.4](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)). No customer interaction is involved. ### Request a token ```bash cURL theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=client_credentials ``` ```ts Node.js theme={null} const credentials = Buffer.from( `${process.env.CLIENT_ID}:${process.env.CLIENT_SECRET}`, ).toString("base64"); const res = await fetch("https://api.nomos.energy/oauth/token", { method: "POST", headers: { Authorization: `Basic ${credentials}`, "Content-Type": "application/x-www-form-urlencoded", }, body: "grant_type=client_credentials", }); const { access_token, refresh_token, expires_in } = await res.json(); ``` ```python Python theme={null} import os, requests res = requests.post( "https://api.nomos.energy/oauth/token", auth=(os.environ["CLIENT_ID"], os.environ["CLIENT_SECRET"]), data={"grant_type": "client_credentials"}, ) res.raise_for_status() access_token = res.json()["access_token"] ``` `/oauth/token` responds with: ```json theme={null} { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "21cc84a3ad98736f4e5eddc88a1f4b58a29ae96206027c9b59d874cb2a7f7e02", "scope": "read:* write:*" } ``` The `scope` field is a space-delimited list of scopes granted on the token, mirroring the standard OAuth 2.0 [`scope` claim](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3). See [Scopes](#scopes) for what each value allows. ### Use the access token Send it in the `Authorization` header on every API request: ```bash theme={null} curl https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` ### Refresh Access tokens last **60 minutes**. When yours expires, exchange the refresh token at `/oauth/token` for a new pair: ```bash theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=refresh_token \ -d refresh_token=${REFRESH_TOKEN} ``` ## Authorization Code Grant If your app acts on a customer's behalf instead of running server-to-server, use this flow ([RFC 6749 §4.1](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1)). The token response, header usage, and refresh model are identical to [Client Credentials](#client-credentials-grant); only the way you obtain the initial token differs. Your callback URI must be registered against your `client_id`; subpaths under the registered origin are accepted. **1. Redirect the customer to /oauth/authorize** ``` https://api.nomos.energy/oauth/authorize? client_id=${CLIENT_ID}& response_type=code& redirect_uri=${REDIRECT_URI}& state=${STATE} ``` `state` is a per-request opaque value you generate, store, and verify on callback (CSRF protection). > [!TIP] > > For [PKCE](#pkce), also send `code_challenge` and `code_challenge_method` (use `S256`). Public clients (no `client_secret`) must use PKCE. > [!NOTE] > > While the redirect is open, the customer signs in and grants consent on Nomos-hosted screens. See the [third-party login guide](/guides/third-party-oauth) for the customer journey. **2. Handle the callback** Nomos redirects with a single-use code (10-minute TTL) and your `state`. Reject the callback if `state` doesn't match. ``` https://your-app.com/callback? code=${AUTHORIZATION_CODE}& state=${STATE} ``` **3. Exchange the code at /oauth/token** ```bash theme={null} curl -X POST https://api.nomos.energy/oauth/token \ -u "${CLIENT_ID}:${CLIENT_SECRET}" \ -d grant_type=authorization_code \ -d code=${AUTHORIZATION_CODE} \ -d redirect_uri=${REDIRECT_URI} ``` For PKCE, also send `code_verifier`. ### PKCE PKCE (Proof Key for Code Exchange) hardens the flow against code interception ([RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636)). Prefer `S256` over `plain`. **1. Generate a verifier and challenge** Pick a random `code_verifier` of 43–128 characters from `[A-Za-z0-9-._~]`. With `S256`, the `code_challenge` is the base64url-encoded SHA-256 of the verifier; with `plain`, it's the verifier itself. **2. Send the challenge on /oauth/authorize** Add `code_challenge` and `code_challenge_method` to the authorize URL. **3. Send the verifier on /oauth/token** Include the original `code_verifier` in the token request. Nomos validates it against the challenge. ## Scopes Each API key is issued with one or more scopes. Two scopes are defined today: | Scope | Allows | | - | - | | `read:*` | All `GET` requests across the API. | | `write:*` | All non-`GET` requests (`POST`, `PATCH`, `PUT`, `DELETE`). | A key with both scopes (`read:* write:*`) is full-access, the default. A read-only key carries only `read:*` and is rejected with `403 FORBIDDEN` on any mutating request. Choose read-only when issuing a key for a programmatic agent, ETL job, or BI consumer that should never mutate state. Scopes are set when the key is created and cannot be changed later. To switch a key from full access to read-only (or vice versa), create a new key and rotate. The `scope` field is `*` because future iterations may introduce resource-named scopes (`read:invoice`, `write:subscription`) that narrow access further. Keys with the wildcard scopes continue to behave as supersets. > [!NOTE] > > Auth failures return `401 UNAUTHORIZED` with the standard error envelope. > Scope failures return `403 FORBIDDEN`. See > [Errors](/api-references/errors/UNAUTHORIZED) for the response shape and > common causes. # Changelog Source: https://docs.nomos.energy/api-references/changelog What changed between Nomos API versions. Each entry below corresponds to a date-based version you can pin per Auth Client or per request. See [Versioning](/api-references/versioning) for how to upgrade. **2026-09-08.gauss** Gauss introduces households, assets with live data and schedules, day-ahead price forecasts, and savings estimates, and moves quotes to a request body. Older versions keep the removed routes and previous response shapes. **Breaking changes** | Old route | Replacement | | - | - | | `GET /plans/{id}/quote` | `POST /plans/{id}/quote` | | `POST /load-forecasts` | Removed | * [Calculate a quote](/api-reference/plans/calculate-a-quote) takes its inputs in the request body. The §14a EnWG modules move into one `grid_fee_reductions` object, and the consumption moves to `usage.consumption`. * The quote response drops `meter_type` and states the load-shifting discount as its own `optimization` subcomponent. `energy` is now the undiscounted day-ahead average. * `POST /plans/{id}/quote` and `POST /plans/{id}/savings` require a `write:*` token. * On every version, list endpoints return `400` for an unknown filter field or an unsupported operator. See [Filtering](/api-references/filtering). **New features** * `GET /households` and `GET /households/{id}` expose the households a customer's subscriptions belong to. * `POST /assets`, `GET /assets`, `GET /assets/{id}`, `PATCH /assets/{id}`, and `POST /assets/{id}/decommission` manage the devices behind a household's meter: inverters, solar, batteries, wallboxes, and heat pumps. * `POST /asset-snapshots` and `GET /asset-snapshots` send and read the live state of a household's assets. * `GET /assets/{id}/schedule` reads the quarter-hour plan in force for a steerable asset. * `GET /subscriptions/{id}/prices` adds an optional `type` parameter. `day_ahead_forecast` prices the series on the Nomos day-ahead price forecast, and the default stays the realized auction. * `POST /plans/{id}/savings` estimates what a household saves per year on a plan. * [Calculate a quote](/api-reference/plans/calculate-a-quote) accepts an optional `optimization_rate` and §14a EnWG module 3 (`14a_module_3`). * On every version, subscriptions carry a `household` field. * Invoices add support for exit summaries via a new `type` value (`exit_summary`). * `PATCH /leads/{id}` updates a lead's editable fields and merges `metadata` key by key. **2026-05-27.curie** Curie introduces feed-in support, improved smart meter orders, webhook events, the first `PATCH` endpoints, and restructures key resources around top-level endpoints. Older versions keep the removed routes and previous response shapes. **Breaking changes** Several routes are replaced by top-level endpoints. The old routes are removed from this version onwards: | Old route | Replacement | | - | - | | `GET /subscriptions/{id}/invoices` | `GET /invoices` | | `GET /subscriptions/{id}/meter_readings` | `GET /meter-readings` | | `POST /subscriptions/{id}/meter_readings` | `POST /meter-readings` | | `GET /suppliers`, `GET /suppliers/search` | `GET /market-partners` | | `GET /subscriptions/{id}/consumption` | `GET /subscriptions/{id}/usage` | Scope the new list endpoints to a single subscription with `filter[subscription][eq]=` * The [Retrieve usage data](/api-reference/usage/retrieve-usage-data) response `object` field changes from `consumption` to `usage`. * Meter order responses collapse `status` from 14 internal partner-specific states to 8 public values and drop `updated_at`; see [Retrieve a smart meter order](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order) for the full list. `POST /meter-orders` is unchanged. **New features** * [Feed-in](/guides/feed-in) plans compensate customers for electricity they feed into the grid, for example from rooftop solar. Plans and subscriptions carry a `type` field (`consumption` or `feed_in`). * `POST /subscriptions/{id}/terminate` terminates a subscription via a discriminated `reason` field: `ORDINARY`, `MOVE_OUT`, or `WITHDRAWAL`. * `PATCH /subscriptions/{id}` updates the billing address, payment method, or metadata. * `PATCH /customers/{id}` updates the customer's name. * Meter orders report lifecycle timestamps and reasons for cancelled or blocked orders. * Invoices add support for prepayments and voided invoices via new `type` values (`prepayment`, `void`) and statuses (`voided`, `uncollectible`). * [Structured validation errors](/api-references/errors): failures return an `errors[]` array with one entry per invalid field instead of a single message. * [Webhook events](/webhooks/introduction) for invoices and smart meter orders. **2026-01-29.edison** Edison adds grid fee reductions for §14a EnWG modules, smart meter orders, and filtering on all list endpoints. **New features** * `GET /grid-fee-reductions`, `GET /grid-fee-reductions/{id}`, and `POST /grid-fee-reductions` manage grid fee reductions for §14a EnWG modules. * `GET /meter-orders`, `GET /meter-orders/{id}`, and `POST /meter-orders` manage smart meter orders for a subscription. * All list endpoints support [Filtering](/api-references/filtering). **2025-12-16.batman** Batman introduces pagination on all list endpoints and API versioning. **Breaking changes** * List endpoints are paginated. See [Pagination](/api-references/pagination). Affects `/customers`, `/leads`, `/plans`, `/subscriptions`, `/subscriptions/{id}/invoices`, `/subscriptions/{id}/meter_readings`, `/suppliers`, and `/suppliers/search`. **New features** * [Versioning](/api-references/versioning). Routes stay the same; pin a version per Auth Client or per request via `X-API-Version`. **2025-12-01.chucky** Initial public version of the Nomos API. # Errors Source: https://docs.nomos.energy/api-references/errors Decode the Nomos error envelope and handle each error code. Every error response uses the same JSON envelope, with a status code that follows standard HTTP semantics. ```json theme={null} { "code": "BAD_REQUEST", "message": "Invalid input: expected string, received undefined", "requestId": "37a04f8f-e791-491c-81e1-86cd304649bb", "docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST" } ``` | Field | Description | | - | - | | `code` | Machine-readable error code. Switch on this in your handler. | | `message` | Human-readable description of what went wrong. | | `requestId` | Unique request identifier. Include it when contacting support. | | `docs` | Link to the reference page for this code. | | `errors` | Optional. Per-field breakdown of a validation or business-rule failure (see [Structured errors](#structured-errors)). | > [!TIP] > > Always log the `requestId` alongside the request that caused the error. It's > the fastest way for support to find the corresponding trace. ## Structured errors When a request fails validation or a business rule, the envelope carries an additional `errors` array with a per-field breakdown. Switch on each entry's `code` to map the failure back to a specific input, instead of parsing the human-readable `message`. > [!NOTE] > > The `errors` array is available from version `2026-05-27.curie` onwards. On > earlier versions the envelope omits it and only `code`, `message`, > `requestId`, and `docs` are returned. ```json theme={null} { "code": "BAD_REQUEST", "message": "We don't currently serve this postal code.", "requestId": "37a04f8f-e791-491c-81e1-86cd304649bb", "docs": "https://docs.nomos.energy/api-references/errors/BAD_REQUEST", "errors": [ { "code": "unserviceable_zip", "field": "address.zip", "message": "We don't currently serve this postal code." } ] } ``` Each entry has these fields: | Field | Description | | - | - | | `code` | Machine-readable reason for this field. Either a standard validation code (`invalid_type`, `too_small`, ...) or a Nomos-specific business code (`unserviceable_zip`). | | `field` | Dot-path to the offending field (`address.zip`). Empty for a top-level issue. | | `message` | Human-readable description of this specific issue. | The top-level `code` stays the coarse HTTP class (for example `BAD_REQUEST`); the `errors[].code` values are the granular reasons you switch on. ### Validation codes These cover schema validation failures and map to the underlying validator's issue codes. | Code | Description | | - | - | | `invalid_type` | Wrong type for the field, or the field is missing entirely. | | `too_big` | Value exceeds its maximum (number too large, string or array too long). | | `too_small` | Value is below its minimum (number too small, string or array too short). | | `invalid_format` | String doesn't match the expected format (email, UUID, ISO date, ...). | | `not_multiple_of` | Number isn't a multiple of the required step. | | `unrecognized_keys` | The object contains keys that aren't allowed, or a filter the endpoint rejects. | | `invalid_union` | Not surfaced directly in `errors[]`; unions are flattened into their branch issues. | | `invalid_key` | A key in a record or map is invalid. | | `invalid_element` | An element of a set or map is invalid. | | `invalid_value` | Value isn't one of the allowed options (enum or literal mismatch). | | `custom` | A custom validation rule failed with no more specific code. | ### Business error codes Beyond the validation codes above, `errors[].code` can carry a Nomos-specific business code: > [!NOTE] > > Business error codes are available from version `2026-05-27.curie` onwards. On > earlier versions these failures surface only through the top-level `code` and > `message`. | Code | Status | Description | | - | - | - | | `unserviceable_zip` | `400` | The postal code in `address.zip` is outside the area Nomos serves. | | `unsupported_product` | `400` | A requested entry in `product_orders`, or from `2026-09-08.gauss` a §14a EnWG module on a grid fee reduction, isn't offered by the plan. | | `duplicate_customer_email` | `400` | A customer with this email already exists under a different type, name, or company. Reconcile before retrying. | | `invalid_iban` | `400` | The IBAN in `payment_method.sepa_debit.iban` failed checksum validation. | | `unsupported_meter` | `400` | The plan doesn't support the capacity (RLM) meter named in `meter.type`. | | `unsupported_meter_order` | `400` | The subscription's plan offers no smart meter product, so a meter order can't be placed. | | `duplicate_meter_order` | `409` | An active meter order of this product already exists for the subscription. | | `ended_subscription` | `400` | The subscription has ended, so a grid fee reduction (from `2026-09-08.gauss` also a meter order) can't be created for it. | | `terminated_subscription` | `400` | The subscription has `terminated_at` set, so from `2026-09-08.gauss` it takes no new grid fee reduction or meter order, even before it ends. | | `duplicate_grid_reduction` | `400` | An active §14a EnWG grid fee reduction already exists for this module on the subscription, or the module is requested twice. | | `missing_smart_meter` | `400` | §14a EnWG module 3 requires a smart meter, which the subscription doesn't have. | | `missing_module_1` | `400` | §14a EnWG module 3 can only be ordered together with module 1, in the same signup or next to an active module 1. | | `incompatible_grid_reduction` | `400` | §14a EnWG module 2 cannot be combined with module 1 or module 3, in the same signup or next to an active reduction. From `2026-09-08.gauss`. | | `out_of_period_meter_reading` | `400` | The reading `timestamp` is outside the subscription period or in the future. | | `unsupported_meter_reading` | `400` | Meter readings can only be reported for analog meters; this subscription's meter is smart. | | `duplicate_meter_reading` | `409` | A meter reading already exists for this day. Resubmitting the identical value returns the stored reading instead. | | `implausible_meter_reading` | `422` | The reading implies a daily consumption that is implausibly high or low compared to previous readings. | | `upgrade_api_version` | `400` | The request targets a feature (such as feed-in subscriptions) not available on the requested API version. Upgrade to a newer version. | | `invalid_termination_date` | `409` | The requested `intended_end_at` is in the past, or earlier than the plan's cancellation period or the grid operator's notice period allow. | | `withdrawal_not_allowed` | `409` | The 14-day withdrawal window has passed, or the subscription has no confirmation date to count it from. | | `subscription_not_started` | `400` | The subscription never started supply (e.g. it was withdrawn before the switch completed), so no prices are available for it. | | `missing_household` | `400` | Several of the customer's households match the meter, so Nomos cannot pick one. Pass the household explicitly. | | `invalid_household_customer` | `400` | The household in `household` belongs to a different customer than the one in this request. | | `invalid_household_meter` | `400` | The meter is not registered at the household in `household`. Pass the household the meter belongs to, or leave it empty to create one. | | `duplicate_consumption_subscription` | `400` | The household in `household` already has a live consumption subscription on another meter. A separately metered device needs its own household. | | `invalid_inverter` | `400` | `parent_inverter` is not an active inverter in the same household, is set on a type other than `solar` or `battery`, or is missing on a solar asset. | | `read_only_asset` | `400` | Nomos maintains `household_net` and `household_residual`: they can't be added or decommissioned, and an update only changes their `metadata`. | | `duplicate_external_id` | `409` | An asset of your organization already has this `external_id`, active or decommissioned. The message names its ID. | | `asset_has_children` | `409` | The inverter still has active solar or battery assets behind it. Decommission them or move them to another inverter first. | | `asset_decommissioned` | `409` | The asset is decommissioned: it can't be updated or decommissioned again, and takes no snapshots measured after its decommissioning. | | `asset_not_found` | `404` | An asset in the request does not exist or belongs to another organization. | | `mixed_households` | `400` | One request may only carry the assets of one household. Send each household in its own request. | | `field_not_allowed` | `400` | The field does not apply here, for example a charge level on a solar asset or any value on an offline snapshot. | | `invalid_direction` | `400` | The power flows in a direction the asset cannot have, for example solar consuming. Power is positive into the asset and negative out of it. | | `duplicate_timestamp` | `400` | Two snapshots of one asset have the same timestamp. Send one value per asset and moment. | ## Retrying Retry only when retrying could plausibly succeed. Use exponential backoff with jitter and cap the attempts. | Status | Retry | | - | - | | `4xx` | No. Fix the request before retrying. | | `5xx` | Yes, with exponential backoff. | ## Error reference | Status | Code | Description | | - | - | - | | `400` | `BAD_REQUEST` | The request is invalid: a field fails validation, a business rule rejects it, or the body isn't valid JSON. `errors[]` names each field and its reason. | | `401` | `UNAUTHORIZED` | No credentials, or the access token is invalid or expired. Refresh and retry. See [Authentication](/api-references/authentication). | | `403` | `FORBIDDEN` | Valid token, but it may not use this endpoint: its scope lacks `read:*` or `write:*`, or its role has no access. | | `404` | `NOT_FOUND` | A resource in the path or the body doesn't exist, or belongs to another organization. Double-check the ID. | | `409` | `CONFLICT` | The request conflicts with the current state of a resource: a duplicate such as an existing meter order, or a resource in the wrong state such as an already terminated subscription. | | `422` | `UNPROCESSABLE_ENTITY` | A query parameter is invalid, such as a filter value outside its allowed options or a date that doesn't exist, or a meter reading is implausible. Read `errors[]` for the details. | | `500` | `INTERNAL_SERVER_ERROR` | Unexpected error on Nomos's side. Retry with backoff. If it persists, email [support@nomos.energy](mailto:support@nomos.energy) with the `requestId`. | # Filtering Source: https://docs.nomos.energy/api-references/filtering Narrow list endpoints with bracket-notation query filters. Every list endpoint supports filtering through query parameters in the form `filter[][]=`. Multiple filters combine with **AND**. ```bash theme={null} curl -G "https://api.nomos.energy/customers" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[type][eq]=person" \ --data-urlencode "filter[created_at][gte]=2024-01-01T00:00:00Z" ``` The endpoint reference lists each filterable field and the operators it accepts. The tables below show the most each field type allows, and a field can accept fewer. A filter on an unknown field, an operator the field does not accept, the same filter sent twice, or more than one of `eq`, `ne` and `in` on one field returns `400 BAD_REQUEST`, so a typo never returns the unfiltered list. An empty `in` list matches nothing. ## Operators by field type **String** | Operator | Description | Example | | - | - | - | | `eq` | Exact match | `filter[email][eq]=john@example.com` | | `ne` | Not equal | `filter[status][ne]=cancelled` | | `in` | Comma-separated list | `filter[status][in]=active,pending` | | `is_null` | Null check (`true`/`false`) | `filter[deleted_at][is_null]=true` | | `contains` | Case-insensitive contains | `filter[last_name][contains]=mueller` | | `starts_with` | Case-insensitive prefix | `filter[email][starts_with]=john` | | `ends_with` | Case-insensitive suffix | `filter[email][ends_with]=@example.com` | **Number** | Operator | Description | Example | | - | - | - | | `eq` | Equal to | `filter[amount][eq]=100` | | `ne` | Not equal | `filter[amount][ne]=0` | | `gt` | Greater than | `filter[amount][gt]=100` | | `gte` | Greater than or equal | `filter[amount][gte]=100` | | `lt` | Less than | `filter[amount][lt]=1000` | | `lte` | Less than or equal | `filter[amount][lte]=1000` | | `in` | Comma-separated list | `filter[amount][in]=10,20,30` | | `is_null` | Null check | `filter[amount][is_null]=false` | **Date** Dates must be ISO 8601 with timezone, between `0001-01-01` and `9999-12-31` UTC. | Operator | Description | Example | | - | - | - | | `gte` | On or after | `filter[created_at][gte]=2024-01-01T00:00:00Z` | | `lte` | On or before | `filter[created_at][lte]=2024-12-31T23:59:59Z` | | `is_null` | Null check | `filter[terminated_at][is_null]=true` | **Boolean** | Operator | Description | Example | | - | - | - | | `eq` | `true` / `false` | `filter[is_verified][eq]=true` | | `is_null` | Null check | `filter[is_verified][is_null]=false` | **Enum** | Operator | Description | Example | | - | - | - | | `eq` | Exact match | `filter[status][eq]=active` | | `ne` | Not equal | `filter[status][ne]=cancelled` | | `in` | Comma-separated list | `filter[status][in]=active,pending` | The endpoint reference lists the allowed values for each enum field. ## Common patterns ### Filter by date range ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[created_at][gte]=2024-01-01T00:00:00Z" \ --data-urlencode "filter[created_at][lte]=2024-01-31T23:59:59Z" ``` ### Filter by multiple values ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][in]=active,pending" ``` ### Search by substring ```bash theme={null} curl -G "https://api.nomos.energy/market-partners" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[name][contains]=stadtwerke" ``` ### Exclude ended subscriptions ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][ne]=ended" ``` ### Combine with pagination Pass the same filter parameters with each page when [paginating](/api-references/pagination): ```bash theme={null} curl -G "https://api.nomos.energy/subscriptions" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ --data-urlencode "filter[status][eq]=active" \ --data-urlencode "limit=20" \ --data-urlencode "cursor=${NEXT_PAGE}" ``` > [!NOTE] > > Malformed filter syntax returns `400 BAD_REQUEST` and an invalid value returns > `422 UNPROCESSABLE_ENTITY`, each with a message naming the offending > parameter. See [Errors](/api-references/errors) for the full envelope. # API Reference Source: https://docs.nomos.energy/api-references/introduction Understand general concepts, response codes, and authentication strategies. ## Base URL The Nomos API is built on REST principles. We enforce HTTPS in every request to improve data security, integrity, and privacy. The API does not support HTTP. All requests contain the following base URL: ``` https://api.nomos.energy ``` > [!NOTE] > > When using the sandbox for testing, take: `https://api.sandbox.nomos.energy` ## Resources > **[Authentication](/api-references/authentication)** > > Get a Bearer token using OAuth 2.0. > **[Versioning](/api-references/versioning)** > > Pin a version per Auth Client or per request. > **[Pagination](/api-references/pagination)** > > Walk list endpoints with cursor-based pagination. > **[Filtering](/api-references/filtering)** > > Narrow lists with bracket-notation query filters. > **[Errors](/api-references/errors)** > > Decode the error envelope and handle each code. > **[Changelog](/api-references/changelog)** > > See what changed between API versions. ## Need help? Email [support@nomos.energy](mailto:support@nomos.energy) and include the `requestId` from the error response. # Pagination Source: https://docs.nomos.energy/api-references/pagination Walk list endpoints with cursor-based pagination. Every list endpoint returns the same envelope and uses cursor-based pagination. Cursors guarantee no duplicates or missing items even if data changes between requests. Items come back newest first, ordered by `created_at`. ## Request parameters | Parameter | Description | | - | - | | `limit` | Page size, 1–100. Defaults to 10. | | `cursor` | The `next_page` value from the previous response. Omit on the first request. | ## Response envelope ```json theme={null} { "object": "list", "items": [ /* … */ ], "has_more": true, "next_page": "eyJsYXN0X2NyZWF0ZWRfYXQiOiIyMDI1LTAxLTE1VDEwOjMwOjAwLjAwMFoiLCJsYXN0X2lkIjoic3ViXzEyMzQ1Njc4OSIsImxpbWl0IjoyMH0=" } ``` | Field | Description | | - | - | | `items` | The page of results. | | `has_more` | `true` when more pages exist; `false` when this is the last page. | | `next_page` | Opaque cursor for the next request, or `null` on the last page. | > [!WARNING] > > Keep the same query parameters across the whole iteration (filters, `limit`, > etc.). Changing them mid-walk invalidates the cursor. ## Walk a list **1. Fetch the first page** ```bash theme={null} curl "https://api.nomos.energy/customers?limit=20" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` **2. Fetch each next page** Pass `next_page` from the previous response as `cursor` on the next request: ```bash theme={null} curl "https://api.nomos.energy/customers?limit=20&cursor=${NEXT_PAGE}" \ -H "Authorization: Bearer ${ACCESS_TOKEN}" ``` **3. Stop when has\_more is false** The last page returns `"has_more": false` and `"next_page": null`. ## Loop in code ```ts theme={null} async function listAll(path: string, token: string): Promise { const items: T[] = []; let cursor: string | null = null; do { const url = new URL(path, "https://api.nomos.energy"); if (cursor) url.searchParams.set("cursor", cursor); const res = await fetch(url, { headers: { Authorization: `Bearer ${token}` }, }); const page = (await res.json()) as { items: T[]; has_more: boolean; next_page: string | null; }; items.push(...page.items); cursor = page.has_more ? page.next_page : null; } while (cursor); return items; } ``` > [!NOTE] > > A malformed or tampered `cursor` returns `400 BAD_REQUEST`. See > [Errors](/api-references/errors) for the full envelope. # Versioning Source: https://docs.nomos.energy/api-references/versioning Pin an API version per Auth Client or per request. The `X-API-Version` header controls the request and response shapes your code sees. Each Auth Client has a default version, used when the header isn't sent. New Auth Clients default to the latest stable release. Breaking changes only ship in a new version, so existing integrations keep working until you opt in. Additive changes (new response fields, new endpoints) can land in existing versions, so build your client to ignore fields it does not recognize. Every response echoes the version it was processed with: ```http theme={null} HTTP/1.1 200 OK X-API-Version: 2026-09-08.gauss ``` ## Upgrade an Auth Client **1. Review the changelog** Check what changed between your current version and the target in the [Changelog](/api-references/changelog). **2. Test against your existing traffic** Send the target version as `X-API-Version` to override the Auth Client's default on a per-request basis. Confirm everything still works before changing the default. ```bash theme={null} curl https://api.nomos.energy/subscriptions \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "X-API-Version: 2026-09-08.gauss" ``` **3. Switch the default in the dashboard** In the Nomos dashboard, open **Developer**, edit the Auth Client, pick the new version, and save. Future tokens minted by that client use the new version. Tokens issued earlier stay on the previous version until they expire (see [Authentication](/api-references/authentication) for token lifetime). ## Available versions | Version | Status | | - | - | | `2026-09-08.gauss` | Latest stable | | `2026-05-27.curie` | Previous release | | `2026-01-29.edison` | Previous release | | `2025-12-16.batman` | Previous release | | `2025-12-01.chucky` | Initial stable release | See the [Changelog](/api-references/changelog) for what changed in each release. # invoice.created Source: https://docs.nomos.energy/webhooks/events/invoice-created Sent when an invoice transitions to `open`. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when an invoice transitions to the `open` status, i.e. it has been finalized and is now awaiting payment. Limited to `usage` and `prepayment` invoices. Use this to record the new invoice in your own systems before payment is attempted. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `invoice.created` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **invoice** `string` *required* ID of the related invoice (starts with `inv_`). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "invoice.created", "context": { "invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # invoice.paid Source: https://docs.nomos.energy/webhooks/events/invoice-paid Sent when an invoice has been paid in full. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when an invoice is fully paid. Limited to `usage` and `prepayment` invoices. Use this to reconcile your own ledger and mark the invoice as settled. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `invoice.paid` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **invoice** `string` *required* ID of the related invoice (starts with `inv_`). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "invoice.paid", "context": { "invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # invoice.payment_failed Source: https://docs.nomos.energy/webhooks/events/invoice-payment_failed Sent when a payment attempt for an invoice fails. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when a payment attempt against an invoice fails (e.g. SEPA rejection, insufficient funds). Limited to `usage` and `prepayment` invoices. Fires once per failed payment attempt; a single invoice may emit this event multiple times if Nomos retries collection. Use `invoice.uncollectible` to detect when Nomos stops collecting an invoice. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `invoice.payment_failed` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **invoice** `string` *required* ID of the related invoice (starts with `inv_`). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "invoice.payment_failed", "context": { "invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # invoice.uncollectible Source: https://docs.nomos.energy/webhooks/events/invoice-uncollectible Sent when an invoice is marked as uncollectible. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when Nomos no longer expects payment of an invoice and stops collecting it, for example after an unpaid prepayment is cancelled or a debt is written off. Limited to `usage` and `prepayment` invoices. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `invoice.uncollectible` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **invoice** `string` *required* ID of the related invoice (starts with `inv_`). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "invoice.uncollectible", "context": { "invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # invoice.voided Source: https://docs.nomos.energy/webhooks/events/invoice-voided Sent when an invoice is voided. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when an invoice is voided. A voiding invoice is issued that offsets the original; its ID is provided as `voiding_invoice` in the context. Limited to `usage` and `prepayment` invoices. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `invoice.voided` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **invoice** `string` *required* ID of the original invoice that was voided (starts with `inv_`). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). **voiding\_invoice** `string` *required* ID of the offsetting (Storno) invoice issued to reverse the original. References the original via the `voided_invoice` field on the invoice resource. Starts with `inv_`. ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "invoice.voided", "context": { "invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1", "voiding_invoice": "inv_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.activated Source: https://docs.nomos.energy/webhooks/events/meter_order-activated Sent when the smart meter is activated. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when the smart meter is live and reporting. The order reaches `activated`; dynamic pricing and automatic readings are now possible for the subscription. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.activated` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.activated", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.blocked Source: https://docs.nomos.energy/webhooks/events/meter_order-blocked Sent when a smart meter order is flagged as blocked. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when a smart meter order gets flagged as blocked. This is a transient marker layered on top of the current status: the order stays in its previous state, but the resource carries a `blocked_reason` field describing what needs attention. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.blocked` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.blocked", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.cancelled Source: https://docs.nomos.energy/webhooks/events/meter_order-cancelled Sent when a smart meter order is cancelled. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when a smart meter order is cancelled and will not progress further. The order resource carries a `cancellation_reason` field describing why. A subscription can only ever have one smart meter order, so a cancelled order is terminal. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.cancelled` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.cancelled", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.check_reviewed Source: https://docs.nomos.energy/webhooks/events/meter_order-check_reviewed Sent when the installation partner has reviewed the order. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when the installation partner has reviewed the order and the order details provided by the customer. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.check_reviewed` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.check_reviewed", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.check_submitted Source: https://docs.nomos.energy/webhooks/events/meter_order-check_submitted Sent when the customer submits additional details for the installation partner. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when the customer submitted additional details to the installation partner, e.g. a picture of the current meter location. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.check_submitted` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.check_submitted", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.created Source: https://docs.nomos.energy/webhooks/events/meter_order-created Sent when a smart meter order is created. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered right after creating the smart meter order. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.created` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.created", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.installed Source: https://docs.nomos.energy/webhooks/events/meter_order-installed Sent when the smart meter is installed. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when the installation partner has installed the new meter. Activation follows once the meter is registered with the network operator. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.installed` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.installed", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.placed Source: https://docs.nomos.energy/webhooks/events/meter_order-placed Sent when the order has been transferred to the installation partner. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when the order has been transferred to the installation partner. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.placed` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.placed", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # meter_order.scheduled Source: https://docs.nomos.energy/webhooks/events/meter_order-scheduled Sent when an installation appointment is scheduled. > [!NOTE] > > Available from API version `2026-05-27.curie` onwards. Triggered when an installation appointment is scheduled. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `meter_order.scheduled` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **meter\_order** `string` *required* ID of the related smart meter order. Fetch the full record via [`GET /meter-orders/{id}`](/api-reference/smart-meter-orders/retrieve-a-smart-meter-order). **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "meter_order.scheduled", "context": { "meter_order": "smo_mi4f0oda6x9m7gcsvjk0ole1", "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # subscription.activated Source: https://docs.nomos.energy/webhooks/events/subscription-activated Sent when a customer's supply starts. Triggered on the supply start date, when energy delivery to the customer begins. Use this to mark the customer active in your own systems. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `subscription.activated` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "subscription.activated", "context": { "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # subscription.confirmed Source: https://docs.nomos.energy/webhooks/events/subscription-confirmed Sent when a customer's supply start date is confirmed. Triggered once the signup process completes: the previous supplier has been cancelled and the grid operator has confirmed the supply start date. Can trigger more than once per subscription if the start date later changes, so make handlers idempotent on subscription ID and current start date. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `subscription.confirmed` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "subscription.confirmed", "context": { "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # subscription.created Source: https://docs.nomos.energy/webhooks/events/subscription-created Sent when a customer completes signup. Triggered after the customer completes signup and the subscription is created. Nomos then initiates supplier switching: cancelling the previous supplier and registering with the grid operator. If `lead` is set, the customer signed up from an existing lead. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `subscription.created` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). **lead** `string` ID of the related lead (starts with `lead_`). Fetch the full record via [`GET /leads/{id}`](/api-reference/leads/retrieve-a-lead). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "subscription.created", "context": { "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1", "lead": "lead_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # subscription.ended Source: https://docs.nomos.energy/webhooks/events/subscription-ended Sent when a customer's supply ends. Triggered on the supply end date, when energy delivery to the customer stops. Distinct from `subscription.terminated`, which signals an upcoming cancellation. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `subscription.ended` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "subscription.ended", "context": { "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # subscription.terminated Source: https://docs.nomos.energy/webhooks/events/subscription-terminated Sent when a customer schedules cancellation. Triggered after the customer's termination request is confirmed and an end date is set. The customer keeps receiving supply until that date; `subscription.ended` triggers when supply actually stops. ## Response body parameters **id** `string` *required* Unique event identifier (starts with `evt_`). **timestamp** `string` *required* ISO 8601 timestamp when the event was created. **topic** `literal` *required* Always `subscription.terminated` for this event. **context** `object` *required* Event-specific data containing related resource IDs. **properties** **subscription** `string` *required* ID of the related subscription (starts with `sub_`). Fetch the full record via [`GET /subscriptions/{id}`](/api-reference/subscriptions/retrieve-a-subscription). ```json Example payload theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "subscription.terminated", "context": { "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` # Webhooks Source: https://docs.nomos.energy/webhooks/introduction Receive real-time updates from the Nomos API as signed HTTPS requests. Webhooks let your systems react the moment something happens at Nomos: a lead converts, a subscription activates, an invoice is finalized. Register an endpoint, subscribe to the topics you care about, and Nomos sends a signed HTTPS request as soon as the event occurs, so you can update your CRM, trigger downstream workflows, or notify your customers without polling. ## Event shape Every delivery uses the same envelope. The `context` carries IDs only: fetch the resource when you need its current state. ```json theme={null} { "id": "evt_mi4f0oda6x9m7gcsvjk0ole1", "timestamp": "2026-01-15T10:30:00.000Z", "topic": "subscription.created", "context": { "subscription": "sub_mi4f0oda6x9m7gcsvjk0ole1" } } ``` ## Resources > **[Receive webhooks](/webhooks/receiving)** > > Set up an endpoint and register it in the dashboard. > **[Verify requests](/webhooks/verify-requests)** > > Validate the `X-Nomos-Signature` header. > **[Retries](/webhooks/retries)** > > Handle duplicates, out-of-order events, and timeouts. > **[Event topics](/webhooks/events/subscription-created)** > > Browse every event Nomos sends. # How to receive webhooks Source: https://docs.nomos.energy/webhooks/receiving To receive real-time events in your app via webhooks, follow these steps. **1. Create a development endpoint** In your local app, add a route that accepts `POST` requests and responds with `2xx`. ```ts pages/api/webhooks.ts theme={null} export default (req, res) => { if (req.method === "POST") { const event = req.body; console.log(event); res.status(200).end(); } }; ``` Anything other than `2xx` is treated as a failure and triggers retries. > [!TIP] > > Expose your local endpoint with a tunnel like > [ngrok](https://ngrok.com/download) or [VS Code Port > Forwarding](https://code.visualstudio.com/docs/debugtest/port-forwarding) > so the dashboard can reach it. **2. Register the endpoint in Nomos** Open the [Developer page in the Nomos dashboard](https://dashboard.nomos.energy/developer) and add a new webhook: 1. Paste your publicly accessible HTTPS URL. 2. Select the events you want to subscribe to. Saving generates a signing secret. You'll need it to verify requests in step 4. **3. Send a test delivery** From the webhook's detail page, trigger a test event. The test payload only carries the topic, so you can confirm reachability and signature verification without depending on the full envelope: ```json theme={null} { "topic": "test.event" } ``` Confirm your endpoint logs the request and returns `2xx`. **4. Verify and handle real events** Before acting on an event, validate the signature header so you only process real Nomos deliveries. See [Verify webhook requests](/webhooks/verify-requests) for the full procedure. Then dispatch on `topic`. The `context` only carries IDs, so fetch the resource when you need its current state. ```ts pages/api/webhooks.ts theme={null} export default async (req, res) => { if (req.method !== "POST") return res.status(405).end(); const event = req.body; switch (event.topic) { case "subscription.created": // event.context.subscription is the ID break; case "subscription.confirmed": // ... break; } res.status(200).end(); }; ``` **5. Deploy and register the production endpoint** Deploy your handler, then add a second webhook in the dashboard pointing at the production URL. You'll get a separate signing secret for the production endpoint. # Retries Source: https://docs.nomos.energy/webhooks/retries Handle webhook failures with exponential backoff. Webhook delivery is at-least-once: Nomos guarantees every event reaches your endpoint, but the same event can arrive more than once and not always in order. Build your handler around three rules: * **Slow responses fail.** Nomos waits 30 seconds for a `2xx`. Hand long work to a background queue and acknowledge immediately. * **Duplicates can happen.** The same event `id` can arrive more than once, so make your handler idempotent: store processed IDs and skip them on repeat deliveries. * **Order is not guaranteed.** `subscription.confirmed` may land before `subscription.created`. Process events independently and fetch the resource when you need current state. ## Retry schedule Any response other than `2xx` counts as a failure, including `4xx`, and so does a timeout or a connection error. A failed delivery is retried with exponential backoff: 12 attempts in total over roughly 34 hours, after which the delivery is dropped. Nomos never disables an endpoint because of failures; deliveries stop only when you deactivate it. | Retry | Delay after the previous attempt | | - | - | | 1 | 1 minute | | 2 | 2 minutes | | 3 | 4 minutes | | 4 | 8 minutes | | 5 | 16 minutes | | 6 | 32 minutes | | 7 | 64 minutes | | 8 | 128 minutes | | 9 | 256 minutes | | 10 | 512 minutes | | 11 | 1024 minutes | > [!TIP] > > Return a `2xx` for events you receive but don't act on, such as a subscription > your CRM has no record of. Any other status is retried. ## Looking up past events Every event Nomos sends is stored. To inspect a delivery after the fact, retrieve it by `id` with [Retrieve an event](/api-reference/events/retrieve-an-event). The response uses the same envelope as the webhook payload. # Verify webhook requests Source: https://docs.nomos.energy/webhooks/verify-requests Reject forged and replayed webhook deliveries before they reach your handlers. Anyone can `POST` to a public URL. Without verification, you can't tell a real Nomos delivery from a forged one, and an intercepted payload could be replayed against you later. To prevent this, every webhook is signed with a secret tied to your endpoint and stamped with the time it was sent. Check both before acting on the event. > [!NOTE] > > Each webhook endpoint has its own signing secret. Find it on the endpoint's > detail page in the [Nomos dashboard](https://dashboard.nomos.energy/developer) > under **Developer → Webhooks**. **1. Parse the header** Each request includes an `X-Nomos-Signature` header: ``` t=1768473000,v1=3523dcc0013f08dfa1855772441107330218793f399d7452bd3ff2159c6e0285 ``` * `t`: Unix timestamp (seconds) when Nomos sent the request. * `v1`: HMAC-SHA256 of `${t}.${rawBody}`, hex-encoded, signed with your endpoint's secret. Pull `t` and `v1` out of the header. **2. Reject stale timestamps** If `t` is more than 5 minutes off your clock, treat it as a replay and stop. **3. Recompute the signature** Run `HMAC-SHA256(${t}.${rawBody}, secret)` using your stored signing secret and the raw request body, byte-for-byte. **4. Compare the signatures** Compare your computed value to `v1` and reject if they differ. Use a timing-safe helper (like Node's `timingSafeEqual`) instead of `===`, so an attacker can't learn the signature from how long the comparison takes. ## Example ```ts Node theme={null} import crypto from "node:crypto"; export function verifyWebhook( rawBody: string, header: string, secret: string, ): boolean { const { t, v1 } = Object.fromEntries( header.split(",").map((p) => p.split("=")), ); if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; const hmac = crypto.createHmac("sha256", secret); const expected = hmac.update(`${t}.${rawBody}`).digest("hex"); if (v1.length !== expected.length) return false; return crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected)); } ``` ```python Python theme={null} import hashlib import hmac import time def verify_webhook(raw_body: bytes, header: str, secret: str) -> bool: parts = dict(p.split("=") for p in header.split(",")) t, v1 = int(parts["t"]), parts["v1"] if abs(time.time() - t) > 300: return False expected = hmac.new( secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256, ).hexdigest() return hmac.compare_digest(v1, expected) ``` Pass the request body before any JSON parsing. Re-serializing a parsed body can change whitespace or key order, which breaks the signature.