# Wisnots Netzanmeldung API v2, full text The overview and every operation of https://www.wisnots.com/netz-api/v2/openapi.json, in one file. The index is https://www.wisnots.com/netz-api/v2/llms.txt. ## Overview ## What v2 is A second contract over the same cases as v1. Same host, same keys, same planes, same rate limit and the same problem documents; a case made through v1 reads through v2 under the same id, and the other way round. v1 is being retired: new integrations build on v2, and v1's reference stays at https://www.wisnots.com/en/netzanmeldung/api/v1 for those already on it. v2 adds the installer firms you file for (businesses), one list of what a case needs (`open[]`), events that carry their subject, and billing. ## Keys and planes `Authorization: Bearer wnz_test_…` is the sandbox, `wnz_live_…` is live: the prefix is the whole switch, on one host, https://netz-api.wisnots.com. Keys are made in the console at https://www.wisnots.com/netzanmeldung/portal under Developers. The id of a case, a business or a document says its plane (`anm_` and `anm_test_`, `biz_` and `biz_test_`, `doc_` and `doc_test_`), and an id of the other plane is a 404 (a 422 naming the field where a body names a document), so a key pointed at the wrong plane fails on the first id. A live key is refused from a browser: keys belong on a server. ## The flow 1. `POST /v2/cases` with the installation's `type` and what you hold in `declared`. Always a draft (it reads `needs_input` or `ready`): nothing is filed until you submit it. 2. `POST /v2/cases/{id}/documents` for each document, as a file or a text. 3. Wait for `case.documents_read`, or poll the case until `status` leaves `extracting`. Where the reader itself fails, it tries again, three runs over about an hour and a half; what it still could not read then reads `unreadable`, and the event comes as for any reading. 4. Answer the blocking items of `open[]`: `PATCH` the path in `resolve.field`, or send a document with `resolves` set to the item's `code`. 5. `POST /v2/cases/{id}/submit`. The case is Wisnots' now, and its credit is taken. 6. Follow `status`, `stage` and the events. What the grid operator asks later comes back into `open[]` and is answered the same way. `GET /v2/requirements` says what a type asks before any case exists: the field dictionary, at the paths `declared` takes, and the documents our checklist asks for. ## Installation types `type` is one of `pv`, `storage`, `heat_pump`, `charge_point`, `air_conditioning`, and one case is one installation. What one connection holds is one registration with the grid operator and one credit, on a condition: a further case with the same `external_ref`, on the same account and plane, for the same business, site and end customer (a battery beside PV, a wallbox or a heat pump as well), handed over while the first case has not reached the grid operator, is filed with that one and costs no credit, and `group` on each says so. One handed over once the first has reached the operator, or after it was archived, is a registration and a credit of its own. On the sandbox the first case reaches the sandbox operator inside its submit at the default `instant` pace, so a second case handed over after it is its own registration. To rehearse a pair, submit the first with `sandbox_pace: staged` and the second within about four seconds, before the staged walk takes the first to `submitted`. ## Open items `open[]` is the one list of what a case still needs, before hand-over and after. Each item has a stable `code`, words to show (`text`, `help`), who is expected to know it (`owner`), whether it stops the case (`blocking`), where it stands (`state`), who asks (`source`) and how it is answered (`resolve`). The portal login an installer must hand in is the item `portal_login`, answered on the page in `resolve.url` or in the embedded frame, never through your systems. ## When the grid operator asks for more There is no request object in v2. What the operator asks after hand-over stands in `open[]` with `source: grid_operator` and its `due_by`, and is answered like any item: a PATCH of the asked path, or a document whose `resolves` names the asked item (a text it asks for is sent as a text document). An answer needs no submit. Each answered item reads `in_review`; once everything the request requires is on the case, the answer goes to the operator on its own. A value the request does not ask for is a 422 naming it in `errors`, and while an answer is on its way, a further one is a 409 `case_already_filed`. With nothing asked (no request open and no MaStR question), any PATCH of a handed-over case is a 409 `case_already_filed` too. Each item asked for this way carries `asked_at`, when it was asked, and `note`, our note on what is asked: the text the installer was sent with it, the same on every item asked with it, to show above them. Where that wording is the grid operator's own, `note` is null: the operator's own words are not passed on. Both are null on every other item. ## Businesses A platform filing for many installer firms keeps each as a business: `POST /v2/businesses` with your own `external_ref` for it. A case names it in `business_id`, and takes its installer details from the business wherever the case does not declare its own. Its registrations with grid operators decide which one a case is filed with. Its `status` is computed: `restricted` while something stops one of its cases (`requirements`: a registration or a login missing at an operator), `deactivated` once you deactivate it. Its logins are handed in by the business itself, on the page `POST /v2/businesses/{id}/access-links` gives you or in the embedded frame; `GET /v2/businesses/{id}/logins` says where each stands, and never more. v1's `installer_ref` and a business are the same firm. ## Events and webhooks One event shape everywhere: `{ object: "event", id, type, created_at }` with its subject (`case`, `business` or `invoice`) as it stands when the event is read, and what the event says itself (`stage`, `requirements`, `requirement`). A webhook delivers it, `GET /v2/events` pages through all of them, and `GET /v2/cases/{id}/events` through one case's. Register a v2 endpoint with `POST /v2/webhooks`; v1's endpoints stay v1's and receive v1's events. An event's `id` is an opaque string, the same in `Wisnots-Event-Id`, the feed and the case's log, with no prefix and no plane in it. A delivery reads its case under the requirements surface of the key that made the endpoint, as of each sending, the same as that key's GET, feed and case log; an endpoint made in the console, or before 2026-11-12, reads under the default surface. In a page of the feed or of a case's log, a case that could not be read whole carries `commissioning` and `mastr` as null: read it with `GET /v2/cases/{id}`. `case.status_changed` can repeat a status and a stage, `case.updated` is the one signal of several changes (a cancelled number of the grid operator's among them), and `case.requirements_updated` does not tell every optional item: what each event says is under Webhooks. **Delivery is at least once.** Every delivery carries `Wisnots-Event-Id`; key on it. Verify the signature before you trust a delivery, exactly as on v1: ``` Wisnots-Signature: t=1788770000,v1= ``` The MAC is over `${t}.${raw body}` with the endpoint's secret, shown once when the endpoint is made. Parse the body after verifying, and reject a `t` more than five minutes from now. A delivery your endpoint does not answer with a 2xx within ten seconds is tried again: five attempts in all, at 0 s, 10 s, 1 min, 3 min and 10 min after the one before, the last about 14 minutes after the first. One whose case cannot be read on our side fails the same way (`last_error` says so); one whose subject is gone stops silently. Twenty events in a row that exhaust their attempts disable the endpoint, which `GET /v2/webhooks` then shows (`active: false`, `last_error`). ## Billing A case costs one credit per installation, taken when it is submitted (`billing` on the case). Credit is bought ahead, in packages: `GET /v2/invoices` lists one invoice per purchase, never one per month, and `GET /v2/invoices/{id}/pdf` hands over the PDF. `GET /v2/usage` says what a calendar month's cases took, per business and per installation type, to reconcile with your own customers. On a sandbox key a case's `billing` reads as live would (`billed: true` and `billed_at` once it is submitted) and no credit is taken; usage counts the sandbox cases as what they would have been billed, and there are no invoices. ## After the registration A case goes on after the grid operator's yes, whatever its `type`: every installation reports its commissioning. `case.commissioning` says where the commissioning report stands; while it is due, `open[]` holds `commissioning_report` (answered on the page in `resolve.url`, or with `POST /v2/cases/{id}/commissioning`) and, optional, the evidence `commissioning.meter_photo`, `commissioning.e8` and `commissioning.protocol`: a file sent with that `resolves` joins the report's slot at once. `case.commissioning_reported` follows the report. Then `case.mastr` says where the registration in the Marktstammdatenregister stands, for a case with PV. What it still asks stands in `open[]` with `phase: mastr`: a PATCH of `resolve.field` answers it, also on a handed-over case; an item with an empty `resolve` is ours to settle. Only an item you can answer is `blocking` and holds the release (a 409 `case_incomplete` names it); an item `owner: wisnots` never does, even where a path takes it. `POST /v2/cases/{id}/mastr/submit` records your customer's release, and `case.mastr_registered` carries the register's numbers once it took the case. A step asked for before its time is a 409 `not_due`. ## The case's record `case.references` lists the grid operator's numbers for the case as they arrive (its case number, an offer's, the customer's, a completion notice's), each told by `case.reference_added`. A number the operator cancelled, or one corrected, stays on the list with `cancelled_at`; one cancelled with none in its place is told by `case.updated` alone. A handed-over case the grid operator has not decided on is withdrawn with `POST /v2/cases/{id}/withdraw` and a `reason`: we record it (`case.withdrawal`, `case.withdrawal_requested`), a person withdraws it with the operator, and the case reads `withdrawn`. Its credit stays spent. A draft is deleted instead. `case.last_activity_at` says when something last happened on the case; `case.stale` tells you once it has been quiet for ten days, until something happens again. Once the commissioning is reported, `case.mastr.due_by` and the `due_by` of each MaStR item say the last day to register: one month after the commissioning day. A case created at the site and of the `type` of an open case of yours carries `duplicate_of` naming that case, told by `case.duplicate_detected`. Nothing is merged: delete or withdraw what you made twice. The same `Idempotency-Key` sent again returns the first case instead. ## Embedded components Our forms can stand in your own product, as a frame on our origin: the installer answers what a case still needs, hands a draft over, reports commissioning and releases the MaStR registration without leaving your page, and your page never holds your key. 1. **List your pages.** In the console under Developers, Connect, Embed, "Pages allowed to embed components" holds the pages your frames may appear on, per plane: an origin each, scheme and host with no path (`https://app.example.com`), up to 20. Until one is listed, minting refuses every page with a 403 `origin_not_allowed`. A sandbox key also takes `http://localhost` and `http://127.0.0.1` on any port, listed or not. 2. **Mint a session on your server.** `POST /v2/cases/{id}/embed-sessions` or `POST /v2/businesses/{id}/embed-sessions` with your key, the page as `origin`, the `components` it shows, and `platform_name`, your product's name as your users know it. The answer carries `client_secret`, this once. 3. **Load our loader on that page**, `/netz-embed/v2/embed.js`, with `fetchClientSecret`: a function that asks your server for a fresh session and returns its `client_secret`. ```html
``` **Your server's part** is one route the page calls. It mints a session with your key and answers the `client_secret` alone, as plain text. Mint only for a case or business the signed-in user of your page may act on, found in your own records: the secret opens that case to whoever holds it, so a case id taken from the browser would open any case of your account. ```js // Node 18 or later. The key stays on your server. const API = 'https://netz-api.wisnots.com'; const headers = { Authorization: `Bearer ${process.env.NETZ_API_KEY}`, 'Content-Type': 'application/json', }; const api = (path, body) => fetch(API + path, { method: body ? 'POST' : 'GET', headers, body: body && JSON.stringify(body), }).then((r) => r.json()); app.post('/netz-session', async (req, res) => { // From your own records, for the signed-in user: // never a case id the browser sends. const id = await yourCaseFor(req.user, req.query.project); if (!id) return res.sendStatus(403); const path = `/v2/cases/${encodeURIComponent(id)}`; const { status } = await api(path); const draft = ['extracting', 'needs_input', 'ready'].includes(status); const session = await api(`${path}/embed-sessions`, { // The page, as listed in the console. origin: 'https://app.example.com', components: draft ? ['case', 'upload'] : ['case'], // Your product, as your users know it. platform_name: 'Example', }); // The secret alone, never logged, never in a URL. res.type('text/plain').send(session.client_secret); }); ``` **What a session shows.** A case session shows `case`, the case whole: what it still needs from the installer (`open[]`, a field answered in place, a document by upload), its documents and history (from the second question asked after hand-over on, the earlier ones with when each was answered), the commissioning report and the MaStR release. It shows the case's record as v2 says it: the grid operator's numbers, the deadlines, the end customer's signature, a withdrawal you asked for. A closed case, or one whose withdrawal you asked for, asks the installer for nothing; the frame offers no withdrawal, which is yours (`POST /v2/cases/{id}/withdraw`). On a draft it may show `registration`, the first intake with our checklist, or `upload`, the same draft as one short form, each with its hand-over; `components` is `["case"]` when left out. A business session names its components: `registrations` (the business's cases, each opened in place: those waiting for the business first while there are any, beside those running, those closed and those archived in the console, and a search by end customer, site or `external_ref`; a business without any case edits its address and registrations there), `new-registration` (a new case of the business, or one per installation type chosen, with its documents and its hand-over and the grid operator looked up from the site's address), `firm-data` (the business's details and registrations, and its logins at the grid operators, typed in place) and `hint` (one line saying how many of its cases wait for the business). **Which components to mint.** A session acts only as far as the components it was minted with. To take a draft through the whole process in one frame, mint `["case", "upload"]` (or `["case", "registration"]`) and create the frame as that form, `netz.create('upload')`: it is the form until the hand-over and the whole case after it, with the commissioning report and the MaStR release. Once a case is handed over (`status` `submitted`, `confirmed`, `rejected` or `withdrawn`), mint `["case"]`: a draft's form on it is refused (422 naming `components`). The loader asks your server again whenever a session ends, so decide by the case's `status` each time, as the example above does. A business session holds what its page shows, for example `["registrations", "new-registration", "hint"]` for a list with its own "Start a registration" and the hint line. **The loader.** `/netz-embed/v2/embed.js` defines `window.WisnotsNetz`: - `WisnotsNetz.loadEmbeds({ fetchClientSecret, appearance, locale })` starts one instance for the page. `fetchClientSecret` (required) is an async function that returns a fresh `client_secret` from your server; it is called at the start and again whenever a session ends. `appearance` is optional (see Appearance below). `locale` is `de` (the default) or `en`. - `netz.create(component, options)` returns the element to place in your page, for one of the session's components. A case session's components take no options; the others take the options below. - `netz.update({ appearance, locale })` changes the look or the language of every component of the instance at once, without a reload. **Each component's options**, as `netz.create(component, options)` takes them: - `case`, `registration`, `upload`: none. - `registrations`: `onRowClick: { target: '/projects/{reference}#netz' }` opens your own page for a row's project instead of the case in the frame. `onNewClick` is a path of yours for "Start a registration", or `'replace'` to open `new-registration` in the frame (the session must hold it); left out, there is no such button. `filter` is a v2 status the list opens on. - `new-registration`: `project` is what you already hold of the project, every part optional, in v2's names: `{ reference, type, types, site: { street, house_number, postal_code, city }, end_customer: { first_name, last_name, email, phone }, description }`. `types`, a list of v2 types, makes one case per type, all under `reference` (a PV system and its battery are two cases, which the MaStR registration pairs by that reference). `onComplete` is your own act once the cases are made (the frame then shows nothing more); left out, the frame shows the new case, or the new cases to open one by one. - `firm-data`: none. Logins are typed in place (see below). - `hint`: `onClick: { case: '/projects/{reference}#netz', list: '/registrations' }`; pressed, the line leads to `case` when it counts one case and to `list` otherwise. Or a function that receives `{ count, cases, external_refs }`. Without a target for what it counts, it draws nothing. `scope: 'case'` with `case` (an id or your reference) counts that one case only. `{reference}` is the case's `external_ref`, your own reference for the project, never the grid operator's numbers in `case.references`. **Events.** Every element takes handlers, each returning the element so they chain, and also dispatches each as a `netz:` CustomEvent with the same `detail`: - `setOnLoaded` (`netz:loaded`): the frame is ready. - `setOnSubmitted` (`netz:submitted`): a draft was handed over; `{ case, status }`. - `setOnChange` (`netz:change`): the frame swapped its content, `{ to }`; scroll the element into view. - `setOnOpen` (`netz:open`): a row of the list was opened; `{ case, reference }`. - `setOnComplete` (`netz:complete`): a new registration was made, once each of its cases is decided; `{ case, filed, cases }`: `case` and `filed` of the first case, `cases` every case made as `{ case, type, filed }`. - `setOnLoginSaved` (`netz:loginSaved`): a login was saved in the frame (or on our access page) and its status moved; `{ operator, status }`, never the login itself. - `setOnHint` (`netz:hint`): the hint line was pressed; `{ count, cases, external_refs }`. - `setOnLoadError` (`netz:loadError`): the frame cannot show; `{ code, message }`. `client_secret` when `fetchClientSecret` gave no secret; `frame_unavailable` when our frame loaded but did not answer within 15 seconds (usually a Content Security Policy without `frame-src` for our site); the frame's own refusals such as `unauthenticated` or `origin_not_allowed`. **Appearance.** The frame takes your product's colours, font, sizes and spacing. Pass them as `appearance.variables` to `loadEmbeds`, or later to `update`: ```js const netz = WisnotsNetz.loadEmbeds({ fetchClientSecret, appearance: { variables: { colorPrimary: '#0f766e', fontFamily: 'Inter, sans-serif', borderRadius: '6px', }, fonts: [{ cssSrc: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap', }], }, }); ``` - `colorPrimary`, a colour (default `#2563eb`): buttons, links, the selected tab, focus rings. - `colorBackground`, a colour (`#ffffff`): the frame's surface. - `colorText`, a colour (`#1f2328`): text; the case and list views derive their greys and hairlines from it and the background. - `colorTextSecondary`, a colour (`#5c6670`): secondary text and hints. - `colorBorder`, a colour (`#d8dde3`): borders of fields and cards. - `colorDanger`, a colour (`#c42b1c`): errors and refused values. - `colorSuccess`, a colour (`#1a7f45`): confirmations. - `fontFamily`, family names (the system font): all text. - `fontSizeBase`, a length (`15px`): the base size every text scales from. - `borderRadius`, a length (`8px`): corners of buttons, fields and cards. - `spacingUnit`, a length (`4px`): the unit every gap is a multiple of. A colour is `#rgb`, `#rrggbb` or `#rrggbbaa`, `rgb()`, `rgba()`, `hsl()`, `hsla()`, or `transparent`. Family names are letters, digits, spaces, commas, quotes and hyphens, up to 200 characters, as in `'Inter, sans-serif'`. A length is a number with `px`, `rem` or `em`, as in `15px`. `fonts` loads up to three stylesheets that declare your font faces, each an https URL (Google Fonts or your own); name the family in `fontFamily` as well. A value that does not take its form, an unknown name and a font URL that is not https are left out without an error, and the default stands: if a colour does not show, check its form. Only these variables reach the frame. It runs on our origin, so your page's CSS does not apply inside it and there is no option for CSS of your own. Whatever you set, the text on primary buttons stays white (choose a `colorPrimary` dark enough for white text), the badges of the sandbox and of warnings keep their amber, and the frame draws in a light colour scheme: a dark `colorBackground` with a light `colorText` works, but the browser's own date and select controls stay light. **Logins are typed in the frame.** Where a case or the business needs a login at a grid operator, the frame takes it in place: `firm-data` for any grid operator, a case only for its own grid operator while it asks for one. What is typed goes from our frame to our server only and is encrypted there at once: it never reaches your page or your server, and no route or event returns it. The frame then shows the status per grid operator that `GET /v2/businesses/{id}/logins` reports. Your page holds the frame: a script on it could draw a look-alike form over the frame, so keep third-party scripts off the pages that show it. A firm you serve without the frame hands its logins in on its own page, which `POST /v2/businesses/{id}/access-links` gives. **The frame acts through this API.** Every write goes through v2's own rules, as a call of yours would: a PATCH, a document, the hand-over (with its credit, and `case_incomplete` while something blocking is open), the commissioning report, the MaStR release, a change to the business's details in `firm-data`, or of its address and registrations in `registrations` before its first case (told by `business.updated`), a login typed in the frame (taken as one handed in on the access page, under the same daily limit), and the cases a `new-registration` form creates, one per installation type, each with its own copy of the files it staged, each read and held as a likely repeat on its own, and billed as one connection is billed (see Installation types: under one `reference`, for one site and end customer, one registration and one credit). A new registration that likely repeats an open case of the same business (`duplicate_of`) is not handed over until the installer confirms it in the frame: until then it stays a draft, and nothing is billed. Nor is a hand-over in the frame judged while the case's documents are still being read: the frame waits for the reading, then hands it over, so a refusal names only what the reading left open. A draft's own hand-over in `registration` or `upload` is not held: it hands over, with the note beside its button. Each write is recorded as your integration acting for a person on your page, named `Einbettung · ` (your key's prefix where you gave no name) in our log of your account: an edit, a document, the new case, the hand-over, the commissioning report and the MaStR release; and the frame is named as who handed the case over and released the MaStR registration. Minting a session is a row of the log too, by the key. **The secret is a credential.** `client_secret` is a full bearer credential for its session: mint it on your server, hand it only to our frame through `fetchClientSecret`, never log it and never put it in a URL. It ends 30 minutes after minting, and sooner when you revoke the key that minted it, remove its page from the list or deactivate the business. Ended or revoked, it answers 401 and the loader calls `fetchClientSecret` again, so mint a fresh session on every call; a removed page (403 `origin_not_allowed`) or a deactivated business (409 `business_inactive`) ends the frame for good, with no new call. A case takes 200 new sessions at once and a business 1,000, each refilled continuously at that many every 30 minutes; past that, 429 `rate_limited` with `Retry-After`. Every request of the frame must come from the session's page: a secret copied to another page drives no frame there (403 `origin_not_allowed`). **Your signals are v2's webhooks.** The frame tells your server nothing of its own. What the registration needs of the installer is an item of `open[]`, announced by `case.requirements_updated`; a hand-over is `case.submitted`, the grid operator's answers are `case.status_changed`, then come `case.commissioning_reported` and `case.mastr_registered`. The items of the commissioning and of the MaStR registration are not named by `case.requirements_updated`: they come and go with those events (and a PATCH's `case.updated`), so read `open[]` on each. Subscribe with `POST /v2/webhooks` as for any case. **On the sandbox** a test key mints with `sandbox_outcome` and `sandbox_pace`, as `POST /v2/cases/{id}/submit` takes them: what a hand-over in the frame rehearses. The pace is `staged` when left out, since a person is watching. If your page sends a Content Security Policy, allow https://www.wisnots.com in `script-src` and `frame-src`. ## Lists, cursors and ids Every list is `{ object: "list", data, has_more, next_cursor }`. Send `next_cursor` back as `cursor` with the same filters; `limit` is 1 to 100, 20 when left out. A cursor is opaque and bound to its list, its filters and its plane. Every resource carries `object`. The `id` of a case, a business, a document or a webhook endpoint says its plane; an invoice's (`inv_`) is live only, and an event's is an opaque string with no plane in it. ## Errors A refusal is an RFC 9457 problem document (`application/problem+json`): `code` from a closed list, the field to branch on; `detail` for a person; and on a 422 every refused value at once in `errors[]`, each with its `path`. An unknown body field or query parameter is refused by name, never ignored: a query parameter on a route that takes none is a 422 naming it (`unknown_field`) before the route acts. Inside `declared` nothing is ignored either, and a value that cannot be used is no 422: a path that is no field or a field of another type, a value that does not read as its type or breaks what its field's schema allows, and a field sent with its numbered twin under two values are each listed in the case's `rejected` with the reason, and where `open[]` has an item at that path, it reads `rejected` with the same `reason`; the case is created or changed with the rest. A `device.category` other than the case's `type` is a 422. v2 adds `business_not_found` (404), `business_inactive` (409) and `business_exists` (409, with the holder's id in `business`), `not_due` (409, a step asked for before its time or once it is done), `mastr_refused` (422), `origin_not_allowed` (403, a page not on your list for embedded components) and `no_business` (409, a case that files for no business has no access page) to v1's codes. A path that is no route is a 404. ## Idempotency and retries `POST /v2/cases` takes an `Idempotency-Key`: the same key with the same body returns the first case, never a second. A 429 did nothing and is safe to send again after `Retry-After` seconds. A read is always safe to retry; a write other than a create with its key may have happened before a timeout, so read before you send it again. ## The sandbox A `wnz_test_` key. Nothing reaches a grid operator, the Marktstammdatenregister or your customer: the sandbox plays them, through the code a live case runs, so the statuses, stages, `open[]` items and events you meet are those a live case can produce. A sandbox case takes no credit, though its `billing` reads as live would (`billed: true`, `billed_at`), unless the account set a ceiling under Sandbox credit in the console, past which a submit is a 402 `no_credits` as live; fixtures (`{"fixture": "pv-invoice-de"}` as a document) are read at no cost and the same every time, and 25 real documents per account in any 24 hours are read for real (a 429 with `Retry-After` beyond, a document answering an item after the hand-over among them); what the sandbox writes itself, a test case's commissioning report and a test helper's answer, needs no reading and is not counted. Sandbox cases are deleted after 30 days. Keys come from the console, or, without an account, as a fixtures-only key for seven days from `POST /v1/sandbox-keys` with `{"email": …}`: a key works on both versions. **The answer.** On `POST /v2/cases/{id}/submit`, `sandbox_outcome` (`accepted`, `rejected`, `needs_more_information`) chooses the grid operator's answer and `sandbox_pace` its pace: `instant` inside the call, or `staged` a few seconds apart. At either, `case.status_changed` tells `ready` at the hand-over, `submitted` as the filing reaches the operator, then the answer, as a live case moves; a question tells `submitted` once more, and `case.requirements_updated` what it asks. At `instant` the answer is given before the submit returns, so a test helper's yes or no comes too late; submit at `staged` to answer it yourself. Left out, the answer is the one the site's postcode names, else `accepted`; chosen, the case keeps it, and the staged walk and `advance` give it over the postcode's. While you have asked to withdraw the case, the sandbox operator gives no answer: it withdraws it. The yes is `approved`, from which the commissioning report is due, then for PV the MaStR registration, which the rehearsed register answers with numbers no real unit has. **Scenarios by postcode.** No real postcode begins with `00`, so a test case's site postcode chooses a scenario: `00` + the scenario's two digits + its variant. Every `00` postcode is the fictional operator `sandbox`'s, with no register asked; every other postcode, and a `00` one not listed, plays the happy path. - `00010`: the standard case: approval, the commissioning report, the MaStR registration, then `completion_filed`, `completion_confirmed` and `completed`, each only through `advance`: no timer moves them. - `00011`: the same, with `metering_pending` before `completed`. - `00041`: the grid operator asks during its review: `open[]` holds what it asks with `source: grid_operator`, `blocked` is true and `status` stays `submitted`; answered, the case is approved. - `00042`: the grid operator asks once `advance` has filed the completion notice, with the sandbox operator's one request (`documents.vollmacht`, then `device.installed_at`): `stage` stays `completion_filed` and `status` stays `confirmed`, and answered, the case goes on from there. - `00050`: the grid operator gives the case its numbers as it goes: a case number once it is submitted, an offer number with the approval, a completion notice number once that is filed and a customer number once it is confirmed, each a `case.reference_added`. - `00080`: the completion notice is cancelled and filed again. Its number comes once `advance` has filed it; then the sandbox operator asks its one request (`documents.vollmacht`, then `device.installed_at`; no item asks for an address), and answered, cancels the notice's number (`cancelled_at`) and gives a new one. - `00131`: a PV case's MaStR registration, registered before its deadline: `mastr.due_by` (and each MaStR item's `due_by`) is one month after the commissioning day, `registered_at` before it. - `00132`: the same, registered on the last day: the rehearsed register answers at once, time compressed, and `registered_at` reads as that day, `due_by`. - `00140`: you create the same case twice (same site, same `type`): the second carries `duplicate_of` and `case.duplicate_detected`, as live. - `00150`: the grid operator rejects the application. - `00170`: nothing happens on the case after its last event: `case.stale` fires a minute or two later, where a live case waits ten days, and `last_activity_at` says since when. - `00200`: submitted with `sandbox_pace: staged`, you withdraw it while the grid operator considers it (`POST /v2/cases/{id}/withdraw`): the sandbox operator withdraws it a few seconds later, or now through `advance`, gives no answer meanwhile, and it reads `withdrawn`. - `00210`: the sandbox names two grid operators for the site: `open[]` holds `grid_operator_unclear` with the one you can choose. It blocks nothing, and nothing on the sandbox settles it for you: only a `PATCH` of `operator`, or the `resolve` test helper on a draft, sets it. **Test helpers** skip a wait or force a situation, on a test key only (a live key is a 403 `forbidden_scope`). They play what happens outside your platform (the grid operator, the register, Wisnots' own steps), and `resolve` also answers an item as whoever owes it would, your platform's own among them (the commissioning report, the business's portal login). Each answers with the case: - `POST /v2/test_helpers/cases/{id}/advance`: the next step now; on a draft that only the grid operator's own questions hold (`requirements.operator_outstanding`, under a key of the universal surface), Wisnots' answers to them. What the case waits for from you is a 409 `not_due` naming it. - `POST /v2/test_helpers/cases/{id}/grid_operator_reply` with `{"type": "approved"}`, `"rejected"` or `"query"`. - `POST /v2/test_helpers/cases/{id}/requirements/{code}/resolve`: an open item answered as its owner would. - `POST /v2/test_helpers/webhooks/{event}`: the newest such event, sent again to your sandbox v2 endpoints (it answers with the event). **Test inputs**, at any address: a portal login `expired@test.wisnots.com` is refused by the sandbox operator's portal (the business's login reads `invalid`, and `business.login_required` follows), and while it is the one held, a case's filing waits at `ready`, unanswered, as nobody files it live, and goes on once a login the portal takes is handed in; any other login is taken; a missing one holds no filing, and is told as live tells it, so you can rehearse the ask: `login_missing` at that operator among the business's `requirements`, the business `restricted`, and `business.login_required`; a document whose file name contains `unreadable` is read as `unreadable` without a model call, yet counts as one of the 25 real documents in 24 hours; an end customer `complete@test.wisnots.com` reads `signed` a minute after a signature request (`signature.state`), which a case has only where Wisnots filled the operator's form before the hand-over: a case made through the API alone has none, and its `signature` stays null. ## Limits - Rate: 60 requests in a burst per key, refilled at one a second; a 429 with `Retry-After` beyond. - Documents: one per request, a file up to 20 MB (20,000,000 bytes, a 413 `material_too_large` above), a request up to 20 MiB as a whole (refused before it is read), a text up to 100,000 characters, 30 files per case. - Declared: 256 KB per request. ## Versioning The path carries `/v2`. Within v2 we add fields, event types and enum values and never rename or remove one. v1 still works beside it, over the same cases, but is being retired: build on v2. Every change is listed below. ## Changes - 2026-11-15: `note` and `asked_at` on every item of `open[]`. An item asked for after hand-over says when it was asked, and carries our note on what is asked, the text the installer was sent with it; `note` is null where that wording is the grid operator's own, and both are null on every other item. - 2026-11-16: the embedded components (the loader and the frame; no route of the API changes). `new-registration` takes `project.types` and makes one case per type, and `complete` carries `cases` beside `case` and `filed`; logins are typed in the frame (`firm-data`, and a case for its own grid operator); the list has an Archiv tab and, before a business's first case, edits its address and registrations; the case lists its earlier questions. ## Operations ### POST /v2/cases Open a case A draft of one installation, by its `type`. Always a draft, whatever it carries: it costs nothing until it is submitted. Send what you already hold in `declared`, the business in `business_id`, and the documents afterwards. Opened with a site address, the case looks up its grid operator itself. ### GET /v2/cases List cases Your cases on the key's plane, newest first, each as `GET /v2/cases/{id}` reads it. `status` is judged on each page as read, so a page under it may hold fewer than `limit` cases, even none, while `has_more` says to go on; so may a page under `business_id` and `external_ref` together, where the reference is selected and the business judged on the page. A case that could not be read whole is listed with `commissioning` and `mastr` null: read it with `GET /v2/cases/{id}`. ### GET /v2/cases/{id} Read a case The case as it stands now. ### PATCH /v2/cases/{id} Change a case Declared values, the operator, the business. On a draft, anything of the case; after hand-over, the answer to what is asked: the grid operator's request, or the MaStR registration's questions (see the request body). An answer to a request needs no submit: once everything the request requires is on the case, it goes to the operator on its own, and the answered items read `in_review` until then. ### DELETE /v2/cases/{id} Delete a draft A draft and everything on it. A handed-over case cannot be deleted. ### POST /v2/cases/{id}/documents Send a document One document per request: a file as `multipart/form-data`, or a text as JSON. Reading starts at once; the case is `extracting` until it is read, and `case.documents_read` follows. Name the item it answers in `resolves`. On a draft, any document. After hand-over, only the answer to a document or text item the grid operator asks for, named in `resolves`, or, while the commissioning report is due, a file for one of its slots (`resolves` `commissioning.meter_photo`, `.e8` or `.protocol`), which joins the report at once; anything else is a 409 `case_already_filed` (`not_due` for a slot while no report is due), refused before a byte is stored. A document the case refuses is a 422 naming `file` in `errors`: `too_many` (the case holds 30 files), `too_large`, `too_short` (an empty file) or `not_allowed` (a format it does not take). On the sandbox, 25 real documents are read per account in any 24 hours (a 429 beyond, with `Retry-After`: the seconds until enough of them age out), fixtures without limit; the self-serve sandbox key takes fixtures only. ### POST /v2/cases/{id}/submit Submit a case Hands the case to Wisnots, who files it with the grid operator, and takes its credit. 202: what happens next (the signature, the operator's answer) is told by `status`, `stage` and the events. A case with something blocking open is a 409 `case_incomplete`, and so is one whose grid operator's own questions are unanswered (`requirements.operator_outstanding`): under a key of the universal surface Wisnots is told and answers those, the case then reads `ready` (`case.updated`) and the submit goes through, and on the sandbox `POST /v2/test_helpers/cases/{id}/advance` answers them now. Without credit, a 402. On the sandbox, `sandbox_outcome` and `sandbox_pace` choose the operator's answer and its pace; a sandbox case takes no credit, and `billing` reads as live would (`billed`, `billed_at`), unless the account set a ceiling under Sandbox credit in the console, past which the submit is the 402 a live one would be. ### POST /v2/cases/{id}/withdraw Withdraw a handed-over case Asks Wisnots to withdraw the application from the grid operator, after the hand-over and before the operator decided. 202 with the case, its `withdrawal` `requested`, and `case.withdrawal_requested`: a person withdraws it with the operator, and the case reads `withdrawn` once they did (`case.status_changed`). Nothing goes out by itself. A draft reached nobody and is deleted instead (`DELETE /v2/cases/{id}`): 409 `not_due`, as for a case the operator approved or rejected. A second call answers the case as it is. The case's credit stays spent: it was billed at the hand-over. On a sandbox key the sandbox operator withdraws it a few seconds later, or now through `advance`. ### GET /v2/requirements What a case asks Before any case exists: the field dictionary for the installation types asked, merged by path, and the documents our checklist asks for. Build forms and mappings from it; a path not in it is refused. With `operator`, an operator-aware key also sees that operator's own fields. ### POST /v2/cases/{id}/commissioning Report the commissioning Sends the case's commissioning report through the same body as the console and the page the approval mail links: the same rules, the same move of the case, the same facts on it. 202, as `/submit` answers: the report is Wisnots' now, and the completion notice filed from it is told by `stage` and the events; `case.commissioning_reported` follows. A 409 `not_due` unless the case awaits its report, also once it was sent. ### POST /v2/cases/{id}/mastr/submit Release the MaStR registration Records your customer's release of the registration in the Marktstammdatenregister. Wisnots registers it then, each unit, PV and storage, on its own (`mastr.devices`), and `case.mastr_registered` says when the register took the last, with the numbers in `mastr.units`. 202, as `/submit` answers; a second call answers the case as it is. A 409 `not_due` before the commissioning is reported or where the register does not apply, a 409 `case_incomplete` while a MaStR item you can answer is open (each named: the items of `phase: mastr` that are `blocking`), a 422 `mastr_refused` where the register's form does not hold the case. What Wisnots settles (`owner: wisnots`, never `blocking`) holds the registration back, never the release. On a sandbox key the rehearsed register answers, with numbers no real unit has. ### POST /v2/businesses Add a business An installer firm you file for. Its details fill the installer on its cases wherever a case does not declare its own, and its registrations decide which one a case is filed with. An `external_ref` already held, by a business or by a v1 `installer_ref`, is a 409 `business_exists` naming that business. ### GET /v2/businesses List businesses Your businesses on the key's plane, newest first. `status` is computed, so it is judged on each page as read: a page may hold fewer than `limit` while `has_more` says to go on. ### GET /v2/businesses/{id} Read a business The business, its status and what stops its cases. ### PATCH /v2/businesses/{id} Change a business Its details and the registrations it holds. Its drafts follow; a handed-over case keeps what it was filed with. ### POST /v2/businesses/{id}/deactivate Deactivate a business No new case may name it, through either version (409 `business_inactive` here, 422 on v1's `installer_ref`); its cases go on. No body. ### GET /v2/businesses/{id}/logins A business's logins Its portal login status at each grid operator of its cases and each it holds a login at, all at once. A status, never a login: no name, password or hint is in any response, event or log. ### POST /v2/businesses/{id}/access-links The business's login page The link to send the business, where it hands in its grid operator logins. The same link every time until our team revokes it, so 200. No body. Whoever holds the link can hand in logins, so each call is a row of our log of your account, as the API key's act, as taking it in the console is as the person's. ### POST /v2/cases/{id}/embed-sessions A session for a case's frame A session for the embedded components on one page of yours, showing this case: call it from your server and hand `client_secret` to the page, which never holds your key. The frame writes through this API's own rules, each write an act of your integration named `Einbettung · ` in our log of your account. The page must be one of your account's for this plane; a draft's forms need a draft. A case whose business is deactivated takes none. ### POST /v2/businesses/{id}/embed-sessions A session for a business's frame A session for the embedded components on one page of yours, showing this business: its cases, a new registration, its details, or the hint line, by `components`. Its logins at the grid operators are typed in the frame (`firm-data`) and reach only our server. A deactivated business takes none. ### GET /v2/events Every event Every event v2 tells of on the key's plane, about your cases and your account (businesses, invoices), oldest first, each with its subject as it stands now. Poll it instead of a webhook, or to catch up on what one missed: keep `next_cursor` and send it back as `cursor`. `since` says where a first call starts; with neither, the first event. An event appears here about five seconds after it happens, once nothing written before it can still arrive, and the cursor never runs out: `next_cursor` is always a string, and on an account with no events yet it points at the start, so the next poll returns everything since. ### GET /v2/cases/{id}/events A case's events The case's own log in v2's names, oldest first, each event as a webhook delivers it. The cursor never runs out: with nothing new, `next_cursor` stands where you stood, and sent later it gives what came since. ### POST /v2/webhooks Register an endpoint An endpoint told of v2's events in v2's shape, on the key's plane, signed. **The secret comes back once, here.** Left without `types`, it is told of every event v2 has when it is made; an event added later reaches it only once you register it again. ### GET /v2/webhooks Your endpoints Every v2 endpoint on the key's plane, newest first, all at once, with enough delivery state to tell a silent endpoint from an idle one. Never the secret. v1's endpoints are listed on v1. ### DELETE /v2/webhooks/{id} Remove an endpoint Deliveries stop at once. ### GET /v2/usage Credits used in a month How many credits your cases took in a calendar month in Europe/Berlin, and how many cases, in total, per business and per installation type. A case counts in the month it was submitted (a case submitted at 23:30 UTC on 31 October counts in November). Under a sandbox key, the sandbox cases: what they would have been billed. ### GET /v2/invoices Your invoices Your account's invoices, newest first: one per purchase of credits, whatever became of the payment, and none per month, because credit is bought ahead. Whoever on the account bought them, so a team member's key reads the same. A sandbox key reads an empty list: the sandbox spends no money. ### GET /v2/invoices/{id}/pdf An invoice's PDF The invoice as Stripe has it now, as a download named as Stripe numbers it (`Rechnung .pdf`). Never cached. ### POST /v2/test_helpers/cases/{id}/advance Play a test case's next step Plays the case's next step now, skipping its wait. On a draft, Wisnots' own step before the hand-over: under a key of the universal surface, the grid operator's own required questions, which `open[]` leaves out and `requirements.operator_outstanding` counts, answered as Wisnots would answer them (the first option of a choice, today for a date, `Sandbox` for a text), once nothing else holds the draft; it then reads `ready` (`case.updated`), and the submit is yours. An operator-aware key sees those questions in `open[]` and answers them itself. On a handed-over case: a withdrawal you asked for, withdrawn with the grid operator; the grid operator's answer (the one the submit chose, else the one its scenario names, the filing reaching `submitted` first), the register's answer to a released MaStR registration, or, after the commissioning report, the next stage of its scenario (`completion_filed`, `completion_confirmed`, `metering_pending` where it has it, `completed`). What the case waits for from you, the values a draft still owes, an item the grid operator asks for, a portal login the operator's portal refused, the commissioning report, the MaStR release before the case closes, is never played: a 409 `not_due` names it. No body. ### POST /v2/test_helpers/cases/{id}/grid_operator_reply Reply as the grid operator The grid operator's yes or no while the case waits for its answer, or a query at any point after the hand-over while no request is open. A yes is `approved`, from which the commissioning report is due; a query stands in `open[]` with `source: grid_operator` and is answered like any item. Not while you have asked to withdraw the case, which the sandbox operator withdraws instead, nor while a refused portal login holds the filing: a 409 `not_due` says which. At the default `instant` pace the submit itself gave the answer, so a later yes or no is a 409 `not_due`; submit with `sandbox_pace: staged` to reply while the case waits. The reply answers it now, and the staged steps still to come find it answered and do nothing. ### POST /v2/test_helpers/cases/{id}/requirements/{code}/resolve Answer an item as its owner would Answers an open item through the route its owner answers it by: an item the grid operator asks for (a value at its path, today for a date, or a short text of the sandbox's own, which needs no reading and is not one of the 25 real documents a day, so the answer goes on at once), `grid_operator_unclear` on a draft (the operator it offers), `portal_login` (the login `valid@test.wisnots.com`, handed in through the business's own page) and `commissioning_report` (built as registered, commissioned today). Any other item is yours to send: a 422 naming `code` says how. No body. ### POST /v2/test_helpers/webhooks/{event} Send an event again Delivers the newest event of that name on the sandbox again to each of your sandbox v2 endpoints told of it, signed as every delivery is, with the same `Wisnots-Event-Id`. A real event, never a made-up one: play a case to it first. `invoice.created` never happens on the sandbox (it tells only of what is bought live), so it is a 404 there. 202 with the event as delivered. No body.