{
  "openapi": "3.1.0",
  "info": {
    "title": "Wisnots Netzanmeldung API v2",
    "version": "2.0.0",
    "summary": "Register an installation with the responsible grid operator, for your own firm or for the installer firms you serve.",
    "description": "## What v2 is\n\nA 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.\n\n## Keys and planes\n\n`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.\n\n## The flow\n\n1. `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.\n2. `POST /v2/cases/{id}/documents` for each document, as a file or a text.\n3. 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.\n4. Answer the blocking items of `open[]`: `PATCH` the path in `resolve.field`, or send a document with `resolves` set to the item's `code`.\n5. `POST /v2/cases/{id}/submit`. The case is Wisnots' now, and its credit is taken.\n6. Follow `status`, `stage` and the events. What the grid operator asks later comes back into `open[]` and is answered the same way.\n\n`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.\n\n## Installation types\n\n`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.\n\nOn 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`.\n\n## Open items\n\n`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.\n\n## When the grid operator asks for more\n\nThere 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.\n\nEach 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.\n\n## Businesses\n\nA 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.\n\n## Events and webhooks\n\nOne 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.\n\nA 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.\n\n**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:\n\n```\nWisnots-Signature: t=1788770000,v1=<hex hmac-sha256>\n```\n\nThe 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`).\n\n## Billing\n\nA 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.\n\n## After the registration\n\nA 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.\n\nThen `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`.\n\n## The case's record\n\n`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.\n\nA 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.\n\n`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.\n\nOnce 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.\n\nA 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.\n\n## Embedded components\n\nOur 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.\n\n1. **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.\n2. **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.\n3. **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`.\n\n```html\n<script src=\"https://www.wisnots.com/netz-embed/v2/embed.js\"></script>\n<div id=\"netz\"></div>\n<script>\n  const netz = WisnotsNetz.loadEmbeds({\n    fetchClientSecret: async () => {\n      const r = await fetch('/netz-session', { method: 'POST' });\n      return r.text();\n    },\n  });\n  const frame = netz.create('case');\n  document.querySelector('#netz').appendChild(frame);\n</script>\n```\n\n**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.\n\n```js\n// Node 18 or later. The key stays on your server.\nconst API = 'https://netz-api.wisnots.com';\nconst headers = {\n  Authorization: `Bearer ${process.env.NETZ_API_KEY}`,\n  'Content-Type': 'application/json',\n};\nconst api = (path, body) =>\n  fetch(API + path, {\n    method: body ? 'POST' : 'GET',\n    headers,\n    body: body && JSON.stringify(body),\n  }).then((r) => r.json());\n\napp.post('/netz-session', async (req, res) => {\n  // From your own records, for the signed-in user:\n  // never a case id the browser sends.\n  const id = await yourCaseFor(req.user, req.query.project);\n  if (!id) return res.sendStatus(403);\n  const path = `/v2/cases/${encodeURIComponent(id)}`;\n  const { status } = await api(path);\n  const draft =\n    ['extracting', 'needs_input', 'ready'].includes(status);\n  const session = await api(`${path}/embed-sessions`, {\n    // The page, as listed in the console.\n    origin: 'https://app.example.com',\n    components: draft ? ['case', 'upload'] : ['case'],\n    // Your product, as your users know it.\n    platform_name: 'Example',\n  });\n  // The secret alone, never logged, never in a URL.\n  res.type('text/plain').send(session.client_secret);\n});\n```\n\n**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).\n\n**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.\n\n**The loader.** `/netz-embed/v2/embed.js` defines `window.WisnotsNetz`:\n\n- `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`.\n- `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.\n- `netz.update({ appearance, locale })` changes the look or the language of every component of the instance at once, without a reload.\n\n**Each component's options**, as `netz.create(component, options)` takes them:\n\n- `case`, `registration`, `upload`: none.\n- `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.\n- `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.\n- `firm-data`: none. Logins are typed in place (see below).\n- `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.\n\n`{reference}` is the case's `external_ref`, your own reference for the project, never the grid operator's numbers in `case.references`.\n\n**Events.** Every element takes handlers, each returning the element so they chain, and also dispatches each as a `netz:<event>` CustomEvent with the same `detail`:\n\n- `setOnLoaded` (`netz:loaded`): the frame is ready.\n- `setOnSubmitted` (`netz:submitted`): a draft was handed over; `{ case, status }`.\n- `setOnChange` (`netz:change`): the frame swapped its content, `{ to }`; scroll the element into view.\n- `setOnOpen` (`netz:open`): a row of the list was opened; `{ case, reference }`.\n- `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 }`.\n- `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.\n- `setOnHint` (`netz:hint`): the hint line was pressed; `{ count, cases, external_refs }`.\n- `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`.\n\n**Appearance.** The frame takes your product's colours, font, sizes and spacing. Pass them as `appearance.variables` to `loadEmbeds`, or later to `update`:\n\n```js\nconst netz = WisnotsNetz.loadEmbeds({\n  fetchClientSecret,\n  appearance: {\n    variables: {\n      colorPrimary: '#0f766e',\n      fontFamily: 'Inter, sans-serif',\n      borderRadius: '6px',\n    },\n    fonts: [{\n      cssSrc: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap',\n    }],\n  },\n});\n```\n\n- `colorPrimary`, a colour (default `#2563eb`): buttons, links, the selected tab, focus rings.\n- `colorBackground`, a colour (`#ffffff`): the frame's surface.\n- `colorText`, a colour (`#1f2328`): text; the case and list views derive their greys and hairlines from it and the background.\n- `colorTextSecondary`, a colour (`#5c6670`): secondary text and hints.\n- `colorBorder`, a colour (`#d8dde3`): borders of fields and cards.\n- `colorDanger`, a colour (`#c42b1c`): errors and refused values.\n- `colorSuccess`, a colour (`#1a7f45`): confirmations.\n- `fontFamily`, family names (the system font): all text.\n- `fontSizeBase`, a length (`15px`): the base size every text scales from.\n- `borderRadius`, a length (`8px`): corners of buttons, fields and cards.\n- `spacingUnit`, a length (`4px`): the unit every gap is a multiple of.\n\nA 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`.\n\n`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.\n\n**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.\n\n**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 · <platform_name>` (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.\n\n**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`).\n\n**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.\n\n**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`.\n\n## Lists, cursors and ids\n\nEvery 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.\n\n## Errors\n\nA 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.\n\n## Idempotency and retries\n\n`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.\n\n## The sandbox\n\nA `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.\n\n**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.\n\n**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.\n- `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.\n- `00011`: the same, with `metering_pending` before `completed`.\n- `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.\n- `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.\n- `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`.\n- `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.\n- `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.\n- `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`.\n- `00140`: you create the same case twice (same site, same `type`): the second carries `duplicate_of` and `case.duplicate_detected`, as live.\n- `00150`: the grid operator rejects the application.\n- `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.\n- `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`.\n- `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.\n\n**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:\n- `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.\n- `POST /v2/test_helpers/cases/{id}/grid_operator_reply` with `{\"type\": \"approved\"}`, `\"rejected\"` or `\"query\"`.\n- `POST /v2/test_helpers/cases/{id}/requirements/{code}/resolve`: an open item answered as its owner would.\n- `POST /v2/test_helpers/webhooks/{event}`: the newest such event, sent again to your sandbox v2 endpoints (it answers with the event).\n\n**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.\n\n## Limits\n\n- Rate: 60 requests in a burst per key, refilled at one a second; a 429 with `Retry-After` beyond.\n- 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.\n- Declared: 256 KB per request.\n\n## Versioning\n\nThe 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.\n\n## Changes\n\n- 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.\n\n- 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.",
    "contact": {
      "name": "Wisnots",
      "url": "https://wisnots.com"
    }
  },
  "servers": [
    {
      "url": "https://netz-api.wisnots.com",
      "description": "The API, for both planes: the key decides which."
    }
  ],
  "tags": [
    {
      "name": "Cases",
      "description": "One installation's registration, from the draft to the hand-over. Open it by `type`, fill it with `declared` values and documents until `open[]` holds nothing blocking, and submit it. The same cases v1 serves: a case made through either version reads through both."
    },
    {
      "name": "Businesses",
      "description": "The installer firms you file for. A business's details fill its cases' installer, its registrations decide which one a case is filed with, and its logins at the grid operators are handed in by the business itself, through its own link or in the embedded frame, never through your systems."
    },
    {
      "name": "Events and webhooks",
      "description": "One event shape everywhere: a webhook, the feed and a case's log carry the same objects, each with its case, business or invoice as it stands when read. A case that leaves your account sends no event about it: deleted (a draft you discard, or a case we remove at your request), it answers 404 from then on and its events leave your feed; handed to another account by us, it leaves yours the same way. A case we archive (put away from our own lists) reads and moves as before; only `case.stale` is not told for it."
    },
    {
      "name": "Billing",
      "description": "Credits used per month, and the invoices for the credits bought."
    },
    {
      "name": "Commissioning and MaStR",
      "description": "What follows the grid operator's yes: the commissioning report and the registration in the Marktstammdatenregister."
    },
    {
      "name": "Embedded components",
      "description": "Our forms in your own page, for a case or a business: your server makes a session with its key, your page shows our frame with the session's secret, and the frame works through this API's rules. Only on pages your account lists."
    },
    {
      "name": "Sandbox",
      "description": "Test helpers, on a `wnz_test_` key only: what happens outside your platform (the grid operator, the register, Wisnots' own steps) played now on a test case, and an item answered as whoever owes it would, your platform's own commissioning report and the business's portal login among them, through the code a live case goes through."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v2/cases": {
      "post": {
        "operationId": "createCase",
        "summary": "Open a case",
        "description": "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.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "The same key with the same body returns the case the first call made, rather than a second one; with another body it is a 409 `idempotency_conflict`. Keys are kept for 24 hours and are shared with v1's create routes. A key over 200 characters is a 422 naming `Idempotency-Key` (`too_long`), and nothing is created."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCaseRequest"
              },
              "examples": {
                "draft": {
                  "$ref": "#/components/examples/CreateCase"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The draft.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "draft": {
                    "$ref": "#/components/examples/CaseDraft"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "`business_id` names no business of this key's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "409": {
            "description": "The business is deactivated, or the `Idempotency-Key` was used with another body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_inactive",
              "idempotency_conflict"
            ]
          },
          "413": {
            "description": "A request over 20 MiB as a whole, which is refused before it is read.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "material_too_large"
            ]
          },
          "415": {
            "description": "A form was sent; documents go to `POST /v2/cases/{id}/documents`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation": {
                    "$ref": "#/components/examples/ProblemValidation"
                  }
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      },
      "get": {
        "operationId": "listCases",
        "summary": "List cases",
        "description": "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}`.",
        "parameters": [
          {
            "name": "business_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only this business's cases."
          },
          {
            "name": "external_ref",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only cases with this `external_ref`."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "extracting",
                "needs_input",
                "ready",
                "submitted",
                "confirmed",
                "rejected",
                "withdrawn"
              ]
            },
            "description": "Only cases at this status."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Items per page, from 1 to 100 (20 when left out). A number outside that is a 422 naming `limit` (`out_of_range`), and anything but a whole number is one too (`wrong_type`)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `next_cursor` of the page before, with the same filters. A cursor of another list, other filters or the other plane, or one changed by hand, is a 422 naming `cursor`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of cases.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      }
    },
    "/v2/cases/{id}": {
      "get": {
        "operationId": "getCase",
        "summary": "Read a case",
        "description": "The case as it stands now.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "200": {
            "description": "The case as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "needs_input": {
                    "$ref": "#/components/examples/CaseNeedsInput"
                  },
                  "answering": {
                    "$ref": "#/components/examples/CaseAnswering"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      },
      "patch": {
        "operationId": "patchCase",
        "summary": "Change a case",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchCaseRequest"
              },
              "examples": {
                "answer": {
                  "$ref": "#/components/examples/PatchCase"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The case as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "needs_input": {
                    "$ref": "#/components/examples/CaseNeedsInput"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case, or `business_id` names no business of this key's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found",
              "business_not_found"
            ]
          },
          "409": {
            "description": "The case was handed over and nothing on it asks for a value, an answer is already on its way, or the business is deactivated.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "case_already_filed",
              "business_inactive"
            ]
          },
          "413": {
            "description": "A request over 20 MiB as a whole, which is refused before it is read.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "material_too_large"
            ]
          },
          "415": {
            "description": "A form was sent; documents go to `POST /v2/cases/{id}/documents`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unasked": {
                    "$ref": "#/components/examples/ProblemUnasked"
                  }
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      },
      "delete": {
        "operationId": "deleteCase",
        "summary": "Delete a draft",
        "description": "A draft and everything on it. A handed-over case cannot be deleted.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "The case was handed over.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "case_already_filed"
            ]
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      }
    },
    "/v2/cases/{id}/documents": {
      "post": {
        "operationId": "addDocument",
        "summary": "Send a document",
        "description": "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`.\n\nOn 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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/DocumentForm"
              },
              "encoding": {
                "file": {
                  "contentType": "application/pdf, image/jpeg, image/png, image/webp, image/heic, text/plain"
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentText"
              },
              "examples": {
                "text": {
                  "$ref": "#/components/examples/DocumentTextAnswer"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The document, as the case now lists it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Document"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "The case was handed over and asks for no such document, or no commissioning report is due.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "case_already_filed",
              "not_due"
            ]
          },
          "413": {
            "description": "A file over 20 MB (20,000,000 bytes), or a request over 20 MiB as a whole, which is refused before it is read.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "material_too_large"
            ]
          },
          "415": {
            "description": "A file that is not a PDF, JPEG, PNG, WebP or HEIC, nor plain text sent as `text/plain`, named.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "The sandbox's 25 real documents of the last 24 hours are read; `Retry-After` says in how many seconds one more fits. Fixtures are still read.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "rate_limited"
            ],
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      }
    },
    "/v2/cases/{id}/submit": {
      "post": {
        "operationId": "submitCase",
        "summary": "Submit a case",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The case, handed over.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "needs_input": {
                    "$ref": "#/components/examples/CaseNeedsInput"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "402": {
            "description": "No credits left on the account; on the sandbox, past the ceiling the account set under Sandbox credit.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "no_credits"
            ]
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "Something blocking is still open, or the case was handed over already.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "case_incomplete",
              "case_already_filed"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      }
    },
    "/v2/cases/{id}/withdraw": {
      "post": {
        "operationId": "withdrawCase",
        "summary": "Withdraw a handed-over case",
        "description": "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`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The case, its withdrawal requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "requested": {
                    "$ref": "#/components/examples/CaseWithdrawalRequested"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "A draft (delete it), or a case the grid operator decided, or that closed, before you asked to withdraw it. Once you asked, a further call is a 202 with the case as it is, withdrawn or not.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      }
    },
    "/v2/requirements": {
      "get": {
        "operationId": "getRequirements",
        "summary": "What a case asks",
        "description": "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.",
        "parameters": [
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "pv,storage",
            "description": "Installation types, comma-separated. Left out, every type."
          },
          {
            "name": "operator",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
            },
            "description": "A grid operator's key."
          }
        ],
        "responses": {
          "200": {
            "description": "What the types ask.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Requirements"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Requirements"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Cases"
        ]
      }
    },
    "/v2/cases/{id}/commissioning": {
      "post": {
        "operationId": "reportCommissioning",
        "summary": "Report the commissioning",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommissioningRequest"
              },
              "examples": {
                "report": {
                  "$ref": "#/components/examples/ReportCommissioning"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The case, its report sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "reported": {
                    "$ref": "#/components/examples/CaseCommissioned"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "The case does not await its report, or it was sent already.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "The report lacks what it must hold, or a value was refused; each named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Commissioning and MaStR"
        ]
      }
    },
    "/v2/cases/{id}/mastr/submit": {
      "post": {
        "operationId": "releaseMastr",
        "summary": "Release the MaStR registration",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MastrSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The case, released.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                },
                "examples": {
                  "registered": {
                    "$ref": "#/components/examples/CaseMastrRegistered"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "Not its turn, the register does not apply, or a MaStR item you can answer is still open.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due",
              "case_incomplete"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused, or the register's form does not hold the case.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "mastr_refused",
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Commissioning and MaStR"
        ]
      }
    },
    "/v2/businesses": {
      "post": {
        "operationId": "createBusiness",
        "summary": "Add a business",
        "description": "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.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBusinessRequest"
              },
              "examples": {
                "business": {
                  "$ref": "#/components/examples/CreateBusiness"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The business.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Business"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Business"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "description": "A business with this `external_ref` exists; its id is in `business`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_exists"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      },
      "get": {
        "operationId": "listBusinesses",
        "summary": "List businesses",
        "description": "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.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "restricted",
                "deactivated"
              ]
            },
            "description": "Only businesses at this status."
          },
          {
            "name": "external_ref",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The business with this `external_ref`."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Items per page, from 1 to 100 (20 when left out). A number outside that is a 422 naming `limit` (`out_of_range`), and anything but a whole number is one too (`wrong_type`)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `next_cursor` of the page before, with the same filters. A cursor of another list, other filters or the other plane, or one changed by hand, is a 422 naming `cursor`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of businesses.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      }
    },
    "/v2/businesses/{id}": {
      "get": {
        "operationId": "getBusiness",
        "summary": "Read a business",
        "description": "The business, its status and what stops its cases.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The business id, `biz_…` live or `biz_test_…` in the sandbox. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "200": {
            "description": "The business.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Business"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Business"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      },
      "patch": {
        "operationId": "patchBusiness",
        "summary": "Change a business",
        "description": "Its details and the registrations it holds. Its drafts follow; a handed-over case keeps what it was filed with.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The business id, `biz_…` live or `biz_test_…` in the sandbox. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchBusinessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The business.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Business"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      }
    },
    "/v2/businesses/{id}/deactivate": {
      "post": {
        "operationId": "deactivateBusiness",
        "summary": "Deactivate a business",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The business id, `biz_…` live or `biz_test_…` in the sandbox. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "200": {
            "description": "The business, `deactivated`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Business"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      }
    },
    "/v2/businesses/{id}/logins": {
      "get": {
        "operationId": "listBusinessLogins",
        "summary": "A business's logins",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The business id, `biz_…` live or `biz_test_…` in the sandbox. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "200": {
            "description": "The business's logins.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginList"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Logins"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      }
    },
    "/v2/businesses/{id}/access-links": {
      "post": {
        "operationId": "createBusinessAccessLink",
        "summary": "The business's login page",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The business id, `biz_…` live or `biz_test_…` in the sandbox. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "200": {
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessLink"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Businesses"
        ]
      }
    },
    "/v2/cases/{id}/embed-sessions": {
      "post": {
        "operationId": "createCaseEmbedSession",
        "summary": "A session for a case's frame",
        "description": "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 · <platform_name>` 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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCaseEmbedSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The session, with its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "`origin` is not one of your account's pages for embedded components on this plane; under a live key a page on localhost never is.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "forbidden_scope",
              "origin_not_allowed"
            ]
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "The case's business was deactivated.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_inactive"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "200 new sessions were minted on this case, or 1,000 on this business, faster than they refill (that many every 30 minutes), or too many requests were sent with this key: wait `Retry-After` seconds; no session was made.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "rate_limited"
            ],
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Embedded components"
        ]
      }
    },
    "/v2/businesses/{id}/embed-sessions": {
      "post": {
        "operationId": "createBusinessEmbedSession",
        "summary": "A session for a business's frame",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The business id, `biz_…` live or `biz_test_…` in the sandbox. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBusinessEmbedSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The session, with its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "`origin` is not one of your account's pages for embedded components on this plane; under a live key a page on localhost never is.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "forbidden_scope",
              "origin_not_allowed"
            ]
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "409": {
            "description": "The business was deactivated.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_inactive"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "200 new sessions were minted on this case, or 1,000 on this business, faster than they refill (that many every 30 minutes), or too many requests were sent with this key: wait `Retry-After` seconds; no session was made.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "rate_limited"
            ],
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Embedded components"
        ]
      }
    },
    "/v2/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Every event",
        "description": "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.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Items per page, from 1 to 100 (20 when left out). A number outside that is a 422 naming `limit` (`out_of_range`), and anything but a whole number is one too (`wrong_type`)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `next_cursor` of the page before, with the same filters. A cursor of another list, other filters or the other plane, or one changed by hand, is a 422 naming `cursor`."
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Where a first call starts, an ISO 8601 time, inclusive. Not with `cursor`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Events"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Events and webhooks"
        ]
      }
    },
    "/v2/cases/{id}/events": {
      "get": {
        "operationId": "listCaseEvents",
        "summary": "A case's events",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Items per page, from 1 to 100 (20 when left out). A number outside that is a 422 naming `limit` (`out_of_range`), and anything but a whole number is one too (`wrong_type`)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `next_cursor` of the page before, with the same filters. A cursor of another list, other filters or the other plane, or one changed by hand, is a 422 naming `cursor`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Events and webhooks"
        ]
      }
    },
    "/v2/webhooks": {
      "post": {
        "operationId": "createWebhook",
        "summary": "Register an endpoint",
        "description": "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.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The endpoint, with its secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Events and webhooks"
        ]
      },
      "get": {
        "operationId": "listWebhooks",
        "summary": "Your endpoints",
        "description": "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.",
        "responses": {
          "200": {
            "description": "The endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Events and webhooks"
        ]
      }
    },
    "/v2/webhooks/{id}": {
      "delete": {
        "operationId": "deleteWebhook",
        "summary": "Remove an endpoint",
        "description": "Deliveries stop at once.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The endpoint id, `we_…` live or `we_test_…` in the sandbox. An id of the other plane, or a v1 endpoint, is a 404."
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such endpoint.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "422": {
            "$ref": "#/components/responses/Invalid"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Events and webhooks"
        ]
      }
    },
    "/v2/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Credits used in a month",
        "description": "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.",
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
            },
            "example": "2026-11",
            "description": "`YYYY-MM`. Left out, the month it now is in Berlin."
          },
          {
            "name": "business_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only this business."
          }
        ],
        "responses": {
          "200": {
            "description": "The month.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Usage"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such business on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "business_not_found"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Billing"
        ]
      }
    },
    "/v2/invoices": {
      "get": {
        "operationId": "listInvoices",
        "summary": "Your invoices",
        "description": "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.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Items per page, from 1 to 100 (20 when left out). A number outside that is a 422 naming `limit` (`out_of_range`), and anything but a whole number is one too (`wrong_type`)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `next_cursor` of the page before, with the same filters. A cursor of another list, other filters or the other plane, or one changed by hand, is a 422 naming `cursor`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceList"
                },
                "examples": {
                  "example": {
                    "$ref": "#/components/examples/Invoices"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Billing"
        ]
      }
    },
    "/v2/invoices/{id}/pdf": {
      "get": {
        "operationId": "getInvoicePdf",
        "summary": "An invoice's PDF",
        "description": "The invoice as Stripe has it now, as a download named as Stripe numbers it (`Rechnung <number>.pdf`). Never cached.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The invoice id, `inv_…`."
          }
        ],
        "responses": {
          "200": {
            "description": "The PDF.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                },
                "description": "`attachment`, with the file's name."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No such invoice of this account's.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "description": "Stripe did not hand the file over. Try again shortly.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "internal"
            ]
          }
        },
        "tags": [
          "Billing"
        ]
      }
    },
    "/v2/test_helpers/cases/{id}/advance": {
      "post": {
        "operationId": "advanceTestCase",
        "summary": "Play a test case's next step",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "responses": {
          "200": {
            "description": "The case as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "A live key: test helpers are the sandbox's own. Or the key lacks the `netz` scope.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "forbidden_scope"
            ]
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "Nothing for the sandbox to play now: the case waits for you, or is closed. `detail` says which.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Sandbox"
        ]
      }
    },
    "/v2/test_helpers/cases/{id}/grid_operator_reply": {
      "post": {
        "operationId": "replyAsGridOperator",
        "summary": "Reply as the grid operator",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GridOperatorReplyRequest"
              },
              "examples": {
                "rejected": {
                  "$ref": "#/components/examples/GridOperatorRejects"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The case as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "A live key: test helpers are the sandbox's own. Or the key lacks the `netz` scope.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "forbidden_scope"
            ]
          },
          "404": {
            "description": "No such case on this key's plane.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "Nothing for the sandbox to play now: the case waits for you, or is closed. `detail` says which.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Sandbox"
        ]
      }
    },
    "/v2/test_helpers/cases/{id}/requirements/{code}/resolve": {
      "post": {
        "operationId": "resolveTestRequirement",
        "summary": "Answer an item as its owner would",
        "description": "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.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The case id, `anm_…` live or `anm_test_…` in the sandbox: the same id v1 uses. An id of the other plane is a 404."
          },
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The item's `code`, as `open[]` lists it."
          }
        ],
        "responses": {
          "200": {
            "description": "The case as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "A live key: test helpers are the sandbox's own. Or the key lacks the `netz` scope.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "forbidden_scope"
            ]
          },
          "404": {
            "description": "No such case on this key's plane, or no item of that `code` open on it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "The item is answered already, or not to be answered now.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "An item the sandbox does not answer for you, or a field of the body; named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Sandbox"
        ]
      }
    },
    "/v2/test_helpers/webhooks/{event}": {
      "post": {
        "operationId": "sendTestWebhook",
        "summary": "Send an event again",
        "description": "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.",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "case.created",
                "case.updated",
                "case.status_changed",
                "case.requirements_updated",
                "case.documents_read",
                "case.submitted",
                "case.commissioning_reported",
                "case.mastr_registered",
                "case.reference_added",
                "case.withdrawal_requested",
                "case.stale",
                "case.duplicate_detected",
                "business.created",
                "business.updated",
                "business.deactivated",
                "business.login_required",
                "invoice.created"
              ]
            },
            "description": "A v2 event's name."
          }
        ],
        "responses": {
          "202": {
            "description": "The event, on its way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "description": "A live key: test helpers are the sandbox's own. Or the key lacks the `netz` scope.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "forbidden_scope"
            ]
          },
          "404": {
            "description": "No such event name, no such event on the sandbox yet, or one it never has (`invoice.created`).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_found"
            ]
          },
          "409": {
            "description": "No sandbox v2 endpoint is told of it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "not_due"
            ]
          },
          "415": {
            "description": "A form was sent; this route takes JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "A value was refused; each one is named in `errors`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "x-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          }
        },
        "tags": [
          "Sandbox"
        ]
      }
    }
  },
  "webhooks": {
    "case.created": {
      "post": {
        "operationId": "onCaseCreated",
        "summary": "case.created",
        "description": "A case exists. Always the first event of a case, whichever version opened it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.created"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.updated": {
      "post": {
        "operationId": "onCaseUpdated",
        "summary": "case.updated",
        "description": "Declared values landed, from a create or a PATCH, the operator was settled, or the end customer's signature was recorded (`signature.state` `signed`). Also when our team edits the case, when a wait for the business's portal login ends, when the case's `group` changes (filed with another, or on its own again), when a number of the grid operator's is cancelled with none in its place, which no other event tells (`references`, `cancelled_at`), and when the register took one unit of the case before the last, or its numbers reached us later (`mastr.devices`, `mastr.units`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.updated"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.status_changed": {
      "post": {
        "operationId": "onCaseStatusChanged",
        "summary": "case.status_changed",
        "description": "The case's stage changed, also where its `stage.code` stays the same (several of our stages share a code, `ready` and `submitted` among them), and when we added a note to the case's timeline without moving it; v2 carries no note. So a status and a stage can come twice in a row: a question of the grid operator's tells `submitted` once more, as the case waits for its answer. A submit tells `ready` (the hand-over), then `submitted` as the filing reaches the operator, then the answer; on the sandbox all three before the call returns at `sandbox_pace: instant`, a few seconds apart at `staged`. `stage` is the stage the case moved to, as it was then; `case` is as it stands now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.status_changed"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.requirements_updated": {
      "post": {
        "operationId": "onCaseRequirementsUpdated",
        "summary": "case.requirements_updated",
        "description": "Items of the registration came into `open[]`, left it, or changed state, the grid operator's requests among them, also one the sandbox operator asks inside an `instant` submit, which its 202 lists as well; `requirements` names them by code. An answered item is `changed` to `in_review` while its answer is with us and `resolved` once the answer has gone to the operator, told once where both come a moment apart. It watches the items that block, that carry a `code`, that are not `open`, and those a request of the grid operator's asks for: an optional item coming or going before the hand-over may go untold, so read `open[]` itself where you need all of it. The commissioning's items (`phase: commissioning`) and the MaStR registration's (`phase: mastr`) are not named here: they come and go with `case.status_changed`, `case.commissioning_reported`, `case.updated` and `case.mastr_registered`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.requirements_updated"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.documents_read": {
      "post": {
        "operationId": "onCaseDocumentsRead",
        "summary": "case.documents_read",
        "description": "Nothing is left to read: the fields are worth reading now.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.documents_read"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.submitted": {
      "post": {
        "operationId": "onCaseSubmitted",
        "summary": "case.submitted",
        "description": "The case was handed to Wisnots, and its credit taken.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.submitted"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.commissioning_reported": {
      "post": {
        "operationId": "onCaseCommissioningReported",
        "summary": "case.commissioning_reported",
        "description": "The commissioning report went out, once per report, whether from the console, the approval mail's page, the API, or recorded by us where the installer sent it by mail or phone. `case.commissioning` says when the installation went into operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.commissioning_reported"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.mastr_registered": {
      "post": {
        "operationId": "onCaseMastrRegistered",
        "summary": "case.mastr_registered",
        "description": "The Marktstammdatenregister took the case, once: every unit of it, PV and storage (`case.mastr.devices`), however we registered each (on a sandbox key, the rehearsed register). A unit registered before the last is a `case.updated`. `case.mastr.units` carries the numbers where we have them, each by its unit.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.mastr_registered"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.reference_added": {
      "post": {
        "operationId": "onCaseReferenceAdded",
        "summary": "case.reference_added",
        "description": "The grid operator gave the case a number: its own case number, an offer's, the customer's or a completion notice's. `reference` names it; `case.references` lists them all.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.reference_added"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.withdrawal_requested": {
      "post": {
        "operationId": "onCaseWithdrawalRequested",
        "summary": "case.withdrawal_requested",
        "description": "You asked to withdraw the case, and we recorded it: `case.withdrawal` reads `requested`. `case.status_changed` to `withdrawn` follows once it is withdrawn with the grid operator.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.withdrawal_requested"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.stale": {
      "post": {
        "operationId": "onCaseStale",
        "summary": "case.stale",
        "description": "Nothing happened on the case for ten days, also while the grid operator considers it, and it is not closed (`completed`, `rejected`, `withdrawn`) or archived by us. Once per quiet spell: the next event starts the count again. `case.last_activity_at` says since when.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.stale"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "case.duplicate_detected": {
      "post": {
        "operationId": "onCaseDuplicateDetected",
        "summary": "case.duplicate_detected",
        "description": "The case just created is likely an open case of yours again: the same site and the same `type`. `duplicate_of` names that case. Nothing is merged or held. A replay of the same `Idempotency-Key` returns the first case and is no duplicate.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CaseEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "case.duplicate_detected"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "business.created": {
      "post": {
        "operationId": "onBusinessCreated",
        "summary": "business.created",
        "description": "A business exists: added through v2, or named by a v1 case's `installer_ref`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BusinessEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "business.created"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "business.updated": {
      "post": {
        "operationId": "onBusinessUpdated",
        "summary": "business.updated",
        "description": "Its details or registrations changed: through your PATCH, the embedded `firm-data`, or our team adding or removing a registration from a document (only where that changes `registrations`; `updated_at` moves with it).",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BusinessEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "business.updated"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "business.deactivated": {
      "post": {
        "operationId": "onBusinessDeactivated",
        "summary": "business.deactivated",
        "description": "It was deactivated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BusinessEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "business.deactivated"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "business.login_required": {
      "post": {
        "operationId": "onBusinessLoginRequired",
        "summary": "business.login_required",
        "description": "Its login at a grid operator of an open case is missing or stopped working. `requirement` names the operator and what it asks. Told once per move, however many cases it holds up; send the business its access link.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BusinessEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "business.login_required"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    },
    "invoice.created": {
      "post": {
        "operationId": "onInvoiceCreated",
        "summary": "invoice.created",
        "description": "A purchase of credits was paid, and its invoice is there.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WisnotsSignature"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventId"
          },
          {
            "$ref": "#/components/parameters/WisnotsEventType"
          },
          {
            "$ref": "#/components/parameters/WisnotsDeliveryAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/InvoiceEvent"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "const": "invoice.created"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or none within ten seconds, is a failed attempt, tried again: five attempts in all, the last about 14 minutes after the first."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "`wnz_live_…` live, `wnz_test_…` the sandbox: the same keys as v1, made in the console under Developers."
      }
    },
    "responses": {
      "Unauthenticated": {
        "description": "No key, or not a valid one.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "x-codes": [
          "unauthenticated"
        ]
      },
      "Forbidden": {
        "description": "The key does not carry the `netz` scope, or a live key was sent from a browser.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "x-codes": [
          "forbidden_scope"
        ]
      },
      "RateLimited": {
        "description": "Too many requests on this key. Wait `Retry-After` seconds; nothing of the request was done.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "x-codes": [
          "rate_limited"
        ],
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait."
          }
        }
      },
      "Invalid": {
        "description": "A value was refused; each one is named in `errors`.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "x-codes": [
          "validation_failed"
        ]
      },
      "Internal": {
        "description": "Something went wrong on our side. Safe to retry a read, or a create with its `Idempotency-Key`.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        },
        "x-codes": [
          "internal"
        ]
      }
    },
    "parameters": {
      "WisnotsSignature": {
        "name": "Wisnots-Signature",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256>` over `${t}.${raw body}` with the endpoint's secret."
      },
      "WisnotsEventId": {
        "name": "Wisnots-Event-Id",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The event's `id`. Delivery is at least once: key on it."
      },
      "WisnotsEventType": {
        "name": "Wisnots-Event-Type",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The event's `type`, in v2's name."
      },
      "WisnotsDeliveryAttempt": {
        "name": "Wisnots-Delivery-Attempt",
        "in": "header",
        "required": true,
        "schema": {
          "type": "integer"
        },
        "description": "1 for the first attempt, counting up on each retry, to 5 for the last."
      }
    },
    "schemas": {
      "Localised": {
        "type": "object",
        "description": "A short string in both languages. Display only; never a contract value.",
        "properties": {
          "de": {
            "type": "string"
          },
          "en": {
            "type": "string"
          }
        },
        "required": [
          "de",
          "en"
        ]
      },
      "Evidence": {
        "type": "object",
        "description": "Where an extracted value was read from. The quote is a verbatim span of the extracted document text, so a caller can show their own user the sentence behind a value instead of a confidence score nobody can act on.",
        "properties": {
          "material_id": {
            "type": "string",
            "description": "The document it was read from, by its `id` in `documents`: `doc_…` live, `doc_test_…` in the sandbox."
          },
          "filename": {
            "type": "string"
          },
          "quote": {
            "type": "string"
          },
          "page": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "material_id",
          "quote"
        ]
      },
      "Site": {
        "type": "object",
        "description": "Where the installation physically is. A Postfach is not a valid site.",
        "properties": {
          "street": {
            "type": "string",
            "x-nr": 1002
          },
          "house_number": {
            "type": "string",
            "x-nr": 1003
          },
          "postal_code": {
            "type": "string",
            "pattern": "^[0-9]{4,5}$",
            "x-nr": 1007,
            "description": "Five digits in Germany, leading zero included; four in Austria and Switzerland."
          },
          "city": {
            "type": "string",
            "x-nr": 1008
          },
          "address_addition": {
            "type": "string",
            "x-nr": 1004
          },
          "district": {
            "type": "string",
            "x-nr": 1009,
            "description": "Ortsteil."
          },
          "address_kind": {
            "type": "string",
            "enum": [
              "postal",
              "parcel"
            ],
            "x-nr": 1001,
            "description": "Whether the site is given as a postal address or as Gemarkung and Flurstück. Derived from what you send when absent."
          },
          "building_use": {
            "type": "string",
            "enum": [
              "household",
              "commerce",
              "industry",
              "agriculture",
              "public",
              "other"
            ],
            "x-nr": 90024,
            "description": "PV only: what the building is mainly used for."
          }
        },
        "additionalProperties": false
      },
      "EndCustomer": {
        "type": "object",
        "description": "The Anschlussnutzer: the person or organisation operating the device.",
        "properties": {
          "first_name": {
            "type": "string",
            "x-nr": 1102
          },
          "last_name": {
            "type": "string",
            "x-nr": 1101,
            "description": "Name oder Firmenname: a company's name goes here, with no first name."
          },
          "email": {
            "type": "string",
            "format": "email",
            "x-nr": 1110
          },
          "phone": {
            "type": "string",
            "x-nr": 1109
          },
          "is_owner": {
            "type": "boolean",
            "description": "True when they own the property. False means a landlord consent may be required."
          },
          "street": {
            "type": "string",
            "x-nr": 1103,
            "description": "The Anschlussnutzer's own address, fields 1103 to 1108. Distinct from `site`: a landlord filing for a tenant's roof lives elsewhere. Never blocks; the site address does."
          },
          "house_number": {
            "type": "string",
            "x-nr": 1104
          },
          "address_addition": {
            "type": "string",
            "x-nr": 1105
          },
          "postal_code": {
            "type": "string",
            "x-nr": 1106
          },
          "city": {
            "type": "string",
            "x-nr": 1107
          },
          "district": {
            "type": "string",
            "x-nr": 1108
          },
          "iban": {
            "type": "string",
            "x-nr": 1111,
            "description": "PV only. Where the feed-in remuneration is paid."
          },
          "company_status": {
            "type": "string",
            "enum": [
              "in_difficulty",
              "open_recovery_claims",
              "neither"
            ],
            "x-nr": 1112,
            "description": "PV only. The EU state-aid declaration a company makes before it can receive EEG remuneration."
          }
        },
        "additionalProperties": false
      },
      "ContractHolder": {
        "type": "object",
        "description": "Anschlussnehmer, fields 1201 to 1210: the party holding the connection contract, when that is not the end customer using the installation. A landlord, typically. Leave the block out when they are the same person.",
        "properties": {
          "last_name": {
            "type": "string",
            "x-nr": 1201,
            "description": "Name oder Firmenname."
          },
          "first_name": {
            "type": "string",
            "x-nr": 1202
          },
          "street": {
            "type": "string",
            "x-nr": 1203
          },
          "house_number": {
            "type": "string",
            "x-nr": 1204
          },
          "postal_code": {
            "type": "string",
            "x-nr": 1206
          },
          "city": {
            "type": "string",
            "x-nr": 1207
          },
          "phone": {
            "type": "string",
            "x-nr": 1209
          },
          "email": {
            "type": "string",
            "format": "email",
            "x-nr": 1210
          }
        },
        "additionalProperties": false
      },
      "Billing": {
        "type": "object",
        "description": "Rechnungsempfänger, fields 1301 to 1310: who receives the invoice, when that is not the end customer. Leave the block out when it is.",
        "properties": {
          "name": {
            "type": "string",
            "x-nr": 1301,
            "description": "Name or company name."
          },
          "first_name": {
            "type": "string",
            "x-nr": 1302
          },
          "street": {
            "type": "string",
            "x-nr": 1303
          },
          "house_number": {
            "type": "string",
            "x-nr": 1304
          },
          "address_addition": {
            "type": "string",
            "x-nr": 1305
          },
          "postal_code": {
            "type": "string",
            "x-nr": 1306
          },
          "city": {
            "type": "string",
            "x-nr": 1307
          },
          "district": {
            "type": "string",
            "x-nr": 1308
          },
          "phone": {
            "type": "string",
            "x-nr": 1309
          },
          "email": {
            "type": "string",
            "format": "email",
            "x-nr": 1310
          }
        },
        "additionalProperties": false
      },
      "Installer": {
        "type": "object",
        "description": "The Elektrofachbetrieb. Named on the filing whether or not they are the API caller, because the grid operator's process expects them.",
        "properties": {
          "company": {
            "type": "string",
            "x-nr": 1401
          },
          "street": {
            "type": "string",
            "x-nr": 1402
          },
          "house_number": {
            "type": "string",
            "x-nr": 1403
          },
          "address_addition": {
            "type": "string",
            "x-nr": 1404
          },
          "postal_code": {
            "type": "string",
            "x-nr": 1405
          },
          "city": {
            "type": "string",
            "x-nr": 1406
          },
          "district": {
            "type": "string",
            "x-nr": 1407
          },
          "phone": {
            "type": "string",
            "x-nr": 1408
          },
          "email": {
            "type": "string",
            "format": "email",
            "x-nr": 1409
          },
          "registration_operator": {
            "type": "string",
            "x-nr": 1410,
            "description": "The grid operator the entry number was issued by. An entry in an Installateurverzeichnis is per operator, so the number alone does not identify it."
          },
          "registry_number": {
            "type": "string",
            "x-nr": 1411,
            "description": "Entry number in the grid operator's Installateurverzeichnis."
          },
          "contact_last_name": {
            "type": "string",
            "x-nr": 1501,
            "description": "The person to call about this case."
          },
          "contact_first_name": {
            "type": "string",
            "x-nr": 1502
          },
          "contact_phone": {
            "type": "string",
            "x-nr": 1503
          },
          "contact_email": {
            "type": "string",
            "format": "email",
            "x-nr": 1504
          },
          "salutation": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "care_of": {
            "type": "string"
          },
          "register_court_number": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "directory_reference": {
            "type": "string",
            "description": "The firm's entry in the grid operator's Installateurverzeichnis, where the portal picks it from that list rather than from the number."
          }
        },
        "additionalProperties": false
      },
      "Applicant": {
        "type": "object",
        "description": "The firm making the application, where the caller files on their customer's behalf. Optional; without it a filing goes out in the customer's own name. The national data set models no such party, so these fields carry no number.",
        "properties": {
          "salutation": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "care_of": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "register_court_number": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "house_number": {
            "type": "string"
          },
          "address_addition": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "dob": {
            "type": "string",
            "format": "date"
          },
          "mobile": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Builder": {
        "type": "object",
        "description": "Anlagenerrichter, fields 1601 to 1609: the firm that built the installation, when that is not the Elektrofachbetrieb in `installer`. On a PV roof they are often two companies, and the standard asks for both.",
        "properties": {
          "company": {
            "type": "string",
            "x-nr": 1601
          },
          "street": {
            "type": "string",
            "x-nr": 1602
          },
          "house_number": {
            "type": "string",
            "x-nr": 1603
          },
          "address_addition": {
            "type": "string",
            "x-nr": 1604
          },
          "postal_code": {
            "type": "string",
            "x-nr": 1605
          },
          "city": {
            "type": "string",
            "x-nr": 1606
          },
          "district": {
            "type": "string",
            "x-nr": 1607
          },
          "phone": {
            "type": "string",
            "x-nr": 1608
          },
          "email": {
            "type": "string",
            "format": "email",
            "x-nr": 1609
          }
        },
        "additionalProperties": false
      },
      "PlantOperator": {
        "type": "object",
        "description": "Who runs the plant, where that is not the end customer. The national data set models no such party, so these fields carry no number. The Marktstammdatenregister is filed in this person's name, and a firm here is refused there: the form we file is for private plants.",
        "properties": {
          "salutation": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "care_of": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "register_court_number": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "house_number": {
            "type": "string"
          },
          "address_addition": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "dob": {
            "type": "string",
            "format": "date",
            "description": "Required by the Marktstammdatenregister where a natural person runs the plant. If that is the end customer, this one field is enough."
          }
        },
        "additionalProperties": false
      },
      "PropertyOwner": {
        "type": "object",
        "description": "Who owns the ground, where that is not the end customer. The national data set models no such party, so these fields carry no number.",
        "properties": {
          "salutation": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "care_of": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "register_court_number": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "house_number": {
            "type": "string"
          },
          "address_addition": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FeedIn": {
        "type": "object",
        "description": "How the feed-in is sold and paid. PV and storage only, because the standard does not ask a charge point how its export is remunerated: on another type each value sent here is listed in the case's `rejected` with its reason, and the case is created or changed without it.",
        "properties": {
          "sale_form": {
            "type": "string",
            "enum": [
              "free_of_charge",
              "subsidised_direct_marketing",
              "feed_in_tariff",
              "tenant_electricity",
              "other_direct_marketing",
              "unsubsidised"
            ],
            "x-nr": 2018,
            "description": "Gewünschte Veräußerungsform der Einspeisung."
          },
          "remuneration_notes": {
            "type": "string",
            "x-nr": 2019
          },
          "remote_control_proof": {
            "type": "string",
            "x-nr": 2020,
            "description": "PV only. Proof the plant can be remote-controlled for direct marketing."
          },
          "grid_operator_confirmation": {
            "type": "boolean",
            "x-nr": 2021,
            "description": "PV only."
          },
          "eeg_commissioning_at": {
            "type": "string",
            "format": "date",
            "x-nr": 2005,
            "description": "EEG-Inbetriebnahmedatum. May equal `connection.planned_commissioning_at`; the standard keeps them apart because the EEG date fixes the tariff."
          }
        },
        "additionalProperties": false
      },
      "Device": {
        "type": "object",
        "description": "The installation being registered. One object for all five Anlagentypen: a field that only one type asks is marked so. Sent for another type, it is listed in the case's `rejected` with its reason and not kept, and the case is still created.",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "charge_point",
              "heat_pump",
              "pv",
              "battery",
              "air_conditioning"
            ],
            "description": "Fixed by the case's `type`. Leave it out; a different value is a 422 naming `declared.device.category` (`not_allowed`)."
          },
          "status": {
            "type": "string",
            "enum": [
              "planned",
              "installed",
              "in_operation"
            ],
            "description": "Drives which filings are derived. An installation already in operation needs no connection request, only the registration."
          },
          "installed_at": {
            "type": "string",
            "format": "date",
            "description": "Commissioning date. A date before 2024-01-01 makes this a Bestandsanlage, where § 14a participation is a voluntary opt-in rather than an obligation. Operational, not a field of the standard: the EEG-Inbetriebnahmedatum (field 2005) is `feed_in.eeg_commissioning_at` and exists only for PV and storage."
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "description": "Identical units on this connection. Fields 5001, 6001, 4005 and 7001; PV counts inverters instead, see `inverter_count`."
          },
          "manufacturer": {
            "type": "string",
            "description": "Fields 5002, 6002, 4001 and 7002. PV: per inverter, see `inverters`."
          },
          "model": {
            "type": "string",
            "description": "Fields 5003, 6003, 4002 and 7003."
          },
          "grid_draw_kw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Maximale Netzbezugsleistung. Charge point 5017, storage 4018, air conditioning 7014."
          },
          "separate_meter": {
            "type": "boolean",
            "description": "Messung über separaten Zähler. Fields 5011, 6010, 4012 and 7008."
          },
          "meter_exists": {
            "type": "boolean",
            "description": "Zähler bereits vorhanden. Charge point 5012, storage 4013, air conditioning 7009."
          },
          "existing_installation": {
            "type": "string",
            "enum": [
              "Ja (Anlage ohne Steuerung § 14a alte Fassung)",
              "Ja (Anlage mit Steuerung § 14a alte Fassung)",
              "Nein"
            ],
            "description": "Bestandsanlage vor dem 01.01.2024, in the operators' own wording. Fields 5014, 6013, 4015 and 7011."
          },
          "control_mode": {
            "type": "string",
            "enum": [
              "Direkt",
              "Energiemanagementsystem"
            ],
            "description": "Steuerungsart. Fields 5015, 6014, 4016 and 7012."
          },
          "tariff_module": {
            "type": "string",
            "enum": [
              "Modul 1",
              "Modul 2"
            ],
            "description": "Netzentgeltmodul. Fields 5016, 6015, 4017 and 7013."
          },
          "load_management": {
            "type": "string",
            "enum": [
              "Nein",
              "Ja (dynamisch)",
              "Ja (statisch)"
            ],
            "description": "Energie- bzw. Lastmanagement. Charge point 5019, storage 4020, air conditioning 7016."
          },
          "control_interface": {
            "type": "string",
            "enum": [
              "Relais",
              "Digital (EEBUS)"
            ],
            "description": "Storage 4023, air conditioning 7017."
          },
          "form_factor": {
            "type": "string",
            "enum": [
              "Ladesäule",
              "Ladebox",
              "Sonstiges"
            ],
            "x-nr": 5006,
            "description": "Charge point only."
          },
          "heat_pump_type": {
            "type": "string",
            "enum": [
              "air_water",
              "brine_water",
              "water_water",
              "other"
            ],
            "x-nr": 6004,
            "description": "Heat pump only."
          },
          "starting_current_a": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Maximaler Anlaufstrom in A. Heat pump 6007, air conditioning 7005."
          },
          "electrical_power_kw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 7004,
            "description": "Air conditioning only."
          },
          "inverter_count": {
            "type": "integer",
            "minimum": 1,
            "x-nr": 3008,
            "description": "PV only: identical inverters. Each one's own figures go in `inverters`."
          },
          "apparent_power_kva": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Sum of the maximum apparent powers. PV 3009, storage 4006."
          },
          "active_power_kw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Sum of the maximum active powers. PV 3010, storage 4019 (feed-in)."
          },
          "module_power_kwp": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 3101,
            "description": "PV only: total module capacity."
          },
          "operating_mode": {
            "type": "string",
            "description": "Betriebsweise, in the operators' own wording. PV (3001): `Überschusseinspeisung`, `Volleinspeisung`, `Nulleinspeisung`. Storage (4008): `Kein Bezug und keine Einspeisung`, `Bezug und keine Einspeisung`, `Kein Bezug aber Einspeisung`, `Bezug und Einspeisung`."
          },
          "coupling": {
            "type": "string",
            "enum": [
              "Eigener Wechselrichter (AC-Kopplung)",
              "Gemeinsamer Wechselrichter mit Erzeugungsanlage (DC-Kopplung)"
            ],
            "x-nr": 4007,
            "description": "Storage only."
          },
          "storage_capacity_kwh": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 4021,
            "description": "Storage only."
          },
          "zerez_id": {
            "type": "string",
            "x-nr": 4022,
            "description": "Storage only. PV inverters carry theirs in `inverters`."
          },
          "orientation": {
            "type": "string",
            "enum": [
              "south",
              "south_west",
              "south_east",
              "west",
              "east_west",
              "east",
              "north_west",
              "north_east",
              "north",
              "tracked"
            ],
            "x-nr": 90020,
            "description": "PV only: the direction the modules mainly face."
          },
          "tilt": {
            "type": "string",
            "enum": [
              "below_5",
              "from_5_to_20",
              "from_21_to_40",
              "from_41_to_60",
              "from_61_to_89",
              "vertical",
              "tracked"
            ],
            "x-nr": 90021,
            "description": "PV only: the band the modules' main tilt falls in."
          },
          "second_orientation": {
            "type": "string",
            "enum": [
              "south",
              "south_west",
              "south_east",
              "west",
              "east_west",
              "east",
              "north_west",
              "north_east",
              "north",
              "tracked"
            ],
            "x-nr": 90022,
            "description": "PV only: a second direction. Sending one says the modules do not all face the same way."
          },
          "second_tilt": {
            "type": "string",
            "enum": [
              "below_5",
              "from_5_to_20",
              "from_21_to_40",
              "from_41_to_60",
              "from_61_to_89",
              "vertical",
              "tracked"
            ],
            "x-nr": 90023,
            "description": "PV only: the tilt of the modules facing the second direction."
          },
          "usable_capacity_kwh": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 90030,
            "description": "Storage only: the usable capacity from the data sheet, not the nominal `storage_capacity_kwh`."
          },
          "battery_technology": {
            "type": "string",
            "enum": [
              "lithium",
              "lead",
              "redox_flow",
              "high_temperature",
              "nickel",
              "other"
            ],
            "x-nr": 90031,
            "description": "Storage only: the technology the battery stores energy with."
          }
        },
        "additionalProperties": false
      },
      "Inverter": {
        "type": "object",
        "description": "One inverter of a PV array. The standard asks these once per unit, so they travel as the `inverters` array and come back as `inverters.0.manufacturer` and so on.",
        "properties": {
          "manufacturer": {
            "type": "string",
            "x-nr": 3003
          },
          "model": {
            "type": "string",
            "x-nr": 3004
          },
          "apparent_power_kva": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 3006
          },
          "active_power_kw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 3007
          },
          "zerez_id": {
            "type": "string",
            "x-nr": 3015
          }
        },
        "additionalProperties": false
      },
      "Protection": {
        "type": "object",
        "description": "NA-Schutz, fields 3301 to 3305. PV and storage only.",
        "properties": {
          "design": {
            "type": "string",
            "enum": [
              "Zentral am Zählerplatz",
              "Integriert",
              "Zentral am Zählerplatz und integriert in Kombination"
            ],
            "x-nr": 3301
          },
          "manufacturer": {
            "type": "string",
            "x-nr": 3302
          },
          "model": {
            "type": "string",
            "x-nr": 3303
          },
          "certificate": {
            "type": "string",
            "x-nr": 3304
          },
          "zerez_id": {
            "type": "string",
            "x-nr": 3305
          }
        },
        "additionalProperties": false
      },
      "Connection": {
        "type": "object",
        "description": "The grid connection the device hangs off.",
        "properties": {
          "meter_number": {
            "type": "string",
            "description": "Zählernummer. One name, the number follows the type: 5013, 6012, 3014, 4014 or 7010."
          },
          "location_in_plan": {
            "type": "string",
            "x-nr": 2003,
            "description": "Aufstellungsort im Lageplan."
          },
          "grid_draw_kw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 2008,
            "description": "Netzwirksamer Leistungsbezug am Netzanschluss, the connection's total. Not the device's own, which is `device.grid_draw_kw`."
          },
          "metering_operator": {
            "type": "string",
            "x-nr": 2011,
            "description": "Charge point and heat pump."
          },
          "has_smart_meter": {
            "type": "boolean",
            "description": "An intelligentes Messsystem is installed. This is the main signal for who can perform the control, so supplying it often answers `section_14a.control_responsibility` for you."
          },
          "planned_commissioning_at": {
            "type": "string",
            "format": "date",
            "x-nr": 2004,
            "description": "Geplanter Inbetriebsetzungstermin, the day the plant is to go into operation. Optional: left out, the case is filed with the operator with the day 14 days after it was filed with us, on Berlin's calendar, or, if that day has passed when we prepare the filing, with the day 14 days after that; filing a case without it agrees to that."
          },
          "single_line_diagram": {
            "type": "string",
            "description": "Einpolige Darstellung des Messkonzepts. Field 2006 on a PV case, 2007 on the four § 14a families; one name, the number follows the family. A reference to the drawing, not the drawing: send that with `POST /v2/cases/{id}/documents`."
          },
          "tab_confirmed": {
            "type": "boolean",
            "x-nr": 2009,
            "description": "The installer confirms the operator's TAB for steuerbare Verbrauchseinrichtungen are met."
          },
          "fuse_change": {
            "type": "string",
            "enum": [
              "sufficient",
              "increase_required"
            ],
            "x-nr": 2022
          },
          "fuse_required_a": {
            "type": "number",
            "exclusiveMinimum": 0,
            "x-nr": 2023,
            "description": "In ampere."
          },
          "grey_power": {
            "type": "string",
            "enum": [
              "renewable_only",
              "grey_power"
            ],
            "x-nr": 2013,
            "description": "Charge point and storage only."
          },
          "grey_power_balancing_group": {
            "type": "string",
            "x-nr": 2014
          },
          "grey_power_marketer": {
            "type": "string",
            "x-nr": 2015
          },
          "existing_controllable_device": {
            "type": "string",
            "enum": [
              "none",
              "charge_point",
              "heat_pump",
              "air_conditioning",
              "battery"
            ],
            "x-nr": 2001,
            "description": "PV only. A § 14a device already on the connection."
          },
          "control_equipment": {
            "type": "string",
            "enum": [
              "new_default_mso",
              "new_competitive_mso",
              "existing"
            ],
            "x-nr": 2002,
            "description": "PV only. The § 9 EEG control equipment."
          },
          "metering_operator_choice": {
            "type": "string",
            "enum": [
              "default_mso",
              "competitive_mso"
            ],
            "x-nr": 2012,
            "description": "PV only."
          },
          "time_series_type_draw": {
            "type": "string",
            "enum": [
              "sls",
              "lgs",
              "other"
            ],
            "x-nr": 2016,
            "description": "Storage only."
          },
          "time_series_type_feed_in": {
            "type": "string",
            "enum": [
              "sol",
              "egs",
              "other"
            ],
            "x-nr": 2017,
            "description": "Storage only."
          },
          "mastr_identification_number": {
            "type": "string",
            "x-nr": 90040,
            "description": "PV only: the number the grid operator gives for the Marktstammdatenregister in its letter, where it gives one."
          }
        },
        "additionalProperties": false
      },
      "Consent": {
        "type": "object",
        "description": "The operator's agreement to be registered under § 14a. Filing the case is that agreement: the hand-over is the instruction to file, so nothing here is required and a case never waits for it. Send it when the operator agreed before the filing, and it is kept as the record of when and how.",
        "properties": {
          "given_by": {
            "type": "string",
            "enum": [
              "end_customer",
              "installer_on_behalf"
            ]
          },
          "given_at": {
            "type": "string",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}([Tt][0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2}))?$",
            "description": "When it was given: a date and time in RFC 3339 (`2026-08-17T14:05:00Z`), or the date alone where only the day is known (`2026-08-17`)."
          },
          "channel": {
            "type": "string",
            "description": "How the consent was given, in your own words: `phone`, `email`, `written`, or the name of your platform."
          },
          "reference": {
            "type": "string",
            "description": "Your own identifier for the record of consent: a call id, a mail id, a document id."
          }
        },
        "additionalProperties": false
      },
      "Section14a": {
        "type": "object",
        "description": "The § 14a specifics.",
        "properties": {
          "modules": {
            "type": "string",
            "example": "1",
            "description": "Which network-fee module is chosen, as text: `1` is the flat reduction and the ordinary case, `2` the percentage reduction on the energy price and excludes 1, `3` the time-variable network fee and combines with 1. Sent as `1` or as the operator's own wording, `Modul 1`."
          },
          "control_responsibility": {
            "type": "string",
            "enum": [
              "grid_operator",
              "metering_operator"
            ],
            "x-nr": 2010,
            "description": "Who performs the grid-oriented control: the grid operator with its own control equipment, or the metering point operator over the smart meter gateway."
          },
          "is_controllable": {
            "type": "boolean",
            "description": "Whether the device is a steuerbare Verbrauchseinrichtung at all. Charge point 5010, storage 4011, air conditioning 7007; a heat pump always is."
          },
          "critical_infrastructure": {
            "type": "boolean",
            "x-nr": 7006,
            "description": "Air conditioning only: serves betriebsnotwendige Zwecke or critical infrastructure, which exempts it from control."
          },
          "consent": {
            "$ref": "#/components/schemas/Consent"
          }
        },
        "additionalProperties": false
      },
      "Declared": {
        "type": "object",
        "description": "Everything you already know about the installation, at the field dictionary's paths (`GET /v2/requirements`). Every field is optional, and declared values are authoritative: what is read from a document never overwrites one. On a case with a business, `installer` is taken from the business wherever the case does not declare it itself.",
        "properties": {
          "site": {
            "$ref": "#/components/schemas/Site"
          },
          "end_customer": {
            "$ref": "#/components/schemas/EndCustomer"
          },
          "contract_holder": {
            "$ref": "#/components/schemas/ContractHolder"
          },
          "billing": {
            "$ref": "#/components/schemas/Billing"
          },
          "installer": {
            "$ref": "#/components/schemas/Installer"
          },
          "applicant": {
            "$ref": "#/components/schemas/Applicant"
          },
          "builder": {
            "$ref": "#/components/schemas/Builder"
          },
          "plant_operator": {
            "$ref": "#/components/schemas/PlantOperator"
          },
          "property_owner": {
            "$ref": "#/components/schemas/PropertyOwner"
          },
          "device": {
            "$ref": "#/components/schemas/Device"
          },
          "inverters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Inverter"
            },
            "description": "PV only: one entry per inverter, in the order you count them."
          },
          "connection": {
            "$ref": "#/components/schemas/Connection"
          },
          "protection": {
            "$ref": "#/components/schemas/Protection"
          },
          "feed_in": {
            "$ref": "#/components/schemas/FeedIn"
          },
          "section_14a": {
            "$ref": "#/components/schemas/Section14a"
          },
          "nr": {
            "type": "object",
            "description": "Escape hatch to any field of the national data set by its number, including fields this API has not yet given a name. Keys are field numbers as strings, of four or five digits; any other key is a 422. A named field and its numbered twin sent with different values: the value by number is not taken, it is listed in the case's `rejected` under the named path, and it holds the case until the two agree.",
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean"
              ]
            },
            "propertyNames": {
              "pattern": "^[0-9]{4,5}$"
            },
            "example": {
              "1004": "Hinterhaus"
            }
          }
        },
        "additionalProperties": false
      },
      "ResolvedField": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "description": "Dotted path into `declared`, e.g. `site.street`."
          },
          "nr": {
            "type": "integer",
            "description": "The field's number in the national data set."
          },
          "label": {
            "type": "object",
            "description": "A short string in both languages. Display only; never a contract value.",
            "properties": {
              "de": {
                "type": "string"
              },
              "en": {
                "type": "string"
              }
            },
            "required": [
              "de",
              "en"
            ]
          },
          "value": {},
          "unit": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "declared",
              "extracted",
              "derived"
            ],
            "description": "Where the resolved value came from. `declared` was supplied by the caller and is never overwritten. `extracted` was read out of material, by our reader or by our case agent, which checks a value against the passage it quotes before it holds it. `derived` was computed by us from other values. Precedence when they disagree: declared > extracted > derived, and the losing values are reported in `conflicts` rather than dropped; where two readings disagree, the one the case agent checked settles the field."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "certain",
              "probable"
            ],
            "description": "Only meaningful for `extracted`. `probable` means the value was inferred rather than stated, for example a commissioning date taken from a delivery date."
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          }
        },
        "required": [
          "path",
          "label",
          "value",
          "source"
        ]
      },
      "Conflict": {
        "type": "object",
        "description": "Two sources gave different values for the same field. We do not silently pick one: a misdeclaration to a grid operator is worse than a question. Declaring the value settles it, because declared wins.",
        "properties": {
          "path": {
            "type": "string"
          },
          "nr": {
            "type": "integer"
          },
          "label": {
            "type": "object",
            "description": "A short string in both languages. Display only; never a contract value.",
            "properties": {
              "de": {
                "type": "string"
              },
              "en": {
                "type": "string"
              }
            },
            "required": [
              "de",
              "en"
            ]
          },
          "blocking": {
            "type": "boolean"
          },
          "candidates": {
            "type": "array",
            "minItems": 2,
            "items": {
              "type": "object",
              "properties": {
                "value": {},
                "source": {
                  "type": "string",
                  "enum": [
                    "declared",
                    "extracted",
                    "derived"
                  ],
                  "description": "Where the resolved value came from. `declared` was supplied by the caller and is never overwritten. `extracted` was read out of material, by our reader or by our case agent, which checks a value against the passage it quotes before it holds it. `derived` was computed by us from other values. Precedence when they disagree: declared > extracted > derived, and the losing values are reported in `conflicts` rather than dropped; where two readings disagree, the one the case agent checked settles the field."
                },
                "evidence": {
                  "$ref": "#/components/schemas/Evidence"
                }
              }
            }
          }
        },
        "required": [
          "path",
          "label",
          "candidates",
          "blocking"
        ]
      },
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem detail. `code` is a closed enum and is the field to branch on.",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "enum": [
              "unauthenticated",
              "forbidden_scope",
              "not_found",
              "validation_failed",
              "idempotency_conflict",
              "no_credits",
              "rate_limited",
              "material_too_large",
              "unsupported_media_type",
              "case_already_filed",
              "case_incomplete",
              "business_not_found",
              "business_inactive",
              "business_exists",
              "not_due",
              "mastr_refused",
              "origin_not_allowed",
              "no_business",
              "internal"
            ]
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "enum": [
                    "required",
                    "unknown_field",
                    "wrong_type",
                    "too_long",
                    "too_short",
                    "too_many",
                    "too_large",
                    "not_allowed",
                    "invalid_encoding",
                    "invalid_combination",
                    "out_of_range"
                  ]
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "description": "Every value refused, at once: `path` in the request (`declared.site.street`, `registrations[0].kind`, a query parameter's name), `code` from a closed list, and one sentence to act on."
          },
          "business": {
            "type": "string",
            "description": "On `business_exists`: the id of the business that already holds the `external_ref` you sent, to read or PATCH instead of creating a second one. Absent everywhere else."
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ]
      },
      "Case": {
        "type": "object",
        "description": "One installation's registration, the same case v1 shows: a case made through either version reads through both, under the same id.",
        "properties": {
          "object": {
            "type": "string",
            "const": "case"
          },
          "id": {
            "type": "string",
            "description": "`anm_…` live, `anm_test_…` in the sandbox."
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ],
            "description": "Which plane this case is on, decided by the API key that created it and never changed afterwards. The id says the same thing (`anm_…` against `anm_test_…`), and saying it twice is deliberate: a screenshot of a sandbox case should be unmistakable.\n\nA key of one mode cannot read, patch, file or discard a case of the other. That is refused on the id, before any lookup, so a mis-wired environment is one 404 rather than a half-finished filing."
          },
          "type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pv",
              "storage",
              "heat_pump",
              "charge_point",
              "air_conditioning",
              null
            ],
            "description": "The installation type the case was opened as. Null only for a case opened through v1's `/v1/anmeldungen/14a` whose device is not known yet."
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your identifier, echoed everywhere."
          },
          "business_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The business the case is filed for (`biz_…`), or null for your account's own case."
          },
          "status": {
            "type": "string",
            "enum": [
              "extracting",
              "needs_input",
              "ready",
              "submitted",
              "confirmed",
              "rejected",
              "withdrawn"
            ],
            "description": "Coarse on purpose: whether the case is decided, and how. A case reads `needs_input` or `ready` from its create on, as what it holds settles; there is no `draft` status, though a case not handed over is called a draft here. `extracting`: documents are being read. `needs_input`: something blocking is open or contradicted, or the grid operator's own questions are unanswered (`requirements.operator_outstanding`). `ready`: nothing blocks submitting. `submitted`: handed to Wisnots, and so it stays while the customer signs, the grid operator considers, and while the operator asks for more (its items stand in `open[]`, and `blocked` says the case waits). `confirmed`: the grid operator said yes, and so it stays to the end, also while the operator asks for more later (the completion notice queried): the status never goes back. `rejected`: it refused. `withdrawn`: you withdrew it (`POST /v2/cases/{id}/withdraw`) and Wisnots withdrew it with the grid operator. `stage` says how far the case has come."
          },
          "stage": {
            "type": "object",
            "description": "How far the case has come, beside `status` and never instead of it. Stable codes, with words you can show as they are. A `case.status_changed` event carries the same code. It moves forward: from a complete draft to filing with the operator it reads `ready`, and a request does not move it. On a filed case it goes back only where we put it back to `collecting`.",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "created",
                  "collecting",
                  "ready",
                  "submitted",
                  "approved",
                  "commissioning_reported",
                  "completion_filed",
                  "completion_confirmed",
                  "metering_pending",
                  "completed",
                  "rejected",
                  "withdrawn"
                ]
              },
              "label": {
                "type": "object",
                "description": "A short string in both languages. Display only; never a contract value.",
                "properties": {
                  "de": {
                    "type": "string"
                  },
                  "en": {
                    "type": "string"
                  }
                },
                "required": [
                  "de",
                  "en"
                ]
              }
            },
            "required": [
              "code",
              "label"
            ]
          },
          "blocked": {
            "type": "boolean",
            "description": "Whether the case waits for an answer before it can move on. On a draft: something still stops filing, the same as `status: needs_input`. Once handed over: the request open on its registration asks for something required that is still owed, an item of `open[]` that reads `open` or `rejected`; once every item it requires reads `in_review`, the answer is with us and this is false. A question that blocks nothing leaves it false."
          },
          "operator": {
            "type": [
              "object",
              "null"
            ],
            "description": "The grid operator this case is bound for, or null until it is known. Name it with `operator` on create, or leave that out and we look it up from the site's address once the case has one. We bind one only where exactly one operator serves the address; where several do, or none is found, this stays null until it is settled. `source` says how it came: `declared` where it was named, `derived` where it came from the address or from a source we checked. Where the address does not settle it, `open[]` holds the item `grid_operator_unclear`, answered with `operator` in `PATCH /v2/cases/{id}`.",
            "properties": {
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "source": {
                "type": "string",
                "enum": [
                  "declared",
                  "derived"
                ]
              }
            },
            "required": [
              "key",
              "name",
              "source"
            ]
          },
          "group": {
            "type": [
              "object",
              "null"
            ],
            "description": "The cases of one connection that go to the grid operator as one registration and one credit, or null when this case is a registration of its own. `lead` is the case that carries the filing, the credit and any question about the registration; the others move with its stage and cost nothing of their own, and one we move on its own (the operator refusing the battery alone) stands where it was put. Each case still routes its own form for signature. The first case of a roof handed over leads; a later one joins it when it has the same `external_ref`, plane, address, end customer and installer and the lead has never been with the operator; one handed over after the lead reached the operator is a registration and a credit of its own.",
            "properties": {
              "lead": {
                "type": "string",
                "description": "The id of the case that carries the registration."
              },
              "cases": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Every case of the registration, the lead first."
              }
            },
            "required": [
              "lead",
              "cases"
            ]
          },
          "billing": {
            "$ref": "#/components/schemas/CaseBilling"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResolvedField"
            },
            "description": "Everything resolved, each value with where it came from."
          },
          "open": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "What the case still needs. After hand-over, only what can still be answered."
          },
          "conflicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conflict"
            }
          },
          "rejected": {
            "type": "array",
            "description": "Values you sent that could not be used, each with the reason. A path that is no field, or no field of the device family, a value that will not parse as its type or breaks what its field's schema allows (a postcode's pattern, a lower bound, a whole number, the format of an email address or a date), one supplied twice under two names with two answers. The case is still created (the rest of your declaration is good), and nothing here is silently discarded.",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "path",
                "reason"
              ]
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            }
          },
          "signature": {
            "type": [
              "object",
              "null"
            ],
            "description": "Where the signature stands. Null until one is asked for.\n\n**Submitting does not finish the job.** Two signatures on the operator's form are never ours (the customer's and the registered electrician's), so a submitted case produces the form and routes it for signature by email. `submitted` alone does not mean the filing went out: it may wait on the end customer here.\n\nStates: `pending` (queued), `sent`, `simulated` (the sandbox reached the point of sending and deliberately did not: the link still works), `failed` (with `failure_reason`), `opened`, `signed`, `superseded` (a newer request replaced it).\n\nOn a live case the link itself is never in this object: whoever holds it can download the customer's form. A request is made at the hand-over, and only where Wisnots has filled the operator's form by then, which no API call does: a sandbox case made and submitted through the API alone has none, and its `signature` stays null. Where a sandbox case has one, it carries `link`, so you can open the watermarked form and see what your customer would see. Nothing is signed online, live or test: the signed form comes back by mail and a person records it, and the sandbox operator answers whether or not anyone signed.",
            "properties": {
              "link": {
                "type": "string",
                "format": "uri",
                "description": "SANDBOX ONLY. The customer's link to the form, as the signature email would carry it. Never present on a live case."
              },
              "state": {
                "type": "string",
                "enum": [
                  "pending",
                  "sent",
                  "simulated",
                  "failed",
                  "opened",
                  "signed",
                  "superseded"
                ]
              },
              "sent_as": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sent_as_kind": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "own",
                  "house",
                  null
                ]
              },
              "requested_at": {
                "type": "string",
                "format": "date-time"
              },
              "sent_at": {
                "type": "string",
                "format": "date-time"
              },
              "opened_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "failure_reason": {
                "type": "string"
              }
            },
            "required": [
              "state",
              "requested_at",
              "expires_at"
            ]
          },
          "commissioning": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Commissioning"
              },
              {
                "type": "null"
              }
            ]
          },
          "mastr": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Mastr"
              },
              {
                "type": "null"
              }
            ]
          },
          "requirements": {
            "type": "object",
            "description": "Which requirements this API key is answered under, and how much of the operator's own is still outstanding.\n\n`surface` is `universal` or `operator`, and it is a property of your KEY, not of a request. Under `universal` you see the national data set and nothing else, so your integration is identical for every grid operator in Germany and we chase what that operator additionally asks. Under `operator` those questions are added to `open[]`, marked `operator_specific`, so you can collect everything in one pass; the price is that your field list now varies by operator.\n\n`operator_outstanding` counts the same thing under both, and it is why a universal key can trust an empty `open[]`: it is the operator's required questions that have no answer yet. While it is above zero the case cannot be filed, whether or not you can see the questions. Under `universal` a draft held by them alone, nothing blocking left in `open[]`, reads `needs_input` and waits on us: Wisnots is told and answers them, and the case then reads `ready` with `operator_outstanding` at 0, told by `case.updated`. Until then a filing is refused (409 `case_incomplete`). Ask for an operator-aware key if you would rather answer them yourself.",
            "properties": {
              "surface": {
                "type": "string",
                "enum": [
                  "universal",
                  "operator"
                ]
              },
              "operator_outstanding": {
                "type": "integer"
              }
            },
            "required": [
              "surface",
              "operator_outstanding"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "references": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            },
            "description": "The grid operator's numbers for the case, oldest first, as they arrive in its letters: reconcile by them. A cancelled one stays, with `cancelled_at`; `case.updated` is the only event that tells a cancel with no new number."
          },
          "withdrawal": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Withdrawal"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null unless you asked to withdraw the case."
          },
          "last_activity_at": {
            "type": "string",
            "format": "date-time",
            "description": "When something last happened on the case: its newest event (`case.stale` aside), or its own last write, whichever is later. `case.stale` fires once this is ten days old on a case that is not closed."
          },
          "duplicate_of": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id of another open case of yours that this one likely repeats: the same site (postcode, street and house number, however written) and the same `type`, on the same plane. A flag only: the API merges and holds nothing (the embedded `new-registration` form asks the installer before it hands such a case over); delete or withdraw what you made twice. Null otherwise, and once that case is deleted."
          }
        },
        "required": [
          "object",
          "id",
          "mode",
          "type",
          "external_ref",
          "business_id",
          "status",
          "stage",
          "blocked",
          "operator",
          "group",
          "billing",
          "fields",
          "open",
          "conflicts",
          "rejected",
          "documents",
          "signature",
          "commissioning",
          "mastr",
          "requirements",
          "created_at",
          "updated_at",
          "references",
          "withdrawal",
          "last_activity_at",
          "duplicate_of"
        ]
      },
      "CaseBilling": {
        "type": "object",
        "description": "What the case costs, in credits. One installation is one credit, taken when the case is submitted, never while it is a draft. A case filed with another (`group`) costs nothing of its own: `credits` is 0. On a sandbox key it reads as live would, `billed` and `billed_at` included, and nothing is taken. Money is what your package of credits cost, on its invoice (`GET /v2/invoices`); there is no price per case.",
        "properties": {
          "credits": {
            "type": "integer",
            "minimum": 0
          },
          "billed": {
            "type": "boolean",
            "description": "Whether the credit was taken."
          },
          "billed_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it was taken: when the case was submitted."
          }
        },
        "required": [
          "credits",
          "billed"
        ]
      },
      "Item": {
        "type": "object",
        "description": "One thing the case still needs, and how it is answered. The one list of what a case lacks, before hand-over and after: what the grid operator asks for later stands here too (`source: grid_operator`), never in a request object of its own.",
        "properties": {
          "code": {
            "type": "string",
            "description": "The item's stable key: its own code where it has one (`portal_login`, `grid_operator_unclear`, `commissioning_report`, `commissioning.<slot>`, `mastr.<field>`), else the field path it stands for. A document answers it by naming this code in `resolves`, and `case.requirements_updated` names a registration's items by it."
          },
          "text": {
            "$ref": "#/components/schemas/Localised",
            "description": "What is needed, in words you can show as they are."
          },
          "help": {
            "$ref": "#/components/schemas/Localised",
            "description": "How to answer it, where there is more to say."
          },
          "owner": {
            "type": "string",
            "enum": [
              "installer",
              "end_customer",
              "platform",
              "wisnots"
            ],
            "description": "Who is expected to know it, so you can route the question instead of guessing. `wisnots`: leave it to us; we read it from the documents or settle it with the grid operator. `platform` is for what only your system can answer; no item is that today."
          },
          "blocking": {
            "type": "boolean",
            "description": "True when the case cannot be submitted without it, or, after hand-over, when the grid operator requires it; on an item of `phase: mastr`, when it holds the MaStR release, which only an item you can answer does (an item `owner: wisnots` never blocks, even where `resolve.field` takes a value). A non-blocking item may stay open: we ask for the rest afterwards."
          },
          "state": {
            "type": "string",
            "enum": [
              "open",
              "in_review",
              "rejected"
            ],
            "description": "`open`: nothing given yet. `in_review`: an answer is with us, being read or on its way to the grid operator. `rejected`: an answer was not accepted, and `reason` says why."
          },
          "reason": {
            "type": "string",
            "description": "Why an answer was not accepted."
          },
          "due_by": {
            "type": "string",
            "format": "date",
            "description": "By when it is wanted: the grid operator's deadline, where it set one; on an item of `phase: mastr`, the register's, as `mastr.due_by`."
          },
          "source": {
            "type": "string",
            "enum": [
              "wisnots",
              "grid_operator"
            ],
            "description": "Who asks: we do, or the grid operator after hand-over. The operator's own wording is not passed on."
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "On an item asked for after hand-over, our note on what is asked: the text the installer was sent with it, our own or the grid operator's question in our words, the same on every item asked with it. Show it above those items. Null where that wording is the grid operator's own, which is not passed on, and on every item asked for in no such way."
          },
          "asked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the item was asked for after hand-over, the same on every item asked with it. Null on every item asked for in no such way."
          },
          "phase": {
            "type": "string",
            "enum": [
              "registration",
              "commissioning",
              "mastr"
            ],
            "description": "Which step of the case it belongs to: the registration, the commissioning report, or the MaStR registration."
          },
          "resolve": {
            "type": "object",
            "description": "How to answer it. `field`: the path to send under `declared` in `PATCH /v2/cases/{id}` (for `grid_operator_unclear` it is `operator`, which PATCH also takes on its own). `document`: send a document with `resolves` set to `code`; a text the grid operator asks for is answered as a text document too. `url`: a page for a person, for what must not pass through your systems (a portal login, the commissioning report); send them there. Empty where nothing you send answers it: a MaStR question no declared path carries, which Wisnots settles.",
            "properties": {
              "field": {
                "type": "string"
              },
              "document": {
                "type": "boolean",
                "const": true
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "input": {
            "type": "object",
            "description": "What a value for `resolve.field` looks like. Absent for an item a value does not answer.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "string",
                  "number",
                  "boolean",
                  "date",
                  "enum"
                ]
              },
              "unit": {
                "type": "string"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string"
                    },
                    "label": {
                      "$ref": "#/components/schemas/Localised"
                    }
                  },
                  "required": [
                    "value",
                    "label"
                  ]
                }
              }
            },
            "required": [
              "type"
            ]
          },
          "nr": {
            "type": "integer",
            "description": "The field's number in the national data set, where it has one."
          },
          "operator_specific": {
            "type": "boolean",
            "description": "True when the item is the case's grid operator's own rather than the national data set's. Only under an operator-aware key."
          }
        },
        "required": [
          "code",
          "text",
          "owner",
          "blocking",
          "state",
          "source",
          "note",
          "asked_at",
          "phase",
          "resolve"
        ]
      },
      "Document": {
        "type": "object",
        "description": "A document on a case: a file, a text, or a sandbox fixture. Its `id` is what `evidence.material_id` names on a field read from it, and v1 lists the same document under `materials`, by the bare id inside this one.",
        "properties": {
          "object": {
            "type": "string",
            "const": "document"
          },
          "id": {
            "type": "string",
            "description": "`doc_…` live, `doc_test_…` in the sandbox."
          },
          "kind": {
            "type": "string",
            "enum": [
              "file",
              "text",
              "fixture"
            ]
          },
          "label": {
            "type": "string",
            "description": "What you called it; a fixture's title."
          },
          "filename": {
            "type": "string",
            "description": "A file's name, as sent."
          },
          "content_type": {
            "type": "string",
            "description": "A file's media type, as its bytes were read."
          },
          "bytes": {
            "type": "integer",
            "description": "A file's size."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "reading",
              "read",
              "unreadable",
              "rejected",
              "held"
            ],
            "description": "`pending` and `reading` both mean wait. `read`: text taken and values resolved onto the case. `unreadable`: the reader could not read it, and the case says so. Where the reader itself fails (a model that does not answer), it tries again, three runs in all over about an hour and a half, the document `pending` meanwhile; what it still could not read then reads `unreadable`, and the reading ends as any does. A document sent after that is read afresh. `rejected` is reserved: today a file the reader cannot take is refused at upload, with a 415, and never becomes material. `held`: stored and not read; a case a CRM connection made, or one a SharePoint folder is shared into, keeps its material so until the case is filed and our automatic processing takes it up, or a person starts reading it, and the case is not `extracting` meanwhile."
          },
          "resolves": {
            "type": "string",
            "description": "The code of the item it answers, as sent."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "kind",
          "status",
          "created_at"
        ]
      },
      "Commissioning": {
        "type": "object",
        "description": "Where the commissioning report stands. Every installation type is a plant whose commissioning is reported, a wallbox, a heat pump and air conditioning as PV and storage, so on a case of any `type` it is `{\"state\": \"not_due\"}` from the create on. Null only on a case that registers no plant (a grid connection, construction power or a meter alone, which no v2 `type` is), and in a list, the feed or a case's log where that case could not be read whole (read it with `GET /v2/cases/{id}`). `not_due` until the grid operator's yes (and after a refusal, or where the case went past the yes without a report through us); `due` while the report takes input and holds nothing; `draft` once anything of it is saved (a value, a serial number, a file); `submitted` once it went out. From `due` on it names the devices whose serial numbers a report gives and the modules as registered; once anything is saved, `report` and `commissioned_on`.",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "not_due",
              "due",
              "draft",
              "submitted"
            ]
          },
          "commissioned_on": {
            "type": "string",
            "format": "date",
            "description": "The day the installation first produced power, as the report says it, saved or sent."
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the report went out."
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommissioningDevice"
            },
            "description": "The devices a report built otherwise than registered gives a serial number for: `serials` is keyed by their `key`."
          },
          "registered_modules": {
            "type": [
              "object",
              "null"
            ],
            "description": "The modules as registered, to compare what was built with; null where the registration says nothing of them.",
            "properties": {
              "count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "watt_per_module": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_kwp": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "count",
              "name",
              "watt_per_module",
              "total_kwp"
            ]
          },
          "report": {
            "type": "object",
            "description": "What the report holds, saved or sent.",
            "properties": {
              "built_as_declared": {
                "type": "boolean"
              },
              "module_count": {
                "type": "integer"
              },
              "module_watt": {
                "type": "number"
              },
              "serials": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "deviation": {
                "type": "string"
              },
              "evidence": {
                "type": "array",
                "description": "The files in its slots. `document_id` where the file is a document of the case (one the console's form took has none).",
                "items": {
                  "type": "object",
                  "properties": {
                    "slot": {
                      "type": "string",
                      "enum": [
                        "meter_photo",
                        "e8",
                        "protocol"
                      ]
                    },
                    "document_id": {
                      "type": "string",
                      "description": "The document's `id`, as `documents` lists it: `doc_…` live, `doc_test_…` in the sandbox."
                    },
                    "filename": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "slot",
                    "filename"
                  ]
                }
              }
            },
            "required": [
              "serials",
              "evidence"
            ]
          }
        },
        "required": [
          "state"
        ]
      },
      "CommissioningDevice": {
        "type": "object",
        "description": "A device of the installation a serial number is asked for.",
        "properties": {
          "key": {
            "type": "string",
            "description": "What `serials` is keyed by, such as `inverter-main-1`."
          },
          "kind": {
            "type": "string",
            "enum": [
              "inverter",
              "storage"
            ]
          },
          "index": {
            "type": [
              "integer",
              "null"
            ],
            "description": "1-based where the installation has more than one of the kind, else null."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Manufacturer and model as far as the registration knows them."
          }
        },
        "required": [
          "key",
          "kind",
          "index",
          "model"
        ]
      },
      "Mastr": {
        "type": "object",
        "description": "Where the registration in the Marktstammdatenregister stands. Null where the register does not apply (neither PV nor storage on the case, a storage case its PV case registers with the roof: the same `external_ref` and site, or an Austrian grid operator), and in a list, the feed or a case's log where that case could not be read whole (read it with `GET /v2/cases/{id}`). The register takes the case's PV and its storage each on its own (`devices`); the case is `registered` once every one is, and stays so whatever it names later. What our form does not file (a storage case with no PV, a unit left once another is in) Wisnots registers on the register's own site: `ready` until your customer releases it, `submitted` after, with nothing in `open[]`. `not_due` until the commissioning is reported; then `needs_input` while a question you can answer is open (in `open[]`, phase `mastr`, `blocking`), `ready` once none is, though what Wisnots settles may still stand there, `submitted` once your customer released it, `registered` once the register took it, `refused` where the register's simplified form does not hold the case. A case we close before it is registered (`stage.code` `completed`) keeps the state it stood in, and its questions leave `open[]`: it asks nothing more, and a release is a 409 `not_due`.",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "not_due",
              "needs_input",
              "ready",
              "submitted",
              "registered",
              "refused"
            ]
          },
          "refusals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Localised"
            },
            "description": "Why the register's form does not hold the case, while it is `refused`."
          },
          "units": {
            "type": "array",
            "description": "The register's numbers of each unit it took: the unit's own, its EEG plant, its storage installation, and the operator it registered (`plant_operator`), each once. Empty until a unit is in, and where the registration reached us without them.",
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "string",
                  "example": "SEE912345678901"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "generation_unit",
                    "storage_unit",
                    "eeg_plant",
                    "generation_location",
                    "plant_operator"
                  ],
                  "description": "By the number's prefix: SEE a `generation_unit` (MaStR gives a battery one too), SSE a `storage_unit`, EEG an `eeg_plant`, SEL a `generation_location`, ABR the `plant_operator`."
                },
                "device": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "pv",
                    "storage",
                    null
                  ],
                  "description": "Whose number it is: the PV's or the storage's; null for one both hold (the operator's)."
                }
              },
              "required": [
                "number",
                "device"
              ]
            }
          },
          "devices": {
            "type": "array",
            "description": "Each unit of the case the register takes, its PV and its storage (a storage case paired with this PV case counts as this case's), each registered on its own: when, null while it is not. The case is `registered` once every one is.",
            "items": {
              "type": "object",
              "properties": {
                "device": {
                  "type": "string",
                  "enum": [
                    "pv",
                    "storage"
                  ]
                },
                "registered_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When the register took the unit; null while it has not."
                }
              },
              "required": [
                "device",
                "registered_at"
              ]
            }
          },
          "submitted_at": {
            "type": "string",
            "format": "date-time",
            "description": "When your customer released the registration."
          },
          "registered_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the register took it."
          },
          "due_by": {
            "type": "string",
            "format": "date",
            "description": "The last day to register: one month after the commissioning day the report gave (31 January: the last day of February). Present once the registration is due and the report was sent with its day; each MaStR item in `open[]` carries it as its `due_by`."
          }
        },
        "required": [
          "state",
          "units",
          "devices"
        ]
      },
      "CommissioningRequest": {
        "type": "object",
        "description": "The commissioning report, as the console and the approval mail's page take it. A field left out keeps what the report's draft holds (the installer may have saved part of it). The report must end up with `commissioned_on` and `built_as_declared`, and where it was not built as registered with `module_count`, `module_watt` and a serial number for every device in `commissioning.devices`; what it lacks is a 422 naming each field, and a refused call keeps nothing. Meter number and reading are not part of the report.",
        "properties": {
          "commissioned_on": {
            "type": "string",
            "format": "date",
            "description": "The day it went into operation; it may lie ahead, for one already scheduled."
          },
          "built_as_declared": {
            "type": "boolean",
            "description": "Whether it was built as registered."
          },
          "module_count": {
            "type": "integer",
            "minimum": 1,
            "description": "How many modules, where it was not built as registered."
          },
          "module_watt": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "The watts of one module, where it was not built as registered."
          },
          "serials": {
            "type": "object",
            "maxProperties": 50,
            "propertyNames": {
              "pattern": "^[A-Za-z0-9-]{1,80}$"
            },
            "additionalProperties": {
              "type": "string",
              "maxLength": 80
            },
            "description": "A serial number per device, keyed as `commissioning.devices` names them. A key that is no device of the case is a 422 `unknown_field`."
          },
          "deviation": {
            "type": "string",
            "maxLength": 2000,
            "description": "What was built otherwise, in words."
          },
          "evidence": {
            "type": "object",
            "description": "File documents of the case by what they show, each named by its `id` as `documents` lists it: `doc_…` live, `doc_test_…` in the sandbox. An id that names no file document of this case, one of the other plane among them, is a 422 `not_allowed` on its slot. Optional: a file sent with `resolves` set to `commissioning.<slot>` while the report is due is in its slot already.",
            "properties": {
              "meter_photo": {
                "type": "string",
                "description": "A photo of the meter."
              },
              "e8": {
                "type": "string",
                "description": "The E.8 commissioning record."
              },
              "protocol": {
                "type": "string",
                "description": "The confirmation record."
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "MastrSubmitRequest": {
        "type": "object",
        "description": "No body at all is the common case.",
        "properties": {
          "sandbox_pace": {
            "type": "string",
            "enum": [
              "instant",
              "staged"
            ],
            "default": "instant",
            "description": "SANDBOX ONLY. How fast the rehearsed register answers the release: `instant` within the call, `staged` after the rehearsed operator's pace. Under a live key this is a 422 naming the field."
          }
        },
        "additionalProperties": false
      },
      "Reference": {
        "type": "object",
        "description": "A number the grid operator gave the case: `case` its own case number (the Vorgangsnummer), `offer` an offer's, `customer` the customer number it opened, `completion_notice` a completion notice's, `other` anything else it names the case by.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "case",
              "offer",
              "customer",
              "completion_notice",
              "other"
            ]
          },
          "number": {
            "type": "string",
            "maxLength": 80
          },
          "added_at": {
            "type": "string",
            "format": "date-time",
            "description": "When we recorded it."
          },
          "cancelled_at": {
            "type": "string",
            "format": "date-time",
            "description": "It no longer holds: the grid operator cancelled it (a completion notice filed again), or it was recorded wrong and corrected. It stays on the list, and the number in its place follows it (`case.reference_added`). One cancelled with none in its place is told by `case.updated` alone."
          }
        },
        "required": [
          "type",
          "number",
          "added_at"
        ]
      },
      "Withdrawal": {
        "type": "object",
        "description": "You asked to withdraw the case (`POST /v2/cases/{id}/withdraw`). `requested` while Wisnots withdraws it with the grid operator, which a person does; `confirmed` once they did, when `status` reads `withdrawn`.",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "requested",
              "confirmed"
            ]
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "description": "The reason you gave."
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "state",
          "requested_at"
        ]
      },
      "WithdrawRequest": {
        "type": "object",
        "description": "Why the case is withdrawn, for the person who withdraws it with the grid operator. Optional, as the body.",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "description": "One text, shown to us as you wrote it."
          }
        },
        "additionalProperties": false
      },
      "Business": {
        "type": "object",
        "description": "An installer firm your account files cases for. v1's `installer_ref` names the same firm: a ref a v1 case named is a business here, with that ref as its `external_ref`.",
        "properties": {
          "object": {
            "type": "string",
            "const": "business"
          },
          "id": {
            "type": "string",
            "description": "`biz_…` live, `biz_test_…` in the sandbox."
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "external_ref": {
            "type": "string",
            "description": "Your own id for the firm. It names the business and does not change."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null only for a firm a v1 case named by `installer_ref` and nobody has described since."
          },
          "address": {
            "$ref": "#/components/schemas/BusinessAddress"
          },
          "contact": {
            "$ref": "#/components/schemas/BusinessContact"
          },
          "electrician": {
            "$ref": "#/components/schemas/BusinessElectrician"
          },
          "registrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Registration"
            },
            "description": "Every registration the business holds: those you state, and those our team keeps from a document."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "restricted",
              "deactivated"
            ],
            "description": "Computed, never set: `deactivated` once you deactivated it; else `restricted` while `requirements` is not empty; else `active`. A restricted business's cases go on; what is missing stops them at the operator it names. On the sandbox a missing login is reported as live and holds no filing."
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessRequirement"
            },
            "description": "What stops one of its open cases (drafts included), per grid operator of those cases."
          },
          "cases": {
            "type": "object",
            "description": "Its cases on this plane: `open`, not at a final stage, drafts included; and in all.",
            "properties": {
              "open": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "open",
              "total"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "id",
          "mode",
          "external_ref",
          "name",
          "registrations",
          "status",
          "requirements",
          "cases",
          "created_at",
          "updated_at"
        ]
      },
      "BusinessAddress": {
        "type": "object",
        "description": "The business's address.",
        "properties": {
          "street": {
            "type": "string",
            "maxLength": 200
          },
          "house_number": {
            "type": "string",
            "maxLength": 200
          },
          "address_addition": {
            "type": "string",
            "maxLength": 200
          },
          "postal_code": {
            "type": "string",
            "maxLength": 200
          },
          "city": {
            "type": "string",
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "maxLength": 200
          }
        },
        "additionalProperties": false
      },
      "BusinessContact": {
        "type": "object",
        "description": "How the grid operator reaches the business.",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 200,
            "format": "email",
            "description": "An email address. Every case of the business carries it as its installer's (`installer.email`, `installer.contact_email`), so a value that is none is a 422 naming `contact.email` (`not_allowed`)."
          },
          "phone": {
            "type": "string",
            "maxLength": 200
          }
        },
        "additionalProperties": false
      },
      "BusinessElectrician": {
        "type": "object",
        "description": "The business's registered electrician (Elektrofachkraft), names kept apart as the forms ask for them.",
        "properties": {
          "first_name": {
            "type": "string",
            "maxLength": 200
          },
          "last_name": {
            "type": "string",
            "maxLength": 200
          }
        },
        "additionalProperties": false
      },
      "Registration": {
        "type": "object",
        "description": "The business's entry in a grid operator's directory of installers: `registration` (Eintragung) or `guest` (Gasteintragung). A case is filed with the registration at its own operator, an Eintragung before a Gasteintragung.",
        "properties": {
          "operator": {
            "type": "object",
            "description": "A grid operator: its key, as `operator` takes it, and its name.",
            "properties": {
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "key",
              "name"
            ]
          },
          "number": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "registration",
              "guest"
            ]
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "operator",
          "kind"
        ]
      },
      "BusinessRequirement": {
        "type": "object",
        "description": "Something that stops a case of the business, with the grid operator it is about.",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "registration_missing",
              "login_missing",
              "login_invalid"
            ],
            "description": "`registration_missing`: no registration with that operator; state one with PATCH. `login_missing`, `login_invalid`: no working portal login there; the business hands it in through its access link."
          },
          "text": {
            "$ref": "#/components/schemas/Localised"
          },
          "operator": {
            "type": "object",
            "description": "A grid operator: its key, as `operator` takes it, and its name.",
            "properties": {
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "key",
              "name"
            ]
          }
        },
        "required": [
          "code",
          "text"
        ]
      },
      "Login": {
        "type": "object",
        "description": "The business's portal login at one grid operator: a status, never the login. `valid`: one is held. `invalid`: the operator's portal refused it, a second factor included; ask the business for it again. `missing`: none yet. `not_needed`: the operator takes filings without a portal.",
        "properties": {
          "object": {
            "type": "string",
            "const": "login"
          },
          "operator": {
            "type": "object",
            "description": "A grid operator: its key, as `operator` takes it, and its name.",
            "properties": {
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "key",
              "name"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "valid",
              "invalid",
              "missing",
              "not_needed"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the login that decides the status was handed in or refused; absent while there is none."
          },
          "portals": {
            "type": "array",
            "description": "Where the grid operator runs several portals with an account each (one to apply for the connection, another for the plant in operation), the business holds a login for each: these are the portals it holds one of their own for, each with where that login stands. `status` speaks for the operator as a whole. Absent where it holds none.",
            "items": {
              "type": "object",
              "properties": {
                "portal": {
                  "type": "string",
                  "description": "The portal's host, as the login was handed in for it."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "valid",
                    "invalid"
                  ]
                }
              },
              "required": [
                "portal",
                "status"
              ]
            }
          }
        },
        "required": [
          "object",
          "operator",
          "status"
        ]
      },
      "AccessLink": {
        "type": "object",
        "description": "The business's own page for handing in its grid operator logins, encrypted, as many as it has. Send it to the business. Whoever holds it can add a login and never read one; it stays the same until our team revokes it.",
        "properties": {
          "object": {
            "type": "string",
            "const": "access_link"
          },
          "business_id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "object",
          "business_id",
          "url"
        ]
      },
      "EmbedSession": {
        "type": "object",
        "description": "A session for the embedded components on one page of yours: hand `client_secret` to that page's loader. **The secret comes back once, here**, and is kept only as its hash. It ends at `expires_at`, thirty minutes on, and sooner when the key that made it is revoked, its page is removed from your list or the business is deactivated. Ended or revoked, it answers 401, and the loader asks your `fetchClientSecret` for a new one; a removed page (403) or a deactivated business (409) ends the frame for good. Every request of the frame must come from `origin`.",
        "properties": {
          "object": {
            "type": "string",
            "const": "embed_session"
          },
          "client_secret": {
            "type": "string",
            "description": "`wes_live_…` or `wes_test_…`: a bearer credential for this session. Hand it only to our loader through `fetchClientSecret`; never log it and never put it in a URL."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "components": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "case",
                "registration",
                "upload",
                "registrations",
                "new-registration",
                "firm-data",
                "hint"
              ]
            }
          },
          "origin": {
            "type": "string",
            "description": "The page it runs on, as a browser names it."
          }
        },
        "required": [
          "object",
          "client_secret",
          "expires_at",
          "components",
          "origin"
        ]
      },
      "Requirements": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "requirements"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pv",
                "storage",
                "heat_pump",
                "charge_point",
                "air_conditioning"
              ]
            }
          },
          "operator": {
            "type": [
              "string",
              "null"
            ],
            "description": "The operator asked about, or null."
          },
          "surface": {
            "type": "string",
            "enum": [
              "universal",
              "operator"
            ],
            "description": "Your key's surface. An operator's own fields come only to an operator-aware key, and only with `operator`."
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequirementsField"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequirementsDocument"
            }
          }
        },
        "required": [
          "object",
          "types",
          "operator",
          "surface",
          "fields",
          "documents"
        ]
      },
      "RequirementsField": {
        "type": "object",
        "description": "A field of the dictionary: where it goes under `declared`, its number, its words, its input. Entries that say the same for several types are one entry naming them in `types`; a field that differs by type (the same path under another number) is one entry per type.",
        "properties": {
          "path": {
            "type": "string"
          },
          "nr": {
            "type": "integer"
          },
          "label": {
            "$ref": "#/components/schemas/Localised"
          },
          "help": {
            "$ref": "#/components/schemas/Localised"
          },
          "type": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "label": {
                  "$ref": "#/components/schemas/Localised"
                }
              },
              "required": [
                "value",
                "label"
              ]
            }
          },
          "operator_specific": {
            "type": "boolean",
            "const": true
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pv",
                "storage",
                "heat_pump",
                "charge_point",
                "air_conditioning"
              ]
            }
          }
        },
        "required": [
          "path",
          "label",
          "type",
          "types"
        ]
      },
      "RequirementsDocument": {
        "type": "object",
        "description": "A row of our document checklist: the documents it lists for the types named (`label`), its key (`kind`), and the size it applies at (`note`).",
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pv",
                "storage",
                "heat_pump",
                "charge_point",
                "air_conditioning"
              ]
            }
          }
        },
        "required": [
          "kind",
          "label",
          "types"
        ]
      },
      "Usage": {
        "type": "object",
        "description": "What your cases took in one calendar month in Europe/Berlin, by the rule the balance counts by: a case counts in the month it was submitted, once, with its credits (none for a case filed with another, which is not counted at all).",
        "properties": {
          "object": {
            "type": "string",
            "const": "usage"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ],
            "description": "Your key's plane. Under a sandbox key the numbers are the sandbox cases', what they would have been billed."
          },
          "month": {
            "type": "string",
            "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
          },
          "credits": {
            "type": "integer",
            "minimum": 0
          },
          "cases": {
            "type": "integer",
            "minimum": 0
          },
          "businesses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageBusiness"
            },
            "description": "The businesses with counted cases, most credits first; your account's own cases after the businesses on a tie."
          }
        },
        "required": [
          "object",
          "mode",
          "month",
          "credits",
          "cases",
          "businesses"
        ]
      },
      "UsageBusiness": {
        "type": "object",
        "description": "One business's share of the month, and by installation type.",
        "properties": {
          "business_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null for your account's own cases, which name no business."
          },
          "credits": {
            "type": "integer",
            "minimum": 0
          },
          "cases": {
            "type": "integer",
            "minimum": 0
          },
          "types": {
            "type": "object",
            "description": "By the type each case was opened as, the types with cases only. A case that never stated a type (a v1 `/14a` case without its device) counts above and under no type.",
            "properties": {
              "pv": {
                "$ref": "#/components/schemas/UsageCount"
              },
              "storage": {
                "$ref": "#/components/schemas/UsageCount"
              },
              "heat_pump": {
                "$ref": "#/components/schemas/UsageCount"
              },
              "charge_point": {
                "$ref": "#/components/schemas/UsageCount"
              },
              "air_conditioning": {
                "$ref": "#/components/schemas/UsageCount"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "business_id",
          "credits",
          "cases",
          "types"
        ]
      },
      "UsageCount": {
        "type": "object",
        "properties": {
          "credits": {
            "type": "integer",
            "minimum": 0
          },
          "cases": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "credits",
          "cases"
        ]
      },
      "Invoice": {
        "type": "object",
        "description": "One purchase of credits and its invoice. Credit is bought ahead, so there is one invoice per purchase and none per month.",
        "properties": {
          "object": {
            "type": "string",
            "const": "invoice"
          },
          "id": {
            "type": "string",
            "description": "`inv_…`. Invoices are live only."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "credits": {
            "type": "integer",
            "description": "The credits the purchase was for, whatever became of it."
          },
          "amount_total": {
            "type": "integer",
            "description": "What was paid, tax included, in the currency's minor unit (cents), as Stripe states it."
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217, lower case, as Stripe states it: `eur`."
          },
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "failed",
              "refunded"
            ]
          },
          "pdf_url": {
            "type": "string",
            "description": "Where the PDF is read, with the same key: a path on this API's host (`/v2/invoices/{id}/pdf`), not an absolute URL. Resolve it against the base URL you call; the SDK does."
          }
        },
        "required": [
          "object",
          "id",
          "created_at",
          "credits",
          "amount_total",
          "currency",
          "status",
          "pdf_url"
        ]
      },
      "CaseEvent": {
        "type": "object",
        "description": "An event about a case.",
        "properties": {
          "object": {
            "type": "string",
            "const": "event"
          },
          "id": {
            "type": "string",
            "description": "An opaque string, unique per event, with no prefix and no plane in it: the same in a webhook's `Wisnots-Event-Id`, the feed and the case's log."
          },
          "type": {
            "type": "string",
            "enum": [
              "case.created",
              "case.updated",
              "case.status_changed",
              "case.requirements_updated",
              "case.documents_read",
              "case.submitted",
              "case.commissioning_reported",
              "case.mastr_registered",
              "case.reference_added",
              "case.withdrawal_requested",
              "case.stale",
              "case.duplicate_detected"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "case": {
            "$ref": "#/components/schemas/Case",
            "description": "As it stands when the event is read or delivered, not as it stood when it happened. A delivery reads it under the requirements surface of the key that made the endpoint, as of each sending, as that key's GET, feed and case log do; 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}`."
          },
          "stage": {
            "type": "object",
            "description": "On `case.status_changed` and `case.submitted`: the stage the case stood in when the event happened, where `case` is as it stands now. A stage may come twice in a row (`case.status_changed`).",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "created",
                  "collecting",
                  "ready",
                  "submitted",
                  "approved",
                  "commissioning_reported",
                  "completion_filed",
                  "completion_confirmed",
                  "metering_pending",
                  "completed",
                  "rejected",
                  "withdrawn"
                ]
              },
              "label": {
                "type": "object",
                "description": "A short string in both languages. Display only; never a contract value.",
                "properties": {
                  "de": {
                    "type": "string"
                  },
                  "en": {
                    "type": "string"
                  }
                },
                "required": [
                  "de",
                  "en"
                ]
              }
            },
            "required": [
              "code",
              "label"
            ]
          },
          "requirements": {
            "type": "object",
            "description": "On `case.requirements_updated`: what moved in `open[]`, by item code. `added`: it came in; `resolved`: it left; `changed`: it stands in another state. An answered item is `changed` (to `in_review`) while its answer is with us, and `resolved` once the answer has gone to the grid operator; moves a moment apart are told once, as where they ended.",
            "properties": {
              "added": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "resolved": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "changed": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "added",
              "resolved",
              "changed"
            ]
          },
          "reference": {
            "$ref": "#/components/schemas/Reference",
            "description": "On `case.reference_added`: the number, as it was added."
          },
          "duplicate_of": {
            "type": "string",
            "description": "On `case.duplicate_detected`: the open case of yours the new one likely repeats."
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "created_at",
          "case"
        ]
      },
      "BusinessEvent": {
        "type": "object",
        "description": "An event about a business.",
        "properties": {
          "object": {
            "type": "string",
            "const": "event"
          },
          "id": {
            "type": "string",
            "description": "An opaque string, unique per event, with no prefix and no plane in it: the same in a webhook's `Wisnots-Event-Id`, the feed and the case's log."
          },
          "type": {
            "type": "string",
            "enum": [
              "business.created",
              "business.updated",
              "business.deactivated",
              "business.login_required"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "business": {
            "$ref": "#/components/schemas/Business",
            "description": "As it stands when the event is read or delivered, not as it stood when it happened."
          },
          "requirement": {
            "$ref": "#/components/schemas/BusinessRequirement",
            "description": "On `business.login_required`: what the login asks of the business, at which operator."
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "created_at",
          "business"
        ]
      },
      "InvoiceEvent": {
        "type": "object",
        "description": "An event about an invoice.",
        "properties": {
          "object": {
            "type": "string",
            "const": "event"
          },
          "id": {
            "type": "string",
            "description": "An opaque string, unique per event, with no prefix and no plane in it: the same in a webhook's `Wisnots-Event-Id`, the feed and the case's log."
          },
          "type": {
            "type": "string",
            "enum": [
              "invoice.created"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "invoice": {
            "$ref": "#/components/schemas/Invoice",
            "description": "As it stands when the event is read or delivered, not as it stood when it happened."
          }
        },
        "required": [
          "object",
          "id",
          "type",
          "created_at",
          "invoice"
        ]
      },
      "Event": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CaseEvent"
          },
          {
            "$ref": "#/components/schemas/BusinessEvent"
          },
          {
            "$ref": "#/components/schemas/InvoiceEvent"
          }
        ],
        "description": "An event: about a case, a business or an invoice, by which subject it carries."
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "webhook_endpoint"
          },
          "id": {
            "type": "string",
            "description": "`we_…` live, `we_test_…` in the sandbox."
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "case.created",
                "case.updated",
                "case.status_changed",
                "case.requirements_updated",
                "case.documents_read",
                "case.submitted",
                "case.commissioning_reported",
                "case.mastr_registered",
                "case.reference_added",
                "case.withdrawal_requested",
                "case.stale",
                "case.duplicate_detected",
                "business.created",
                "business.updated",
                "business.deactivated",
                "business.login_required",
                "invoice.created"
              ]
            },
            "description": "The events it is told of."
          },
          "description": {
            "type": "string"
          },
          "active": {
            "type": "boolean",
            "description": "False once switched off or disabled after repeated failure."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_attempt_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_status": {
            "type": "integer",
            "description": "The HTTP status your endpoint last answered."
          },
          "last_error": {
            "type": "string"
          },
          "disabled_at": {
            "type": "string",
            "format": "date-time"
          },
          "consecutive_failures": {
            "type": "integer"
          },
          "secret": {
            "type": "string",
            "description": "Only in the answer that made the endpoint: the signing secret, shown this once."
          }
        },
        "required": [
          "object",
          "id",
          "url",
          "mode",
          "active",
          "created_at",
          "consecutive_failures"
        ]
      },
      "CaseList": {
        "type": "object",
        "description": "A page of cases.",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Case"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page follows now."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send as `cursor` for the next page."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "BusinessList": {
        "type": "object",
        "description": "A page of businesses.",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Business"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page follows now."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send as `cursor` for the next page."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "LoginList": {
        "type": "object",
        "description": "A business's logins, all on one page.",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Login"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page follows now."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send as `cursor` for the next page."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "EventList": {
        "type": "object",
        "description": "A page of events, oldest first.",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page follows now."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send as `cursor` for the next page."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "InvoiceList": {
        "type": "object",
        "description": "A page of invoices, newest first.",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page follows now."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send as `cursor` for the next page."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "WebhookEndpointList": {
        "type": "object",
        "description": "Your v2 endpoints, all on one page.",
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page follows now."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send as `cursor` for the next page."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CreateCaseRequest": {
        "type": "object",
        "description": "A draft of one installation. Only `type` is required: build the rest with PATCH and documents. `operator` may also be sent as `declared.operator`.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "pv",
              "storage",
              "heat_pump",
              "charge_point",
              "air_conditioning"
            ]
          },
          "external_ref": {
            "type": "string",
            "maxLength": 120,
            "description": "Your own identifier for the case, echoed everywhere and filterable."
          },
          "business_id": {
            "type": "string",
            "description": "The business the case is filed for. Leave it out for your account's own case."
          },
          "operator": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
            "description": "The grid operator's key (`hen` for Hamburger Energienetze). Leave it out and we look it up from the site's address. `sandbox` is the sandbox's own operator, on sandbox keys only. One we do not carry, one no longer active, or `sandbox` on a live key is a 422 naming `operator` (`not_allowed`)."
          },
          "declared": {
            "$ref": "#/components/schemas/Declared"
          }
        },
        "required": [
          "type"
        ],
        "additionalProperties": false
      },
      "PatchCaseRequest": {
        "type": "object",
        "description": "Declared values, the operator, the business, or several at once. Values merge as v1's PATCH merges them: a field left out stays, null clears it back to what was read, a list of blocks merges by position.\n\n**After hand-over** a PATCH answers what is asked. While something is asked (a `field` item of the request open on the case, or a MaStR question, `phase: mastr`), every value must be at the `resolve.field` of such an open item, or the PATCH is a 422 naming each other path in `errors` (`declared.<path>`, `not_allowed`) and nothing of it lands. With nothing asked, any PATCH of a handed-over case is a 409 `case_already_filed`, and so is a PATCH that names no value and any answer while an earlier one is on its way to the operator. `operator` is the exception: it answers `grid_operator_unclear` before and after hand-over, and a case handed over with its operator decided keeps it (409).",
        "properties": {
          "declared": {
            "$ref": "#/components/schemas/Declared"
          },
          "operator": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
            "description": "The grid operator's key (`hen` for Hamburger Energienetze). Leave it out and we look it up from the site's address. `sandbox` is the sandbox's own operator, on sandbox keys only. One we do not carry, one no longer active, or `sandbox` on a live key is a 422 naming `operator` (`not_allowed`)."
          },
          "business_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Moves a draft to another business, or to none with null. A draft's alone: a handed-over case keeps the business it was filed for."
          }
        },
        "additionalProperties": false
      },
      "SubmitRequest": {
        "type": "object",
        "description": "No body at all is the common case.",
        "properties": {
          "sandbox_outcome": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "needs_more_information"
            ],
            "description": "SANDBOX ONLY. What the grid operator decides. If the sandbox always accepted, nobody would build the rejection path, so you choose, and the case lands in the same stage a live one will, with a stated reason. Left out, the answer is the one the site's scenario postcode names (`00041` asks for more, `00150` rejects; the v2 reference lists them), and `accepted` at every other address. The case keeps the answer: `staged` and every step played later give it too, never the postcode's.\n\nUnder a live key this is a 422 naming the field, not an ignore. A live filing's outcome comes from the operator."
          },
          "sandbox_pace": {
            "type": "string",
            "enum": [
              "instant",
              "staged"
            ],
            "default": "instant",
            "description": "SANDBOX ONLY. How fast the sandbox operator answers.\n\n`instant` answers inside the filing call, which is what a test suite wants: the case moves to `submitted`, then the answer comes, as on a live case. `staged` is the one thing an instant answer cannot show: a live case is filed, waits, and is answered later. At either pace `case.status_changed` tells `ready` at the hand-over, `submitted` as the filing reaches the operator, then `sandbox_outcome`: all three before an instant call returns, a few seconds apart on a timer when staged, each an event your webhook receives in turn, so a receiver that has only ever seen the answer arrive inside the filing call gets to test the wait. A question for more is `submitted` once more, as the case waits for its answer, so a status and a stage can come twice in a row.\n\nAt either pace, a portal login the sandbox operator's portal refuses (`expired@test.wisnots.com`) holds the filing at `ready` until one it takes is handed in: live, nobody files it before. A missing login holds no filing: the sandbox tells it as live does, and the filing goes on.\n\nUnder a live key this is a 422 naming the field. A live filing is answered when the grid operator answers."
          },
          "declarations": {
            "type": "string",
            "enum": [
              "release",
              "withhold"
            ],
            "default": "release",
            "description": "What this hand-over does with the grid operator's standard declarations: the confirmation that the operator's technical connection conditions are met, and the declaration regarding the operator's privacy notice.\n\n`release`, the default, releases them with the hand-over where the account has accepted the terms in the edition of 28 September 2026 or later, whose § 3 (3) provides for it, and does nothing under an earlier edition. `withhold` keeps them open for this case, for one you cannot make them for yet; they are then asked for like any other open question. No other consent an operator asks for, such as a power of attorney or a landowner's permission, is ever set this way."
          }
        },
        "additionalProperties": false
      },
      "DocumentText": {
        "type": "object",
        "description": "A text (a pasted mail, a note), or on a sandbox key a fixture: `text` or `fixture`, not both.",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 100000
          },
          "fixture": {
            "type": "string",
            "enum": [
              "wallbox-invoice-de",
              "heat-pump-invoice-de",
              "pv-invoice-de",
              "battery-invoice-de",
              "air-conditioning-invoice-de"
            ],
            "description": "SANDBOX ONLY. A document whose reading is known, read at no cost and the same every time. Carries its own label."
          },
          "label": {
            "type": "string",
            "maxLength": 200,
            "description": "What you call it, shown with it. One line."
          },
          "resolves": {
            "type": "string",
            "maxLength": 200,
            "description": "The `code` of the item the document answers. On a handed-over case this is what lets it in: it must name a document or text item of the request open on the case, or a slot of a due commissioning report (`commissioning.meter_photo`, `commissioning.e8`, `commissioning.protocol`, a file only)."
          }
        },
        "additionalProperties": false
      },
      "DocumentForm": {
        "type": "object",
        "description": "One file per request, as a `file` part.",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "A PDF, JPEG, PNG, WebP or HEIC, or a plain-text file sent as `text/plain` (read as text without a model call, its first 200,000 characters, at most 8 MiB), up to 20 MB (20,000,000 bytes). What it is comes from its bytes; the part's own media type counts only for plain text."
          },
          "label": {
            "type": "string",
            "maxLength": 200,
            "description": "What you call it, shown with it. One line."
          },
          "resolves": {
            "type": "string",
            "maxLength": 200,
            "description": "The `code` of the item the document answers. On a handed-over case this is what lets it in: it must name a document or text item of the request open on the case, or a slot of a due commissioning report (`commissioning.meter_photo`, `commissioning.e8`, `commissioning.protocol`, a file only)."
          }
        },
        "required": [
          "file"
        ]
      },
      "CreateBusinessRequest": {
        "type": "object",
        "properties": {
          "external_ref": {
            "type": "string",
            "maxLength": 120,
            "description": "Your own id for the firm, unique on your account and plane, compared exactly. v1's `installer_ref` for the same firm."
          },
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "address": {
            "$ref": "#/components/schemas/BusinessAddress"
          },
          "contact": {
            "$ref": "#/components/schemas/BusinessContact"
          },
          "electrician": {
            "$ref": "#/components/schemas/BusinessElectrician"
          },
          "registrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistrationRequest"
            },
            "maxItems": 20,
            "description": "One per grid operator."
          }
        },
        "required": [
          "external_ref",
          "name"
        ],
        "additionalProperties": false
      },
      "PatchBusinessRequest": {
        "type": "object",
        "description": "What changes. A part sent replaces the stored one; null, or a part with nothing in it, removes it; a part left out stays. `registrations` is every registration you state: one you no longer send goes, one our team keeps from a document stays. `external_ref` does not change. The business's drafts take on what changed; a handed-over case keeps what it was filed with.",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200
          },
          "address": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BusinessAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BusinessContact"
              },
              {
                "type": "null"
              }
            ]
          },
          "electrician": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BusinessElectrician"
              },
              {
                "type": "null"
              }
            ]
          },
          "registrations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistrationRequest"
            },
            "maxItems": 20,
            "description": "One per grid operator."
          }
        },
        "additionalProperties": false
      },
      "RegistrationRequest": {
        "type": "object",
        "properties": {
          "operator": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
            "description": "The grid operator's key. One we do not carry is a 422 naming `registrations[i].operator` (`not_allowed`), every such entry at once."
          },
          "number": {
            "type": "string",
            "maxLength": 64
          },
          "kind": {
            "type": "string",
            "enum": [
              "registration",
              "guest"
            ]
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "operator",
          "number",
          "kind"
        ],
        "additionalProperties": false
      },
      "CreateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "https, and not a loopback or private address."
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "case.created",
                "case.updated",
                "case.status_changed",
                "case.requirements_updated",
                "case.documents_read",
                "case.submitted",
                "case.commissioning_reported",
                "case.mastr_registered",
                "case.reference_added",
                "case.withdrawal_requested",
                "case.stale",
                "case.duplicate_detected",
                "business.created",
                "business.updated",
                "business.deactivated",
                "business.login_required",
                "invoice.created"
              ]
            },
            "minItems": 1,
            "description": "v2's event names. Leave it out for every one; an empty list or an unknown name is refused."
          },
          "description": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "CreateCaseEmbedSessionRequest": {
        "type": "object",
        "description": "The page, and what the frame shows of the case.",
        "properties": {
          "origin": {
            "type": "string",
            "maxLength": 200,
            "example": "https://app.example.com",
            "description": "The origin of the page the frame appears on: scheme and host, no path. It must be one of your account's pages for embedded components on this key's plane (console, Developers, Connect, Embed, Pages allowed to embed components); a sandbox key also takes `http://localhost` and `http://127.0.0.1` on any port."
          },
          "components": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "case",
                "registration",
                "upload"
              ]
            },
            "default": [
              "case"
            ],
            "description": "`case`: the case whole, with what it still needs, its commissioning report and its MaStR release. `registration` and `upload`: the first intake and the upload form of a draft, with its hand-over; a handed-over case takes `case` only."
          },
          "platform_name": {
            "type": "string",
            "maxLength": 80,
            "description": "Your product's name as your users know it. The frame shows it, and our log of your account names the frame's acts by it."
          },
          "locale": {
            "type": "string",
            "enum": [
              "de",
              "en"
            ],
            "default": "de",
            "description": "The frame's language."
          },
          "sandbox_outcome": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "needs_more_information"
            ],
            "description": "SANDBOX ONLY. What the grid operator decides. If the sandbox always accepted, nobody would build the rejection path, so you choose, and the case lands in the same stage a live one will, with a stated reason. Left out, the answer is the one the site's scenario postcode names (`00041` asks for more, `00150` rejects; the v2 reference lists them), and `accepted` at every other address. The case keeps the answer: `staged` and every step played later give it too, never the postcode's.\n\nUnder a live key this is a 422 naming the field, not an ignore. A live filing's outcome comes from the operator."
          },
          "sandbox_pace": {
            "type": "string",
            "enum": [
              "instant",
              "staged"
            ],
            "default": "staged",
            "description": "Sandbox keys only: the pace of the rehearsed answers to a hand-over in the frame. Left out, staged, since a person is watching."
          }
        },
        "required": [
          "origin"
        ],
        "additionalProperties": false
      },
      "CreateBusinessEmbedSessionRequest": {
        "type": "object",
        "description": "The page, and what the frame shows of the business.",
        "properties": {
          "origin": {
            "type": "string",
            "maxLength": 200,
            "example": "https://app.example.com",
            "description": "The origin of the page the frame appears on: scheme and host, no path. It must be one of your account's pages for embedded components on this key's plane (console, Developers, Connect, Embed, Pages allowed to embed components); a sandbox key also takes `http://localhost` and `http://127.0.0.1` on any port."
          },
          "components": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "registrations",
                "new-registration",
                "firm-data",
                "hint"
              ]
            },
            "description": "`registrations`: the business's cases, each opened in place, and before its first case its address and registrations. `new-registration`: a new case of the business, one per installation type chosen, its documents and its hand-over. `firm-data`: the business's details and registrations, and its logins at the grid operators, typed in the frame. `hint`: a line saying how many of its cases wait for the business."
          },
          "platform_name": {
            "type": "string",
            "maxLength": 80,
            "description": "Your product's name as your users know it. The frame shows it, and our log of your account names the frame's acts by it."
          },
          "locale": {
            "type": "string",
            "enum": [
              "de",
              "en"
            ],
            "default": "de",
            "description": "The frame's language."
          },
          "sandbox_outcome": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "needs_more_information"
            ],
            "description": "SANDBOX ONLY. What the grid operator decides. If the sandbox always accepted, nobody would build the rejection path, so you choose, and the case lands in the same stage a live one will, with a stated reason. Left out, the answer is the one the site's scenario postcode names (`00041` asks for more, `00150` rejects; the v2 reference lists them), and `accepted` at every other address. The case keeps the answer: `staged` and every step played later give it too, never the postcode's.\n\nUnder a live key this is a 422 naming the field, not an ignore. A live filing's outcome comes from the operator."
          },
          "sandbox_pace": {
            "type": "string",
            "enum": [
              "instant",
              "staged"
            ],
            "default": "staged",
            "description": "Sandbox keys only: the pace of the rehearsed answers to a hand-over in the frame. Left out, staged, since a person is watching."
          }
        },
        "required": [
          "origin",
          "components"
        ],
        "additionalProperties": false
      },
      "GridOperatorReplyRequest": {
        "type": "object",
        "description": "What the grid operator replies. Its own words are no field of v2, so a reply takes none.",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "approved",
              "rejected",
              "query"
            ],
            "description": "`approved` or `rejected` while the case waits for the operator's answer; `query` at any point after the hand-over while no request is open: the sandbox operator's request, in `open[]`."
          }
        },
        "additionalProperties": false
      }
    },
    "examples": {
      "CreateCase": {
        "summary": "A wallbox for a business",
        "value": {
          "type": "charge_point",
          "external_ref": "ERP-4711",
          "business_id": "biz_5Tq8Lm2Rx",
          "declared": {
            "site": {
              "street": "Ahornweg",
              "house_number": "7a",
              "postal_code": "22607",
              "city": "Hamburg"
            }
          }
        }
      },
      "CaseDraft": {
        "summary": "Just opened, with what it still needs",
        "value": {
          "object": "case",
          "id": "anm_7Kq3ZmR8vT",
          "mode": "live",
          "type": "charge_point",
          "external_ref": "ERP-4711",
          "business_id": "biz_5Tq8Lm2Rx",
          "status": "needs_input",
          "stage": {
            "code": "collecting",
            "label": {
              "de": "Angaben oder Unterlagen fehlen",
              "en": "Details or documents are missing"
            }
          },
          "blocked": true,
          "operator": {
            "key": "hen",
            "name": "Hamburger Energienetze GmbH",
            "source": "declared"
          },
          "group": null,
          "billing": {
            "credits": 1,
            "billed": false
          },
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "value": "Ahornweg",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.house_number",
              "nr": 1003,
              "label": {
                "de": "Hausnummer",
                "en": "House number"
              },
              "value": "7a",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.postal_code",
              "nr": 1007,
              "label": {
                "de": "PLZ",
                "en": "Postal code"
              },
              "value": "22607",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.city",
              "nr": 1008,
              "label": {
                "de": "Ort",
                "en": "City"
              },
              "value": "Hamburg",
              "source": "declared",
              "confidence": "certain"
            }
          ],
          "open": [
            {
              "code": "end_customer.phone",
              "text": {
                "de": "Telefon",
                "en": "Phone"
              },
              "help": {
                "de": "Tragen Sie die Telefonnummer des Anschlussnutzers ein.",
                "en": "Enter the phone number of the connection user."
              },
              "owner": "end_customer",
              "blocking": true,
              "state": "open",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "registration",
              "resolve": {
                "field": "end_customer.phone"
              },
              "input": {
                "type": "string"
              },
              "nr": 1109
            },
            {
              "code": "section_14a.control_responsibility",
              "text": {
                "de": "Steuerbarkeit",
                "en": "Controllability"
              },
              "help": {
                "de": "Wählen Sie aus, wer mit der Herstellung der Steuerbarkeit beauftragt wird. Hinweis: für die Bereitstellung und Anbindung des Steuergerätes (Steuerbox) an der Übergabestelle Netz zur Kundenanlage ist der Messtellenbetreiber zuständig.",
                "en": "State who is responsible for grid-oriented control."
              },
              "owner": "wisnots",
              "blocking": true,
              "state": "open",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "registration",
              "resolve": {
                "field": "section_14a.control_responsibility"
              },
              "input": {
                "type": "enum",
                "options": [
                  {
                    "value": "grid_operator",
                    "label": {
                      "de": "Netzbetreiber",
                      "en": "Grid operator"
                    }
                  },
                  {
                    "value": "metering_operator",
                    "label": {
                      "de": "Messstellenbetreiber",
                      "en": "Metering point operator"
                    }
                  }
                ]
              },
              "nr": 2010
            },
            {
              "code": "installer.registry_number",
              "text": {
                "de": "Eintragungsnummer",
                "en": "Registry number"
              },
              "help": {
                "de": "Tragen Sie die Eintragungsnummer des Elektrofachbetriebs ein.",
                "en": "Enter the registry number of the electrical contractor."
              },
              "owner": "installer",
              "blocking": false,
              "state": "open",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "registration",
              "resolve": {
                "field": "installer.registry_number"
              },
              "input": {
                "type": "string"
              },
              "nr": 1411
            }
          ],
          "conflicts": [],
          "rejected": [],
          "documents": [],
          "signature": null,
          "commissioning": {
            "state": "not_due"
          },
          "mastr": null,
          "references": [],
          "withdrawal": null,
          "duplicate_of": null,
          "requirements": {
            "surface": "universal",
            "operator_outstanding": 0
          },
          "created_at": "2026-08-30T09:12:04Z",
          "updated_at": "2026-08-30T09:12:04Z",
          "last_activity_at": "2026-08-30T09:12:04Z"
        }
      },
      "CaseNeedsInput": {
        "summary": "Read, with two things blocking",
        "value": {
          "object": "case",
          "id": "anm_7Kq3ZmR8vT",
          "mode": "live",
          "type": "charge_point",
          "external_ref": "ERP-4711",
          "business_id": "biz_5Tq8Lm2Rx",
          "status": "needs_input",
          "stage": {
            "code": "collecting",
            "label": {
              "de": "Angaben oder Unterlagen fehlen",
              "en": "Details or documents are missing"
            }
          },
          "blocked": true,
          "operator": {
            "key": "hen",
            "name": "Hamburger Energienetze GmbH",
            "source": "declared"
          },
          "group": null,
          "billing": {
            "credits": 1,
            "billed": false
          },
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "value": "Ahornweg",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Ahornweg 7a"
              }
            },
            {
              "path": "site.house_number",
              "nr": 1003,
              "label": {
                "de": "Hausnummer",
                "en": "House number"
              },
              "value": "7a",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Ahornweg 7a"
              }
            },
            {
              "path": "site.postal_code",
              "nr": 1007,
              "label": {
                "de": "PLZ",
                "en": "Postal code"
              },
              "value": "22607",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
              }
            },
            {
              "path": "site.city",
              "nr": 1008,
              "label": {
                "de": "Ort",
                "en": "City"
              },
              "value": "Hamburg",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
              }
            },
            {
              "path": "site.address_kind",
              "nr": 1001,
              "label": {
                "de": "Art der Standortangabe",
                "en": "Kind of location detail"
              },
              "value": "postalische Adresse",
              "source": "derived",
              "confidence": "certain"
            },
            {
              "path": "end_customer.last_name",
              "nr": 1101,
              "label": {
                "de": "Name oder Firmenname",
                "en": "Name or company"
              },
              "value": "Bergmann",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Herrn Alexander Bergmann"
              }
            },
            {
              "path": "end_customer.first_name",
              "nr": 1102,
              "label": {
                "de": "Vorname",
                "en": "First name"
              },
              "value": "Alexander",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Herrn Alexander Bergmann"
              }
            },
            {
              "path": "installer.company",
              "nr": 1402,
              "label": {
                "de": "Firmenname",
                "en": "Company name"
              },
              "value": "Nordlicht Elektrotechnik GmbH",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Nordlicht Elektrotechnik GmbH · Gewerbestraße 12"
              }
            },
            {
              "path": "device.manufacturer",
              "nr": 5002,
              "label": {
                "de": "Hersteller",
                "en": "Manufacturer"
              },
              "value": "ABL",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "ABL eMH3 3W2250"
              }
            },
            {
              "path": "device.model",
              "nr": 5003,
              "label": {
                "de": "Typ",
                "en": "Type"
              },
              "value": "eMH3 3W2250",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "ABL eMH3 3W2250"
              }
            },
            {
              "path": "device.grid_draw_kw",
              "nr": 5017,
              "label": {
                "de": "Netzbezugsleistung",
                "en": "Grid draw"
              },
              "value": 11,
              "source": "extracted",
              "confidence": "certain",
              "unit": "kW",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Freigegebene Leistung: 11 kW"
              }
            },
            {
              "path": "section_14a.is_controllable",
              "nr": 5010,
              "label": {
                "de": "Steuerbare Verbrauchseinrichtung nach § 14a EnWG",
                "en": "Controllable consumption device under § 14a EnWG"
              },
              "value": "Ja",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "device.installed_at",
              "label": {
                "de": "Inbetriebnahmedatum",
                "en": "Commissioning date"
              },
              "value": "2022-04-19",
              "source": "extracted",
              "confidence": "probable",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Liefertermin: 19.04.22"
              }
            }
          ],
          "open": [
            {
              "code": "end_customer.phone",
              "text": {
                "de": "Telefon",
                "en": "Phone"
              },
              "help": {
                "de": "Tragen Sie die Telefonnummer des Anschlussnutzers ein.",
                "en": "Enter the phone number of the connection user."
              },
              "owner": "end_customer",
              "blocking": true,
              "state": "open",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "registration",
              "resolve": {
                "field": "end_customer.phone"
              },
              "input": {
                "type": "string"
              },
              "nr": 1109
            },
            {
              "code": "section_14a.control_responsibility",
              "text": {
                "de": "Steuerbarkeit",
                "en": "Controllability"
              },
              "help": {
                "de": "Wählen Sie aus, wer mit der Herstellung der Steuerbarkeit beauftragt wird. Hinweis: für die Bereitstellung und Anbindung des Steuergerätes (Steuerbox) an der Übergabestelle Netz zur Kundenanlage ist der Messtellenbetreiber zuständig.",
                "en": "State who is responsible for grid-oriented control."
              },
              "owner": "wisnots",
              "blocking": true,
              "state": "open",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "registration",
              "resolve": {
                "field": "section_14a.control_responsibility"
              },
              "input": {
                "type": "enum",
                "options": [
                  {
                    "value": "grid_operator",
                    "label": {
                      "de": "Netzbetreiber",
                      "en": "Grid operator"
                    }
                  },
                  {
                    "value": "metering_operator",
                    "label": {
                      "de": "Messstellenbetreiber",
                      "en": "Metering point operator"
                    }
                  }
                ]
              },
              "nr": 2010
            },
            {
              "code": "installer.registry_number",
              "text": {
                "de": "Eintragungsnummer",
                "en": "Registry number"
              },
              "help": {
                "de": "Tragen Sie die Eintragungsnummer des Elektrofachbetriebs ein.",
                "en": "Enter the registry number of the electrical contractor."
              },
              "owner": "installer",
              "blocking": false,
              "state": "open",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "registration",
              "resolve": {
                "field": "installer.registry_number"
              },
              "input": {
                "type": "string"
              },
              "nr": 1411
            }
          ],
          "conflicts": [
            {
              "path": "device.count",
              "nr": 5001,
              "label": {
                "de": "Anzahl Ladeeinrichtungen",
                "en": "Number of charge points"
              },
              "blocking": true,
              "candidates": [
                {
                  "value": 1,
                  "source": "extracted",
                  "evidence": {
                    "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                    "filename": "technische-zustimmung.pdf",
                    "quote": "ABL eMH3 3W2250 | 1 | 11 kW | AC"
                  }
                },
                {
                  "value": 7,
                  "source": "extracted",
                  "evidence": {
                    "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                    "filename": "schlussrechnung.pdf",
                    "quote": "1 x eMH3 2260 B, 6 x eMH3 2250 B Slave"
                  }
                }
              ]
            }
          ],
          "rejected": [],
          "documents": [
            {
              "object": "document",
              "id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
              "kind": "file",
              "filename": "technische-zustimmung.pdf",
              "content_type": "application/pdf",
              "bytes": 181012,
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            },
            {
              "object": "document",
              "id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
              "kind": "file",
              "filename": "schlussrechnung.pdf",
              "content_type": "application/pdf",
              "bytes": 374756,
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            },
            {
              "object": "document",
              "id": "doc_jx74ndzcwpztje1fpyh0dasbk7rgjzv3",
              "kind": "text",
              "label": "Kundenmail",
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            }
          ],
          "signature": null,
          "commissioning": {
            "state": "not_due"
          },
          "mastr": null,
          "references": [],
          "withdrawal": null,
          "duplicate_of": null,
          "requirements": {
            "surface": "universal",
            "operator_outstanding": 0
          },
          "created_at": "2026-08-30T09:12:04Z",
          "updated_at": "2026-08-30T09:12:41Z",
          "last_activity_at": "2026-08-30T09:12:41Z"
        }
      },
      "CaseAnswering": {
        "summary": "Handed over, answering what the grid operator asks",
        "value": {
          "object": "case",
          "id": "anm_7Kq3ZmR8vT",
          "mode": "live",
          "type": "charge_point",
          "external_ref": "ERP-4711",
          "business_id": "biz_5Tq8Lm2Rx",
          "status": "submitted",
          "stage": {
            "code": "submitted",
            "label": {
              "de": "Antrag eingereicht, Netzbetreiber prüft",
              "en": "Application filed, the grid operator is reviewing it"
            }
          },
          "blocked": true,
          "operator": {
            "key": "hen",
            "name": "Hamburger Energienetze GmbH",
            "source": "declared"
          },
          "group": null,
          "billing": {
            "credits": 1,
            "billed": true,
            "billed_at": "2026-08-30T09:32:55Z"
          },
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "value": "Ahornweg",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Ahornweg 7a"
              }
            },
            {
              "path": "site.house_number",
              "nr": 1003,
              "label": {
                "de": "Hausnummer",
                "en": "House number"
              },
              "value": "7a",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Ahornweg 7a"
              }
            },
            {
              "path": "site.postal_code",
              "nr": 1007,
              "label": {
                "de": "PLZ",
                "en": "Postal code"
              },
              "value": "22607",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
              }
            },
            {
              "path": "site.city",
              "nr": 1008,
              "label": {
                "de": "Ort",
                "en": "City"
              },
              "value": "Hamburg",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
              }
            },
            {
              "path": "site.address_kind",
              "nr": 1001,
              "label": {
                "de": "Art der Standortangabe",
                "en": "Kind of location detail"
              },
              "value": "postalische Adresse",
              "source": "derived",
              "confidence": "certain"
            },
            {
              "path": "end_customer.last_name",
              "nr": 1101,
              "label": {
                "de": "Name oder Firmenname",
                "en": "Name or company"
              },
              "value": "Bergmann",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Herrn Alexander Bergmann"
              }
            },
            {
              "path": "end_customer.first_name",
              "nr": 1102,
              "label": {
                "de": "Vorname",
                "en": "First name"
              },
              "value": "Alexander",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Herrn Alexander Bergmann"
              }
            },
            {
              "path": "installer.company",
              "nr": 1402,
              "label": {
                "de": "Firmenname",
                "en": "Company name"
              },
              "value": "Nordlicht Elektrotechnik GmbH",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Nordlicht Elektrotechnik GmbH · Gewerbestraße 12"
              }
            },
            {
              "path": "device.manufacturer",
              "nr": 5002,
              "label": {
                "de": "Hersteller",
                "en": "Manufacturer"
              },
              "value": "ABL",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "ABL eMH3 3W2250"
              }
            },
            {
              "path": "device.model",
              "nr": 5003,
              "label": {
                "de": "Typ",
                "en": "Type"
              },
              "value": "eMH3 3W2250",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "ABL eMH3 3W2250"
              }
            },
            {
              "path": "device.grid_draw_kw",
              "nr": 5017,
              "label": {
                "de": "Netzbezugsleistung",
                "en": "Grid draw"
              },
              "value": 11,
              "source": "extracted",
              "confidence": "certain",
              "unit": "kW",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Freigegebene Leistung: 11 kW"
              }
            },
            {
              "path": "section_14a.is_controllable",
              "nr": 5010,
              "label": {
                "de": "Steuerbare Verbrauchseinrichtung nach § 14a EnWG",
                "en": "Controllable consumption device under § 14a EnWG"
              },
              "value": "Ja",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "device.installed_at",
              "label": {
                "de": "Inbetriebnahmedatum",
                "en": "Commissioning date"
              },
              "value": "2022-04-19",
              "source": "extracted",
              "confidence": "probable",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Liefertermin: 19.04.22"
              }
            }
          ],
          "open": [
            {
              "code": "device.installed_at",
              "text": {
                "de": "Datum der Inbetriebnahme",
                "en": "Commissioning date"
              },
              "owner": "installer",
              "blocking": true,
              "state": "in_review",
              "due_by": "2026-09-15",
              "source": "grid_operator",
              "note": "Der Netzbetreiber braucht für die Prüfung noch das Datum der Inbetriebnahme, die Vollmacht Ihres Kunden und eine kurze Erläuterung zur Einspeisung.",
              "asked_at": "2026-09-01T10:12:00Z",
              "phase": "registration",
              "resolve": {
                "field": "device.installed_at"
              },
              "input": {
                "type": "date"
              }
            },
            {
              "code": "documents.vollmacht",
              "text": {
                "de": "Vollmacht",
                "en": "Power of attorney"
              },
              "owner": "installer",
              "blocking": true,
              "state": "open",
              "due_by": "2026-09-15",
              "source": "grid_operator",
              "note": "Der Netzbetreiber braucht für die Prüfung noch das Datum der Inbetriebnahme, die Vollmacht Ihres Kunden und eine kurze Erläuterung zur Einspeisung.",
              "asked_at": "2026-09-01T10:12:00Z",
              "phase": "registration",
              "resolve": {
                "document": true
              }
            },
            {
              "code": "notes.explanation",
              "text": {
                "de": "Erläuterung",
                "en": "Explanation"
              },
              "owner": "installer",
              "blocking": true,
              "state": "open",
              "due_by": "2026-09-15",
              "source": "grid_operator",
              "note": "Der Netzbetreiber braucht für die Prüfung noch das Datum der Inbetriebnahme, die Vollmacht Ihres Kunden und eine kurze Erläuterung zur Einspeisung.",
              "asked_at": "2026-09-01T10:12:00Z",
              "phase": "registration",
              "resolve": {
                "document": true
              }
            }
          ],
          "conflicts": [],
          "rejected": [],
          "documents": [
            {
              "object": "document",
              "id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
              "kind": "file",
              "filename": "technische-zustimmung.pdf",
              "content_type": "application/pdf",
              "bytes": 181012,
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            },
            {
              "object": "document",
              "id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
              "kind": "file",
              "filename": "schlussrechnung.pdf",
              "content_type": "application/pdf",
              "bytes": 374756,
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            },
            {
              "object": "document",
              "id": "doc_jx74ndzcwpztje1fpyh0dasbk7rgjzv3",
              "kind": "text",
              "label": "Kundenmail",
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            }
          ],
          "signature": null,
          "commissioning": {
            "state": "not_due"
          },
          "mastr": null,
          "references": [],
          "withdrawal": null,
          "duplicate_of": null,
          "requirements": {
            "surface": "universal",
            "operator_outstanding": 0
          },
          "created_at": "2026-08-30T09:12:04Z",
          "updated_at": "2026-09-02T14:05:12Z",
          "last_activity_at": "2026-09-02T14:05:12Z"
        }
      },
      "CaseCommissioned": {
        "summary": "Commissioning reported, MaStR asking",
        "value": {
          "object": "case",
          "id": "anm_4Pr9WkT2qL",
          "mode": "live",
          "type": "pv",
          "external_ref": "ERP-5120",
          "business_id": "biz_5Tq8Lm2Rx",
          "status": "confirmed",
          "stage": {
            "code": "commissioning_reported",
            "label": {
              "de": "Inbetriebnahme gemeldet, Fertigmeldung wird eingereicht",
              "en": "Commissioning reported, completion notice being filed"
            }
          },
          "blocked": false,
          "operator": {
            "key": "hen",
            "name": "Hamburger Energienetze GmbH",
            "source": "derived"
          },
          "group": null,
          "billing": {
            "credits": 1,
            "billed": true,
            "billed_at": "2026-08-30T09:32:55Z"
          },
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "value": "Ahornweg",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.house_number",
              "nr": 1003,
              "label": {
                "de": "Hausnummer",
                "en": "House number"
              },
              "value": "7a",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.postal_code",
              "nr": 1007,
              "label": {
                "de": "PLZ",
                "en": "Postal code"
              },
              "value": "22607",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.city",
              "nr": 1008,
              "label": {
                "de": "Ort",
                "en": "City"
              },
              "value": "Hamburg",
              "source": "declared",
              "confidence": "certain"
            }
          ],
          "open": [
            {
              "code": "mastr.MarktakteurGeburtsdatum",
              "text": {
                "de": "Geburtsdatum des Anlagenbetreibers",
                "en": "The plant operator's date of birth"
              },
              "owner": "end_customer",
              "blocking": true,
              "state": "open",
              "due_by": "2026-11-01",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "mastr",
              "resolve": {
                "field": "plant_operator.dob"
              },
              "input": {
                "type": "date"
              }
            },
            {
              "code": "mastr.HauptausrichtungDovId",
              "text": {
                "de": "Ausrichtung und Neigungswinkel der Module (überwiegend, und eine weitere, falls nicht einheitlich)",
                "en": "The orientation and tilt of the modules (the main one, and a further one where they are not uniform)"
              },
              "owner": "wisnots",
              "blocking": false,
              "state": "open",
              "due_by": "2026-11-01",
              "source": "wisnots",
              "note": null,
              "asked_at": null,
              "phase": "mastr",
              "resolve": {}
            }
          ],
          "conflicts": [],
          "rejected": [],
          "documents": [
            {
              "object": "document",
              "id": "doc_jx7tr51g0twdxed04kkytw4c71w0779p",
              "kind": "file",
              "filename": "e8-protokoll.pdf",
              "content_type": "application/pdf",
              "bytes": 120344,
              "status": "read",
              "resolves": "commissioning.e8",
              "created_at": "2026-10-01T16:40:00Z"
            }
          ],
          "signature": null,
          "commissioning": {
            "state": "submitted",
            "commissioned_on": "2026-10-01",
            "submitted_at": "2026-10-02T08:14:09Z",
            "devices": [
              {
                "key": "inverter-main-1",
                "kind": "inverter",
                "index": null,
                "model": "Deye SUN-10K-SG01HP3-EU-AM2"
              }
            ],
            "registered_modules": {
              "count": 22,
              "name": "Solarfabrik SF 4450TBGL",
              "watt_per_module": 450,
              "total_kwp": 9.9
            },
            "report": {
              "built_as_declared": false,
              "module_count": 22,
              "module_watt": 455,
              "serials": {
                "inverter-main-1": "SN-4711"
              },
              "evidence": [
                {
                  "slot": "e8",
                  "document_id": "doc_jx7tr51g0twdxed04kkytw4c71w0779p",
                  "filename": "e8-protokoll.pdf"
                }
              ]
            }
          },
          "mastr": {
            "state": "needs_input",
            "units": [],
            "devices": [
              {
                "device": "pv",
                "registered_at": null
              }
            ],
            "due_by": "2026-11-01"
          },
          "references": [
            {
              "type": "case",
              "number": "HEN-NA-2026-051204",
              "added_at": "2026-08-31T07:45:10Z"
            },
            {
              "type": "offer",
              "number": "AN-2026-33871",
              "added_at": "2026-09-12T10:02:44Z"
            }
          ],
          "withdrawal": null,
          "duplicate_of": null,
          "requirements": {
            "surface": "universal",
            "operator_outstanding": 0
          },
          "created_at": "2026-08-30T09:12:04Z",
          "updated_at": "2026-10-02T08:14:09Z",
          "last_activity_at": "2026-10-02T08:14:09Z"
        }
      },
      "CaseMastrRegistered": {
        "summary": "Released and registered, on a sandbox key",
        "value": {
          "object": "case",
          "id": "anm_test_4Pr9WkT2qL",
          "mode": "test",
          "type": "pv",
          "external_ref": "ERP-5120",
          "business_id": "biz_test_5Tq8Lm2Rx",
          "status": "confirmed",
          "stage": {
            "code": "commissioning_reported",
            "label": {
              "de": "Inbetriebnahme gemeldet, Fertigmeldung wird eingereicht",
              "en": "Commissioning reported, completion notice being filed"
            }
          },
          "blocked": false,
          "operator": {
            "key": "sandbox",
            "name": "Sandbox-Netzbetreiber",
            "source": "declared"
          },
          "group": null,
          "billing": {
            "credits": 1,
            "billed": true,
            "billed_at": "2026-08-30T09:32:55Z"
          },
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "value": "Ahornweg",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.house_number",
              "nr": 1003,
              "label": {
                "de": "Hausnummer",
                "en": "House number"
              },
              "value": "7a",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.postal_code",
              "nr": 1007,
              "label": {
                "de": "PLZ",
                "en": "Postal code"
              },
              "value": "22607",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "site.city",
              "nr": 1008,
              "label": {
                "de": "Ort",
                "en": "City"
              },
              "value": "Hamburg",
              "source": "declared",
              "confidence": "certain"
            }
          ],
          "open": [],
          "conflicts": [],
          "rejected": [],
          "documents": [
            {
              "object": "document",
              "id": "doc_test_jx7tr51g0twdxed04kkytw4c71w0779p",
              "kind": "file",
              "filename": "e8-protokoll.pdf",
              "content_type": "application/pdf",
              "bytes": 120344,
              "status": "read",
              "resolves": "commissioning.e8",
              "created_at": "2026-10-01T16:40:00Z"
            }
          ],
          "signature": null,
          "commissioning": {
            "state": "submitted",
            "commissioned_on": "2026-10-01",
            "submitted_at": "2026-10-02T08:14:09Z",
            "devices": [
              {
                "key": "inverter-main-1",
                "kind": "inverter",
                "index": null,
                "model": "Deye SUN-10K-SG01HP3-EU-AM2"
              }
            ],
            "registered_modules": {
              "count": 22,
              "name": "Solarfabrik SF 4450TBGL",
              "watt_per_module": 450,
              "total_kwp": 9.9
            },
            "report": {
              "built_as_declared": false,
              "module_count": 22,
              "module_watt": 455,
              "serials": {
                "inverter-main-1": "SN-4711"
              },
              "evidence": [
                {
                  "slot": "e8",
                  "document_id": "doc_test_jx7tr51g0twdxed04kkytw4c71w0779p",
                  "filename": "e8-protokoll.pdf"
                }
              ]
            }
          },
          "mastr": {
            "state": "registered",
            "units": [
              {
                "number": "SEE000000482913",
                "type": "generation_unit",
                "device": "pv"
              },
              {
                "number": "EEG000000482913",
                "type": "eeg_plant",
                "device": "pv"
              },
              {
                "number": "ABR000000482913",
                "type": "plant_operator",
                "device": null
              }
            ],
            "devices": [
              {
                "device": "pv",
                "registered_at": "2026-10-03T10:00:01Z"
              }
            ],
            "submitted_at": "2026-10-03T10:00:00Z",
            "registered_at": "2026-10-03T10:00:01Z",
            "due_by": "2026-11-01"
          },
          "references": [],
          "withdrawal": null,
          "duplicate_of": null,
          "requirements": {
            "surface": "universal",
            "operator_outstanding": 0
          },
          "created_at": "2026-08-30T09:12:04Z",
          "updated_at": "2026-10-03T10:00:01Z",
          "last_activity_at": "2026-10-03T10:00:01Z"
        }
      },
      "CaseWithdrawalRequested": {
        "summary": "Handed over, its withdrawal asked for",
        "value": {
          "object": "case",
          "id": "anm_7Kq3ZmR8vT",
          "mode": "live",
          "type": "charge_point",
          "external_ref": "ERP-4711",
          "business_id": "biz_5Tq8Lm2Rx",
          "status": "submitted",
          "stage": {
            "code": "submitted",
            "label": {
              "de": "Antrag eingereicht, Netzbetreiber prüft",
              "en": "Application filed, the grid operator is reviewing it"
            }
          },
          "blocked": false,
          "operator": {
            "key": "hen",
            "name": "Hamburger Energienetze GmbH",
            "source": "declared"
          },
          "group": null,
          "billing": {
            "credits": 1,
            "billed": true,
            "billed_at": "2026-08-30T09:32:55Z"
          },
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "value": "Ahornweg",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Ahornweg 7a"
              }
            },
            {
              "path": "site.house_number",
              "nr": 1003,
              "label": {
                "de": "Hausnummer",
                "en": "House number"
              },
              "value": "7a",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Ahornweg 7a"
              }
            },
            {
              "path": "site.postal_code",
              "nr": 1007,
              "label": {
                "de": "PLZ",
                "en": "Postal code"
              },
              "value": "22607",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
              }
            },
            {
              "path": "site.city",
              "nr": 1008,
              "label": {
                "de": "Ort",
                "en": "City"
              },
              "value": "Hamburg",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
              }
            },
            {
              "path": "site.address_kind",
              "nr": 1001,
              "label": {
                "de": "Art der Standortangabe",
                "en": "Kind of location detail"
              },
              "value": "postalische Adresse",
              "source": "derived",
              "confidence": "certain"
            },
            {
              "path": "end_customer.last_name",
              "nr": 1101,
              "label": {
                "de": "Name oder Firmenname",
                "en": "Name or company"
              },
              "value": "Bergmann",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Herrn Alexander Bergmann"
              }
            },
            {
              "path": "end_customer.first_name",
              "nr": 1102,
              "label": {
                "de": "Vorname",
                "en": "First name"
              },
              "value": "Alexander",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Herrn Alexander Bergmann"
              }
            },
            {
              "path": "installer.company",
              "nr": 1402,
              "label": {
                "de": "Firmenname",
                "en": "Company name"
              },
              "value": "Nordlicht Elektrotechnik GmbH",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Nordlicht Elektrotechnik GmbH · Gewerbestraße 12"
              }
            },
            {
              "path": "device.manufacturer",
              "nr": 5002,
              "label": {
                "de": "Hersteller",
                "en": "Manufacturer"
              },
              "value": "ABL",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "ABL eMH3 3W2250"
              }
            },
            {
              "path": "device.model",
              "nr": 5003,
              "label": {
                "de": "Typ",
                "en": "Type"
              },
              "value": "eMH3 3W2250",
              "source": "extracted",
              "confidence": "certain",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "ABL eMH3 3W2250"
              }
            },
            {
              "path": "device.grid_draw_kw",
              "nr": 5017,
              "label": {
                "de": "Netzbezugsleistung",
                "en": "Grid draw"
              },
              "value": 11,
              "source": "extracted",
              "confidence": "certain",
              "unit": "kW",
              "evidence": {
                "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                "filename": "technische-zustimmung.pdf",
                "quote": "Freigegebene Leistung: 11 kW"
              }
            },
            {
              "path": "section_14a.is_controllable",
              "nr": 5010,
              "label": {
                "de": "Steuerbare Verbrauchseinrichtung nach § 14a EnWG",
                "en": "Controllable consumption device under § 14a EnWG"
              },
              "value": "Ja",
              "source": "declared",
              "confidence": "certain"
            },
            {
              "path": "device.installed_at",
              "label": {
                "de": "Inbetriebnahmedatum",
                "en": "Commissioning date"
              },
              "value": "2022-04-19",
              "source": "extracted",
              "confidence": "probable",
              "evidence": {
                "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                "filename": "schlussrechnung.pdf",
                "quote": "Liefertermin: 19.04.22"
              }
            }
          ],
          "open": [],
          "conflicts": [],
          "rejected": [],
          "documents": [
            {
              "object": "document",
              "id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
              "kind": "file",
              "filename": "technische-zustimmung.pdf",
              "content_type": "application/pdf",
              "bytes": 181012,
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            },
            {
              "object": "document",
              "id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
              "kind": "file",
              "filename": "schlussrechnung.pdf",
              "content_type": "application/pdf",
              "bytes": 374756,
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            },
            {
              "object": "document",
              "id": "doc_jx74ndzcwpztje1fpyh0dasbk7rgjzv3",
              "kind": "text",
              "label": "Kundenmail",
              "status": "read",
              "created_at": "2026-08-30T09:12:04Z"
            }
          ],
          "signature": null,
          "commissioning": {
            "state": "not_due"
          },
          "mastr": null,
          "references": [
            {
              "type": "case",
              "number": "HEN-NA-2026-047110",
              "added_at": "2026-08-31T07:45:10Z"
            }
          ],
          "withdrawal": {
            "state": "requested",
            "reason": "Der Kunde hat den Auftrag storniert.",
            "requested_at": "2026-09-03T08:20:00Z"
          },
          "duplicate_of": null,
          "requirements": {
            "surface": "universal",
            "operator_outstanding": 0
          },
          "created_at": "2026-08-30T09:12:04Z",
          "updated_at": "2026-09-03T08:20:00Z",
          "last_activity_at": "2026-09-03T08:20:00Z"
        }
      },
      "GridOperatorRejects": {
        "summary": "The grid operator rejects",
        "value": {
          "type": "rejected"
        }
      },
      "ReportCommissioning": {
        "summary": "Built otherwise than registered",
        "value": {
          "commissioned_on": "2026-10-01",
          "built_as_declared": false,
          "module_count": 22,
          "module_watt": 455,
          "serials": {
            "inverter-main-1": "SN-4711"
          },
          "evidence": {
            "e8": "doc_jx7tr51g0twdxed04kkytw4c71w0779p"
          }
        }
      },
      "PatchCase": {
        "summary": "Close the blocking items",
        "value": {
          "declared": {
            "end_customer": {
              "phone": "+49 40 1234567"
            },
            "device": {
              "count": 1
            }
          }
        }
      },
      "DocumentTextAnswer": {
        "summary": "A text answering an item",
        "value": {
          "text": "Die Wallbox ersetzt eine ältere am selben Anschluss.",
          "label": "Erläuterung",
          "resolves": "notes.explanation"
        }
      },
      "Document": {
        "summary": "A file, being read",
        "value": {
          "object": "document",
          "id": "doc_jx7xx186wc2080fkzv7xv278q10dw6pe",
          "kind": "file",
          "filename": "vollmacht.pdf",
          "content_type": "application/pdf",
          "bytes": 88412,
          "status": "pending",
          "resolves": "documents.vollmacht",
          "created_at": "2026-09-02T14:05:12Z"
        }
      },
      "ProblemValidation": {
        "summary": "A refused create",
        "value": {
          "type": "https://wisnots.com/problems/validation-failed",
          "title": "The request could not be accepted",
          "status": 422,
          "code": "validation_failed",
          "detail": "2 values in the request were not accepted.",
          "instance": "/v2/cases",
          "errors": [
            {
              "path": "type",
              "code": "not_allowed",
              "message": "One of: pv, storage, heat_pump, charge_point, air_conditioning."
            },
            {
              "path": "declared",
              "code": "wrong_type",
              "message": "Must be an object."
            }
          ]
        }
      },
      "ProblemUnasked": {
        "summary": "A value the grid operator did not ask for",
        "value": {
          "type": "https://wisnots.com/problems/validation-failed",
          "title": "The request could not be accepted",
          "status": 422,
          "code": "validation_failed",
          "detail": "The request on this case does not ask for `site.street`.",
          "instance": "/v2/cases/anm_7Kq3ZmR8vT",
          "errors": [
            {
              "path": "declared.site.street",
              "code": "not_allowed",
              "message": "A filed case takes a value only as the answer to an item the request on it asks for, and it does not ask for this one."
            }
          ]
        }
      },
      "CreateBusiness": {
        "summary": "An installer firm",
        "value": {
          "external_ref": "INST-0042",
          "name": "Nordlicht Elektrotechnik GmbH",
          "address": {
            "street": "Gewerbestraße",
            "house_number": "12",
            "postal_code": "22525",
            "city": "Hamburg",
            "country": "DE"
          },
          "contact": {
            "email": "netz@nordlicht-elektro.example",
            "phone": "+49 40 7654321"
          },
          "electrician": {
            "first_name": "Jana",
            "last_name": "Petersen"
          },
          "registrations": [
            {
              "operator": "hen",
              "number": "HH-E-20931",
              "kind": "registration",
              "valid_until": "2027-12-31"
            }
          ]
        }
      },
      "Business": {
        "summary": "Restricted: a login is missing",
        "value": {
          "object": "business",
          "id": "biz_5Tq8Lm2Rx",
          "mode": "live",
          "external_ref": "INST-0042",
          "name": "Nordlicht Elektrotechnik GmbH",
          "address": {
            "street": "Gewerbestraße",
            "house_number": "12",
            "postal_code": "22525",
            "city": "Hamburg",
            "country": "DE"
          },
          "contact": {
            "email": "netz@nordlicht-elektro.example",
            "phone": "+49 40 7654321"
          },
          "electrician": {
            "first_name": "Jana",
            "last_name": "Petersen"
          },
          "registrations": [
            {
              "operator": {
                "key": "hen",
                "name": "Hamburger Energienetze GmbH"
              },
              "number": "HH-E-20931",
              "kind": "registration",
              "valid_until": "2027-12-31"
            }
          ],
          "status": "restricted",
          "requirements": [
            {
              "code": "login_missing",
              "text": {
                "de": "Kein Zugang zum Portal von Hamburger Energienetze GmbH: über den Zugangslink des Betriebs hinterlegen.",
                "en": "No login for Hamburger Energienetze GmbH's portal: hand it in through the business's access link."
              },
              "operator": {
                "key": "hen",
                "name": "Hamburger Energienetze GmbH"
              }
            }
          ],
          "cases": {
            "open": 3,
            "total": 11
          },
          "created_at": "2026-08-12T08:00:00Z",
          "updated_at": "2026-08-30T09:12:04Z"
        }
      },
      "Logins": {
        "summary": "One login missing, one held, and a second portal's own",
        "value": {
          "object": "list",
          "data": [
            {
              "object": "login",
              "operator": {
                "key": "hen",
                "name": "Hamburger Energienetze GmbH"
              },
              "status": "missing"
            },
            {
              "object": "login",
              "operator": {
                "key": "sandbox",
                "name": "Sandbox-Netzbetreiber"
              },
              "status": "valid",
              "updated_at": "2026-08-20T16:40:00Z",
              "portals": [
                {
                  "portal": "einspeiser.sandbox-netz.de",
                  "status": "valid"
                }
              ]
            }
          ],
          "has_more": false,
          "next_cursor": null
        }
      },
      "Requirements": {
        "summary": "A slice for a PV array with a battery",
        "value": {
          "object": "requirements",
          "types": [
            "pv",
            "storage"
          ],
          "operator": null,
          "surface": "universal",
          "fields": [
            {
              "path": "site.street",
              "nr": 1002,
              "label": {
                "de": "Straße",
                "en": "Street"
              },
              "type": "string",
              "types": [
                "pv",
                "storage"
              ]
            },
            {
              "path": "device.usable_capacity_kwh",
              "nr": 90030,
              "label": {
                "de": "Nutzbare Speicherkapazität",
                "en": "Usable storage capacity"
              },
              "type": "number",
              "unit": "kWh",
              "types": [
                "storage"
              ]
            }
          ],
          "documents": [
            {
              "kind": "datenblatt-vollmacht-lageplan-mit-eingezeichneter-anlage-messkonzept-zaehlerfoto",
              "label": "Datenblatt, Vollmacht, Lageplan mit eingezeichneter Anlage, Messkonzept, Zählerfoto",
              "note": "bis 7 kWp",
              "types": [
                "pv"
              ]
            },
            {
              "kind": "speicherdatenblatt-formular-e-3-messkonzept-mit-speicher",
              "label": "Speicherdatenblatt, Formular E.3, Messkonzept mit Speicher",
              "note": "jede Größe",
              "types": [
                "storage"
              ]
            }
          ]
        }
      },
      "Usage": {
        "summary": "November, one business and the account's own",
        "value": {
          "object": "usage",
          "mode": "live",
          "month": "2026-11",
          "credits": 7,
          "cases": 7,
          "businesses": [
            {
              "business_id": "biz_5Tq8Lm2Rx",
              "credits": 5,
              "cases": 5,
              "types": {
                "pv": {
                  "credits": 3,
                  "cases": 3
                },
                "charge_point": {
                  "credits": 2,
                  "cases": 2
                }
              }
            },
            {
              "business_id": null,
              "credits": 2,
              "cases": 2,
              "types": {
                "heat_pump": {
                  "credits": 2,
                  "cases": 2
                }
              }
            }
          ]
        }
      },
      "Invoices": {
        "summary": "One purchase",
        "value": {
          "object": "list",
          "data": [
            {
              "object": "invoice",
              "id": "inv_2Wd7Kp4Ns",
              "created_at": "2026-11-03T10:21:44Z",
              "credits": 50,
              "amount_total": 297500,
              "currency": "eur",
              "status": "paid",
              "pdf_url": "/v2/invoices/inv_2Wd7Kp4Ns/pdf"
            }
          ],
          "has_more": false,
          "next_cursor": null
        }
      },
      "Events": {
        "summary": "A stage, a login, an invoice",
        "value": {
          "object": "list",
          "data": [
            {
              "object": "event",
              "id": "jh72ksw0cq9x3mf8v1r6t4n5bd0e7ya2",
              "type": "case.status_changed",
              "created_at": "2026-08-30T09:33:02Z",
              "case": {
                "object": "case",
                "id": "anm_7Kq3ZmR8vT",
                "mode": "live",
                "type": "charge_point",
                "external_ref": "ERP-4711",
                "business_id": "biz_5Tq8Lm2Rx",
                "status": "submitted",
                "stage": {
                  "code": "submitted",
                  "label": {
                    "de": "Antrag eingereicht, Netzbetreiber prüft",
                    "en": "Application filed, the grid operator is reviewing it"
                  }
                },
                "blocked": true,
                "operator": {
                  "key": "hen",
                  "name": "Hamburger Energienetze GmbH",
                  "source": "declared"
                },
                "group": null,
                "billing": {
                  "credits": 1,
                  "billed": true,
                  "billed_at": "2026-08-30T09:32:55Z"
                },
                "fields": [
                  {
                    "path": "site.street",
                    "nr": 1002,
                    "label": {
                      "de": "Straße",
                      "en": "Street"
                    },
                    "value": "Ahornweg",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                      "filename": "schlussrechnung.pdf",
                      "quote": "Ahornweg 7a"
                    }
                  },
                  {
                    "path": "site.house_number",
                    "nr": 1003,
                    "label": {
                      "de": "Hausnummer",
                      "en": "House number"
                    },
                    "value": "7a",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                      "filename": "schlussrechnung.pdf",
                      "quote": "Ahornweg 7a"
                    }
                  },
                  {
                    "path": "site.postal_code",
                    "nr": 1007,
                    "label": {
                      "de": "PLZ",
                      "en": "Postal code"
                    },
                    "value": "22607",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                      "filename": "technische-zustimmung.pdf",
                      "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
                    }
                  },
                  {
                    "path": "site.city",
                    "nr": 1008,
                    "label": {
                      "de": "Ort",
                      "en": "City"
                    },
                    "value": "Hamburg",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                      "filename": "technische-zustimmung.pdf",
                      "quote": "Anlagenadresse: Ahornweg 7a, 22607 Hamburg"
                    }
                  },
                  {
                    "path": "site.address_kind",
                    "nr": 1001,
                    "label": {
                      "de": "Art der Standortangabe",
                      "en": "Kind of location detail"
                    },
                    "value": "postalische Adresse",
                    "source": "derived",
                    "confidence": "certain"
                  },
                  {
                    "path": "end_customer.last_name",
                    "nr": 1101,
                    "label": {
                      "de": "Name oder Firmenname",
                      "en": "Name or company"
                    },
                    "value": "Bergmann",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                      "filename": "schlussrechnung.pdf",
                      "quote": "Herrn Alexander Bergmann"
                    }
                  },
                  {
                    "path": "end_customer.first_name",
                    "nr": 1102,
                    "label": {
                      "de": "Vorname",
                      "en": "First name"
                    },
                    "value": "Alexander",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                      "filename": "schlussrechnung.pdf",
                      "quote": "Herrn Alexander Bergmann"
                    }
                  },
                  {
                    "path": "installer.company",
                    "nr": 1402,
                    "label": {
                      "de": "Firmenname",
                      "en": "Company name"
                    },
                    "value": "Nordlicht Elektrotechnik GmbH",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                      "filename": "schlussrechnung.pdf",
                      "quote": "Nordlicht Elektrotechnik GmbH · Gewerbestraße 12"
                    }
                  },
                  {
                    "path": "device.manufacturer",
                    "nr": 5002,
                    "label": {
                      "de": "Hersteller",
                      "en": "Manufacturer"
                    },
                    "value": "ABL",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                      "filename": "technische-zustimmung.pdf",
                      "quote": "ABL eMH3 3W2250"
                    }
                  },
                  {
                    "path": "device.model",
                    "nr": 5003,
                    "label": {
                      "de": "Typ",
                      "en": "Type"
                    },
                    "value": "eMH3 3W2250",
                    "source": "extracted",
                    "confidence": "certain",
                    "evidence": {
                      "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                      "filename": "technische-zustimmung.pdf",
                      "quote": "ABL eMH3 3W2250"
                    }
                  },
                  {
                    "path": "device.grid_draw_kw",
                    "nr": 5017,
                    "label": {
                      "de": "Netzbezugsleistung",
                      "en": "Grid draw"
                    },
                    "value": 11,
                    "source": "extracted",
                    "confidence": "certain",
                    "unit": "kW",
                    "evidence": {
                      "material_id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                      "filename": "technische-zustimmung.pdf",
                      "quote": "Freigegebene Leistung: 11 kW"
                    }
                  },
                  {
                    "path": "section_14a.is_controllable",
                    "nr": 5010,
                    "label": {
                      "de": "Steuerbare Verbrauchseinrichtung nach § 14a EnWG",
                      "en": "Controllable consumption device under § 14a EnWG"
                    },
                    "value": "Ja",
                    "source": "declared",
                    "confidence": "certain"
                  },
                  {
                    "path": "device.installed_at",
                    "label": {
                      "de": "Inbetriebnahmedatum",
                      "en": "Commissioning date"
                    },
                    "value": "2022-04-19",
                    "source": "extracted",
                    "confidence": "probable",
                    "evidence": {
                      "material_id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                      "filename": "schlussrechnung.pdf",
                      "quote": "Liefertermin: 19.04.22"
                    }
                  }
                ],
                "open": [
                  {
                    "code": "device.installed_at",
                    "text": {
                      "de": "Datum der Inbetriebnahme",
                      "en": "Commissioning date"
                    },
                    "owner": "installer",
                    "blocking": true,
                    "state": "in_review",
                    "due_by": "2026-09-15",
                    "source": "grid_operator",
                    "note": "Der Netzbetreiber braucht für die Prüfung noch das Datum der Inbetriebnahme, die Vollmacht Ihres Kunden und eine kurze Erläuterung zur Einspeisung.",
                    "asked_at": "2026-09-01T10:12:00Z",
                    "phase": "registration",
                    "resolve": {
                      "field": "device.installed_at"
                    },
                    "input": {
                      "type": "date"
                    }
                  },
                  {
                    "code": "documents.vollmacht",
                    "text": {
                      "de": "Vollmacht",
                      "en": "Power of attorney"
                    },
                    "owner": "installer",
                    "blocking": true,
                    "state": "open",
                    "due_by": "2026-09-15",
                    "source": "grid_operator",
                    "note": "Der Netzbetreiber braucht für die Prüfung noch das Datum der Inbetriebnahme, die Vollmacht Ihres Kunden und eine kurze Erläuterung zur Einspeisung.",
                    "asked_at": "2026-09-01T10:12:00Z",
                    "phase": "registration",
                    "resolve": {
                      "document": true
                    }
                  },
                  {
                    "code": "notes.explanation",
                    "text": {
                      "de": "Erläuterung",
                      "en": "Explanation"
                    },
                    "owner": "installer",
                    "blocking": true,
                    "state": "open",
                    "due_by": "2026-09-15",
                    "source": "grid_operator",
                    "note": "Der Netzbetreiber braucht für die Prüfung noch das Datum der Inbetriebnahme, die Vollmacht Ihres Kunden und eine kurze Erläuterung zur Einspeisung.",
                    "asked_at": "2026-09-01T10:12:00Z",
                    "phase": "registration",
                    "resolve": {
                      "document": true
                    }
                  }
                ],
                "conflicts": [],
                "rejected": [],
                "documents": [
                  {
                    "object": "document",
                    "id": "doc_jx7whpaxm7b42yyg9jq7hc4c53ym57qv",
                    "kind": "file",
                    "filename": "technische-zustimmung.pdf",
                    "content_type": "application/pdf",
                    "bytes": 181012,
                    "status": "read",
                    "created_at": "2026-08-30T09:12:04Z"
                  },
                  {
                    "object": "document",
                    "id": "doc_jx7fgkzxx8caatpbyzctj28hws97h1sr",
                    "kind": "file",
                    "filename": "schlussrechnung.pdf",
                    "content_type": "application/pdf",
                    "bytes": 374756,
                    "status": "read",
                    "created_at": "2026-08-30T09:12:04Z"
                  },
                  {
                    "object": "document",
                    "id": "doc_jx74ndzcwpztje1fpyh0dasbk7rgjzv3",
                    "kind": "text",
                    "label": "Kundenmail",
                    "status": "read",
                    "created_at": "2026-08-30T09:12:04Z"
                  }
                ],
                "signature": null,
                "commissioning": {
                  "state": "not_due"
                },
                "mastr": null,
                "references": [],
                "withdrawal": null,
                "duplicate_of": null,
                "requirements": {
                  "surface": "universal",
                  "operator_outstanding": 0
                },
                "created_at": "2026-08-30T09:12:04Z",
                "updated_at": "2026-09-02T14:05:12Z",
                "last_activity_at": "2026-09-02T14:05:12Z"
              },
              "stage": {
                "code": "submitted",
                "label": {
                  "de": "Antrag eingereicht, Netzbetreiber prüft",
                  "en": "Application filed, the grid operator is reviewing it"
                }
              }
            },
            {
              "object": "event",
              "id": "kd4m8q1zx7v2n6c0w5t9r3y8h1e4s6pb",
              "type": "business.login_required",
              "created_at": "2026-08-30T09:33:05Z",
              "business": {
                "object": "business",
                "id": "biz_5Tq8Lm2Rx",
                "mode": "live",
                "external_ref": "INST-0042",
                "name": "Nordlicht Elektrotechnik GmbH",
                "address": {
                  "street": "Gewerbestraße",
                  "house_number": "12",
                  "postal_code": "22525",
                  "city": "Hamburg",
                  "country": "DE"
                },
                "contact": {
                  "email": "netz@nordlicht-elektro.example",
                  "phone": "+49 40 7654321"
                },
                "electrician": {
                  "first_name": "Jana",
                  "last_name": "Petersen"
                },
                "registrations": [
                  {
                    "operator": {
                      "key": "hen",
                      "name": "Hamburger Energienetze GmbH"
                    },
                    "number": "HH-E-20931",
                    "kind": "registration",
                    "valid_until": "2027-12-31"
                  }
                ],
                "status": "restricted",
                "requirements": [
                  {
                    "code": "login_missing",
                    "text": {
                      "de": "Kein Zugang zum Portal von Hamburger Energienetze GmbH: über den Zugangslink des Betriebs hinterlegen.",
                      "en": "No login for Hamburger Energienetze GmbH's portal: hand it in through the business's access link."
                    },
                    "operator": {
                      "key": "hen",
                      "name": "Hamburger Energienetze GmbH"
                    }
                  }
                ],
                "cases": {
                  "open": 3,
                  "total": 11
                },
                "created_at": "2026-08-12T08:00:00Z",
                "updated_at": "2026-08-30T09:12:04Z"
              },
              "requirement": {
                "code": "login_missing",
                "text": {
                  "de": "Kein Zugang zum Portal von Hamburger Energienetze GmbH: über den Zugangslink des Betriebs hinterlegen.",
                  "en": "No login for Hamburger Energienetze GmbH's portal: hand it in through the business's access link."
                },
                "operator": {
                  "key": "hen",
                  "name": "Hamburger Energienetze GmbH"
                }
              }
            },
            {
              "object": "event",
              "id": "kd4m8q1zx7v2n6c0w5t9r3y8h1e4s7ft",
              "type": "invoice.created",
              "created_at": "2026-11-03T10:21:46Z",
              "invoice": {
                "object": "invoice",
                "id": "inv_2Wd7Kp4Ns",
                "created_at": "2026-11-03T10:21:44Z",
                "credits": 50,
                "amount_total": 297500,
                "currency": "eur",
                "status": "paid",
                "pdf_url": "/v2/invoices/inv_2Wd7Kp4Ns/pdf"
              }
            }
          ],
          "has_more": false,
          "next_cursor": "eyJzIjpbImV2ZW50cyIsImxpdmUiXSwicCI6Ii4uLiJ9"
        }
      }
    }
  }
}
