{
  "openapi": "3.0.3",
  "info": {
    "title": "OptimumPOS kassaserver API",
    "version": "0.1.21",
    "description": "REST-API van de lokale kassaserver (HorecaPOS). Alle schermen (kassa, tablets, keukenscherm) praten via deze API met de server in de zaak.\n\n**Adres:** `http://<kassa-pc>:4000/api/...` (via de schermen op poort 3000 wordt `/api` ook doorgestuurd).\n\n**Aanmelden:** `POST /api/aanmelden` met `{ \"pincode\": \"1234\" }` geeft een `token`. Stuur dat mee als `Authorization: Bearer <token>`. Een token is 8 uur geldig (een dienst). Klik rechtsboven op **Authorize** om het hier te gebruiken.\n\n**Rechten:** routes onder `/api/beheer/...` vragen een recht (Instellingen → Rechten) of de rol beheerder; zonder recht volgt 403.\n\n**Fouten:** altijd JSON `{ \"fout\": \"leesbare melding\" }` met een passende HTTP-status, soms met een `code` (bv. `AYCE_REGEL` bij Bestellen: all-you-can-eat-limiet; opnieuw met `{ \"negeerRegels\": true }` gaat toch door).\n\n**Database-schema (ERD):** [`/api/docs/erd`](/api/docs/erd) toont alle tabellen en relaties van de database als diagram (live; als Mermaid-tekst: `/api/docs/erd.mmd`).\n\n**Realtime:** wijzigingen (nieuwe bestelling, keuken klaar, rechten gewijzigd …) gaan via de WebSocket `ws://<kassa-pc>:4000/ws` (geen onderdeel van deze REST-documentatie).\n\n_Automatisch gemaakt uit de broncode (656 routes) met `npm run api:docs`._"
  },
  "servers": [
    {
      "url": "/",
      "description": "Deze kassaserver"
    }
  ],
  "tags": [
    {
      "name": "Algemeen",
      "description": "Gezondheid en status van de kassaserver."
    },
    {
      "name": "Documentatie",
      "description": "Deze API-documentatie zelf (OpenAPI, Swagger UI en de leesbare HTML-versie) en het database-schema (ERD)."
    },
    {
      "name": "Aanmelden",
      "description": "Aanmelden met pincode en afmelden. Geeft het token voor alle andere routes. Ook: nog aangemeld (sessie) en de taal van de medewerker."
    },
    {
      "name": "Catalogus",
      "description": "Producten, groepen en opties zoals de kassa ze toont."
    },
    {
      "name": "Bestellingen",
      "description": "Tafels openen, regels toevoegen, bestellen, splitsen en verplaatsen."
    },
    {
      "name": "All-you-can-eat",
      "description": "All-you-can-eat bij een groep aan tafel: starten, aantallen wijzigen, stoppen en verspillingstoeslag."
    },
    {
      "name": "Afrekenen",
      "description": "Afrekenen en deelbetalingen."
    },
    {
      "name": "Productfoto’s",
      "description": "Foto per product: tonen (zonder aanmelden, ook voor het klantscherm), uploaden en verwijderen."
    },
    {
      "name": "Printwachtrij",
      "description": "Werkbonnen die niet geprint konden worden (printer uit): bekijken, opnieuw printen of weggooien."
    },
    {
      "name": "Printapparaat",
      "description": "Android-bedienscherm met een eigen printer (Bluetooth, USB, ingebouwd): bonnen ophalen en melden of ze geprint zijn. Met de sleutel van het apparaat (header x-printapparaat), niet met een pincode."
    },
    {
      "name": "Klantscherm",
      "description": "Klantscherm op een los apparaat: beeld ophalen met de koppelcode, beeld versturen en loskoppelen."
    },
    {
      "name": "Pinnen",
      "description": "Pinbetalingen via de Pin Vandaag REST API en het beheer van terminals."
    },
    {
      "name": "Bonnen",
      "description": "Bonnen opzoeken, kopie printen, mailen en retour (creditbon)."
    },
    {
      "name": "Keuken",
      "description": "Keukenscherm (KDS): openstaande werkbonnen en klaar melden."
    },
    {
      "name": "Rapporten",
      "description": "X- en Z-rapport, dagafsluiting, omzet per periode en dashboard."
    },
    {
      "name": "Kassalade",
      "description": "Geld in/uit, startgeld en de lade openen."
    },
    {
      "name": "Boekhouding",
      "description": "Export naar de boekhouding."
    },
    {
      "name": "Logboek",
      "description": "Logboek van gevoelige acties."
    },
    {
      "name": "Werktijden",
      "description": "In- en uitklokken en het overzicht van werktijden."
    },
    {
      "name": "Reserveringen",
      "description": "Reserveringen bekijken en beheren."
    },
    {
      "name": "Wachtlijst",
      "description": "Wachtlijst voor walk-ins: aanmelden, oproepen met een sms (CM.com, CM_TOKEN), plaatsen aan een tafel of weg."
    },
    {
      "name": "Thuisbezorgd",
      "description": "Thuisbezorgd.nl (JET Connect via het beheerportaal): bestellingen en track & trace, eigen status, afronden, en Instellingen → Bezorgplatforms → Thuisbezorgd (aanmelden, producten, menu, open/dicht)."
    },
    {
      "name": "Signalering",
      "description": "Fraude- en diefstalsignalering en meldingen bij afwijkingen (migratie 102; Instellingen → Signalering, standaard uit): drempels en kanalen (mail, sms, ntfy, Pushover, Telegram, webhook), testbericht, nu controleren, signalen bekijken en afhandelen."
    },
    {
      "name": "Telefonie",
      "description": "Telefonie: nummerherkenning bij telefonische bestellingen (migratie 106; Instellingen → Telefonie, standaard uit): de melding van de centrale, het toestel, de FRITZ!Box, het modem of de Android-telefoon (webhook met sleutel; ook via het portaal), de beller opzoeken met adres en bestelgeschiedenis, de gesprekken en het beheer (bronnen, lijnen, bewaartermijn, testgesprek)."
    },
    {
      "name": "Vinify",
      "description": "Wijnbeheer met Vinify (migratie 104; Instellingen → Wijnbeheer, standaard uit): de API voor Vinify (wijnen en groepen ophalen, aanmaken en wijzigen, verkopen ophalen; aanmelden met API-sleutel, JWT of handtekening) en het beheer (aanmelden, wijngroepen, push)."
    },
    {
      "name": "Apicbase",
      "description": "Receptuur en kostprijs met Apicbase (migratie 101; Instellingen → Receptuur, standaard uit): verbinden (token of inloggen), outlet, catalogus en bonnen sturen, kostprijzen ophalen en tonen."
    },
    {
      "name": "Bezorgplatforms en TheFork",
      "description": "Uber Eats, Deliveroo (België) en HubRise (migratie 100; Instellingen → Bezorgplatforms, standaard uit): overzicht (knop Platforms), accepteren/weigeren en status, afronden, menu en producten, inloggen; en de TheFork-kassakoppeling (Instellingen → Reserveringsplatforms): gast aan een tafel koppelen en de rekening (opnieuw) sturen."
    },
    {
      "name": "Weegschaal",
      "description": "Aclas OS6X (wegen aan de kassa, meerdere mogelijk) en TS6X (etiketten scannen, PLU-bestand en versturen); Instellingen → Weegschaal."
    },
    {
      "name": "Klanten",
      "description": "Klantenkaart, spaarpunten en stempelkaarten."
    },
    {
      "name": "Marketing",
      "description": "Sms- en e-mailmarketing naar klanten met toestemming: acties, verjaardag en \"we missen u\" (CM.com en de mailserver), optioneel met een persoonlijke kortingscode per klant (een keer te gebruiken, met Kortingscodes aan)."
    },
    {
      "name": "Adres",
      "description": "Snel adres invoeren: straat en plaats bij een Nederlandse postcode en huisnummer (PDOK)."
    },
    {
      "name": "Bezorgen",
      "description": "Bezorgen en tijdvakken in de kassa: bezorggebied en tijdvakken opvragen (ook een latere dag), een bezorg- of afhaalbestelling met tijd aannemen, de klant een bericht sturen (klaar, onderweg), toch afhalen en de bezorgkosten herberekenen."
    },
    {
      "name": "Importeren",
      "description": "Producten en klanten overnemen uit een andere kassa (CSV of Excel)."
    },
    {
      "name": "Exact Online",
      "description": "Koppeling met Exact Online: app invullen, verbinden (OAuth) en de dagomzet als memoriaal boeken. Kiezen gaat via Boekhoudpakket (kiezen)."
    },
    {
      "name": "Boekhoudpakket",
      "description": "Eén keuze voor het boekhoudpakket (uit, Exact Online of een ander pakket) en de koppeling met een ander boekhoudpakket (Acumulus, AFAS Profit, Business Central, Horus, Moneybird, Odoo, QuickBooks Online, SAP Business One, Silvasoft, SnelStart, Twinfield, Xero, Yuki, Zoho Books; alleen in het land waar het pakket werkt): verbinden (sleutels, of inloggen met OAuth bij Horus, QuickBooks, Twinfield, Xero en Zoho) en de dagomzet als memoriaal boeken."
    },
    {
      "name": "Salaris en planning",
      "description": "Salarisadministratie en personeelsplanning (migratie 066): salarispakket of sociaal secretariaat en planningssysteem kiezen (per land; .env gaat voor), personeelsnummers, uren en omzet per medewerker en omzet per dag en uur voor de bestanden, en de omzet live naar Deputy, Dyflexis of Shiftbase."
    },
    {
      "name": "Auditfile kassa (XAA)",
      "description": "XML Auditfile Afrekensystemen 3.2 van de Belastingdienst over een periode: stamgegevens, gebeurtenissen en alle bonnen met regels, btw en betalingen; ondertekend (XML Signature) als XAA_SLEUTEL en XAA_CERTIFICAAT in .env staan. Rapport → Omzet per periode."
    },
    {
      "name": "Cadeaubonnen",
      "description": "Cadeaubonnen verkopen, inwisselen en beheren."
    },
    {
      "name": "Kortingscodes",
      "description": "Kortingscodes (Instellingen → Zaak, standaard uit): beheren (procent of bedrag, minimum, geldig van/tot, hoe vaak, aan de kassa en/of in de webshop) en een code op de bon zetten."
    },
    {
      "name": "Voorraad",
      "description": "Voorraad, ingrediënten, ontvangst en telling."
    },
    {
      "name": "Geldautomaat",
      "description": "Gesloten geldsysteem / geldautomaat (migratie 070; Instellingen → Betalen, standaard uit; .env GELDSYSTEEM gaat voor): CashDro, Cashmatic, Azkoyen Cashlogy, CashKeeper, Glory CASHINFINITY (beta), extern (Cikam, ImaCash, CashGuard ...) en een proefautomaat. Betalen bij de automaat (starten, voortgang, annuleren) en daarna afrekenen met de transactie; stand, uitbetalen, bijvullen en afromen; instellen en testen; de koppeling voor externe software met de kop X-Geldsysteem-Sleutel (openstaande opdrachten ophalen en het resultaat melden)."
    },
    {
      "name": "Kassalade",
      "description": "Kassalade met sensor en lade per medewerker (migratie 070, standaard uit): status van de lade via de bonprinter (DLE EOT 1), meten en instellen, niet afrekenen zolang de lade open staat, lade 1 of 2 per medewerker, testen, en per medewerker startgeld, telling en kasverschil."
    },
    {
      "name": "Bestellen bij leveranciers",
      "description": "Bestellen bij leveranciers (migratie 069; Instellingen → Voorraad, standaard uit, alleen met Voorraad bijhouden): leveranciers (uit de lijst van Nederlandse en Belgische groothandels, drankenhandels, brouwers en versleveranciers, of eigen), bestelvoorstel (meldniveau, aanvullen tot, verpakking, onderweg), inkooporders maken en versturen per e-mail (met CSV, Excel, UBL, EANCOM of cXML als bijlage), als bestand, via cXML of een webhook, of geprint; ontvangen boekt de voorraad bij; automatisch bestellen op vaste besteldagen."
    },
    {
      "name": "Instellingen",
      "description": "Printers (netwerk, USB, serieel, Bluetooth, systeemprinter, ingebouwd; ESC/POS of Star), printers zoeken, printapparaten (bedienschermen met een printer) en printertoewijzing."
    },
    {
      "name": "Productbeheer",
      "description": "Producten, groepen, keuzeopties en volgorde beheren."
    },
    {
      "name": "Acties",
      "description": "Happy hour en menu's beheren."
    },
    {
      "name": "Plattegronden",
      "description": "Ruimtes en tafels beheren."
    },
    {
      "name": "Zaak",
      "description": "Gegevens en instellingen van de zaak."
    },
    {
      "name": "Personeel",
      "description": "Medewerkers, rollen en pincodes (alleen beheerder)."
    },
    {
      "name": "Rechten",
      "description": "Rechten per rol."
    },
    {
      "name": "Configuratie",
      "description": "Configuratie exporteren en importeren (overzetten naar een tweede zaak)."
    },
    {
      "name": "Back-ups",
      "description": "Back-ups maken, downloaden en terugzetten (alleen beheerder)."
    },
    {
      "name": "Database",
      "description": "Externe of ingebouwde database, omschakelen (alleen beheerder)."
    },
    {
      "name": "Op rekening",
      "description": "Betalen op rekening voor zakelijke klanten (migratie 085/086): klanten, openstaande facturen en betalingen ontvangen (contant, pin, cadeaubon of overgemaakt)."
    },
    {
      "name": "Mailchimp en Klaviyo",
      "description": "Koppeling met Mailchimp en Klaviyo (migratie 089): klanten met toestemming op de lijst, afmeldingen terug, bonnen als gebeurtenis."
    },
    {
      "name": "Camera's",
      "description": "Camerabeelden in de kassa (migratie 092): alle camera's op één pagina (Hikvision, Dahua, Axis, Reolink, Synology, UniFi Protect, ONVIF, eigen webadres), foto of live; de beelden met de sleutel uit GET /api/camera (?t=)."
    },
    {
      "name": "Muziek",
      "description": "Muziek bedienen vanaf de kassa (migratie 091): afspelen, pauze, volgende, vorige en volume van Soundtrack, Sonos, BluOS, VLC of een eigen muziekcomputer; bronnen instellen."
    },
    {
      "name": "Eigen bezorgers",
      "description": "Eigen bezorgers (migratie 097): ritten maken met wisselgeld, vertrekken (de klant krijgt bericht, met track & trace een volglink), bezorgd melden en de kasafdracht. De bezorger en de klant gebruiken een pagina op het beheerportaal. Bezorgersapp (migratie 099): telefoons koppelen, zelf oppakken, zelf vertrekken en de live kaart (GET /api/ritten/kaart)."
    },
    {
      "name": "Oproepscherm",
      "description": "Oproepscherm \"wordt bereid / klaar\" voor afhalers (migratie 096): het scherm zelf (/oproep) haalt de nummers op zonder aanmelding; de kassa zet met de hand klaar, terug of opgehaald."
    },
    {
      "name": "Tablets",
      "description": "Tablets als tweede scherm (migratie 094): een tablet koppelen (op de tablet: /tablet), en vanaf de kassa de muziek of de camera's met één knop naar die tablet sturen."
    },
    {
      "name": "Tweede scherm",
      "description": "Het adres van de kassaschermen in het netwerk van de zaak (IP-adres en poort), voor een tweede scherm op een tablet of telefoon: muziek (/muziek) en camera's (/camera)."
    },
    {
      "name": "Te laat",
      "description": "Melding bij te lange doorlooptijd (migratie 088): te late afhaal- en bezorgbestellingen, excuus aan de klant met eventueel een tegoedbon."
    },
    {
      "name": "Bank (op rekening)",
      "description": "Bankafschrift inlezen (CAMT.053, MT940, CODA) en de bankkoppeling via Enable Banking (migratie 087): bijschrijvingen afboeken bij facturen op rekening."
    },
    {
      "name": "hotel"
    },
    {
      "name": "voorschot"
    },
    {
      "name": "kassaopties"
    },
    {
      "name": "webshop"
    },
    {
      "name": "wettelijk"
    },
    {
      "name": "facturen"
    },
    {
      "name": "haccp"
    },
    {
      "name": "tap"
    },
    {
      "name": "reserveringplatform"
    },
    {
      "name": "bi"
    },
    {
      "name": "spaarreview"
    },
    {
      "name": "reviewbeheer"
    },
    {
      "name": "kiosk"
    },
    {
      "name": "klantschermextra"
    },
    {
      "name": "menubord"
    },
    {
      "name": "extrarapporten"
    },
    {
      "name": "webshopupsell"
    },
    {
      "name": "pasje"
    },
    {
      "name": "maaltijdcheques"
    },
    {
      "name": "dagsamenvatting"
    },
    {
      "name": "etiketten"
    },
    {
      "name": "gastprofiel"
    },
    {
      "name": "valutategoed"
    },
    {
      "name": "scanner"
    }
  ],
  "paths": {
    "/api/aanmelden": {
      "post": {
        "tags": [
          "Aanmelden"
        ],
        "operationId": "postAanmelden",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pincode": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gebruiker": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        },
                        "rol": {
                          "type": "string",
                          "enum": [
                            "bediening",
                            "manager",
                            "beheerder"
                          ]
                        },
                        "taal": {
                          "type": "string",
                          "enum": [
                            "id",
                            "nl",
                            "am",
                            "ar",
                            "ary",
                            "ary_latn",
                            "bg",
                            "ckb",
                            "cs",
                            "de",
                            "en",
                            "es",
                            "fa",
                            "fr",
                            "hi",
                            "hr",
                            "hu",
                            "it",
                            "ku",
                            "lt",
                            "lv",
                            "pap",
                            "pl",
                            "prs",
                            "ps",
                            "pt",
                            "rif",
                            "ro",
                            "ru",
                            "sk",
                            "so",
                            "sq",
                            "sr",
                            "srn",
                            "syr",
                            "ti",
                            "tr",
                            "uk",
                            "ur",
                            "vi",
                            "zgh",
                            "zh"
                          ],
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "naam",
                        "rol",
                        "taal"
                      ]
                    },
                    "vestiging": {
                      "$ref": "#/components/schemas/Vestiging"
                    },
                    "fiscaalVerplicht": {
                      "type": "boolean"
                    },
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "gebruiker",
                    "vestiging",
                    "fiscaalVerplicht",
                    "rechten",
                    "token"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Voer een pincode van 4 tot 8 cijfers in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voer een pincode van 4 tot 8 cijfers in."
                }
              }
            }
          },
          "401": {
            "description": "Onbekende pincode.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende pincode."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/aanmelden/pas": {
      "post": {
        "tags": [
          "pasje"
        ],
        "operationId": "postAanmeldenPas",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pas": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gebruiker": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        },
                        "rol": {
                          "type": "string",
                          "enum": [
                            "bediening",
                            "manager",
                            "beheerder"
                          ]
                        },
                        "taal": {
                          "type": "string",
                          "enum": [
                            "id",
                            "nl",
                            "am",
                            "ar",
                            "ary",
                            "ary_latn",
                            "bg",
                            "ckb",
                            "cs",
                            "de",
                            "en",
                            "es",
                            "fa",
                            "fr",
                            "hi",
                            "hr",
                            "hu",
                            "it",
                            "ku",
                            "lt",
                            "lv",
                            "pap",
                            "pl",
                            "prs",
                            "ps",
                            "pt",
                            "rif",
                            "ro",
                            "ru",
                            "sk",
                            "so",
                            "sq",
                            "sr",
                            "srn",
                            "syr",
                            "ti",
                            "tr",
                            "uk",
                            "ur",
                            "vi",
                            "zgh",
                            "zh"
                          ],
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "naam",
                        "rol",
                        "taal"
                      ]
                    },
                    "vestiging": {
                      "$ref": "#/components/schemas/Vestiging"
                    },
                    "fiscaalVerplicht": {
                      "type": "boolean"
                    },
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "gebruiker",
                    "vestiging",
                    "fiscaalVerplicht",
                    "rechten",
                    "token"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Dit pasje kan de kassa niet lezen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit pasje kan de kassa niet lezen."
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekend pasje.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekend pasje."
                }
              }
            }
          },
          "409": {
            "description": "Aanmelden met een pasje staat uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Aanmelden met een pasje staat uit."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/adres": {
      "get": {
        "tags": [
          "Adres"
        ],
        "operationId": "getAdres",
        "summary": "Adres bij postcode en huisnummer (met letter of toevoeging, bv",
        "description": "Adres bij postcode en huisnummer (met letter of toevoeging, bv. 12A of 12-1).\nGeeft alle adressen op dat nummer, de gevraagde toevoeging eerst.",
        "parameters": [
          {
            "name": "postcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "huisnummer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "adressen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GevondenAdres"
                      }
                    }
                  },
                  "required": [
                    "adressen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul een Nederlandse postcode in, bv. 1234 AB.\n- Vul een huisnummer in, bv. 12 of 12A.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een Nederlandse postcode in, bv. 1234 AB."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Geen adres gevonden bij deze postcode en dit huisnummer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geen adres gevonden bij deze postcode en dit huisnummer."
                }
              }
            }
          },
          "409": {
            "description": "Adres opzoeken staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Adres opzoeken staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "De betaalterminal of een externe dienst gaf een fout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/afmelden": {
      "post": {
        "tags": [
          "Aanmelden"
        ],
        "operationId": "postAfmelden",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/apicbase/kostprijzen": {
      "get": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "getApicbaseKostprijzen",
        "summary": "Kostprijs per portie volgens Apicbase, per kassaproduct (ook voor wie de voorraad beheert)",
        "description": "Kostprijs per portie volgens Apicbase, per kassaproduct (ook voor wie de voorraad beheert).\n\n**Toegang:** Controleert daarnaast: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Kostprijs"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/artikelen/{id}/favoriet": {
      "post": {
        "tags": [
          "Catalogus"
        ],
        "operationId": "postArtikelenIdFavoriet",
        "summary": "Product als favoriet (snelknop) aan- of uitzetten, vanaf het bestelscherm (lang indrukken)",
        "description": "Product als favoriet (snelknop) aan- of uitzetten, vanaf het bestelscherm\n(lang indrukken). Alleen als favorieten op \"zelf kiezen\" staan; recht\n\"Producten beheren\".\n\n**Toegang:** Controleert daarnaast: `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "favoriet": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "favoriet": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "favoriet"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geef aan of het een favoriet is.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef aan of het een favoriet is."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/artikelen/{id}/foto": {
      "get": {
        "tags": [
          "Productfoto’s"
        ],
        "operationId": "getArtikelenIdFoto",
        "summary": "De foto van een product (jpg, png of webp)",
        "description": "De foto van een product (jpg, png of webp). Zonder aanmelding, zodat ook\nhet klantscherm hem kan tonen; het adres uit de catalogus heeft\n`?v=<versie>`, dus de browser mag hem lang bewaren. 404 = geen foto.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Dit product heeft geen foto.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit product heeft geen foto."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/artikelen/{id}/uitverkocht": {
      "post": {
        "tags": [
          "Catalogus"
        ],
        "operationId": "postArtikelenIdUitverkocht",
        "summary": "Product op \"uitverkocht\" zetten (of weer beschikbaar) vanaf het bestelscherm",
        "description": "Product op \"uitverkocht\" zetten (of weer beschikbaar) vanaf het\nbestelscherm. Mag iedereen die is aangemeld: de bediening merkt het als\neerste als iets op is. Wordt gelogd; alle kassa's werken zich bij.\n\n**Toegang:** Controleert daarnaast: `uitverkocht` (Product op \"op\" zetten (uitverkocht)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uitverkocht": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "uitverkocht": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "uitverkocht"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geef aan of het product uitverkocht is.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef aan of het product uitverkocht is."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bank/terug": {
      "get": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "getBankTerug",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/beheer/apicbase": {
      "get": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "getBeheerApicbase",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "partnerApp": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "$ref": "#/components/schemas/ApicbaseInstelling"
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "tokenIngevuld": {
                      "type": "boolean"
                    },
                    "geheimIngevuld": {
                      "type": "boolean"
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "verkopenTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "verkopenOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "verkopenAantal": {
                      "type": "number"
                    },
                    "catalogusOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "kostprijzenOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "openBonnen": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "migratie",
                    "partnerApp",
                    "instelling",
                    "status",
                    "melding",
                    "tokenIngevuld",
                    "geheimIngevuld",
                    "verbonden",
                    "verkopenTot",
                    "verkopenOp",
                    "verkopenAantal",
                    "catalogusOp",
                    "kostprijzenOp",
                    "openBonnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "postBeheerApicbase",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "partnerApp": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "$ref": "#/components/schemas/ApicbaseInstelling"
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "tokenIngevuld": {
                      "type": "boolean"
                    },
                    "geheimIngevuld": {
                      "type": "boolean"
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "verkopenTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "verkopenOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "verkopenAantal": {
                      "type": "number"
                    },
                    "catalogusOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "kostprijzenOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "openBonnen": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "migratie",
                    "partnerApp",
                    "instelling",
                    "status",
                    "melding",
                    "tokenIngevuld",
                    "geheimIngevuld",
                    "verbonden",
                    "verkopenTot",
                    "verkopenOp",
                    "verkopenAantal",
                    "catalogusOp",
                    "kostprijzenOp",
                    "openBonnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/apicbase/catalogus": {
      "post": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "postBeheerApicbaseCatalogus",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/apicbase/inloggen": {
      "post": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "postBeheerApicbaseInloggen",
        "summary": "Adres om in te loggen bij Apicbase (daarna de code plakken)",
        "description": "Adres om in te loggen bij Apicbase (daarna de code plakken).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/apicbase/kostprijzen": {
      "post": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "postBeheerApicbaseKostprijzen",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/apicbase/outlets": {
      "get": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "getBeheerApicbaseOutlets",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/apicbase/verkopen": {
      "post": {
        "tags": [
          "Apicbase"
        ],
        "operationId": "postBeheerApicbaseVerkopen",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/artikelen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerArtikelen",
        "summary": "producten",
        "description": "producten\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtikelInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "PLU … hoort al bij \"…\". Kies een ander nummer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "PLU … hoort al bij \"…\". Kies een ander nummer."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/artikelen/{id}": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerArtikelenId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtikelInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "PLU … hoort al bij \"…\". Kies een ander nummer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "PLU … hoort al bij \"…\". Kies een ander nummer."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/artikelen/{id}/foto": {
      "put": {
        "tags": [
          "Productfoto’s"
        ],
        "operationId": "putBeheerArtikelenIdFoto",
        "summary": "Foto van een product zetten of vervangen",
        "description": "Foto van een product zetten of vervangen. Body: `{ \"foto\": \"data:image/jpeg;base64,...\" }`\n(jpg, png of webp, hooguit 512 kB; de schermen verkleinen de foto eerst).\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "foto": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "foto": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "foto"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Productfoto’s"
        ],
        "operationId": "deleteBeheerArtikelenIdFoto",
        "summary": "Foto van een product weghalen",
        "description": "Foto van een product weghalen.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "was": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "was"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/artikelen/{id}/verwijderen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerArtikelenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/backups": {
      "get": {
        "tags": [
          "Back-ups"
        ],
        "operationId": "getBeheerBackups",
        "summary": "Overzicht: alle back-ups (nieuwste eerst) en wie een handmatige back-up maakte",
        "description": "Overzicht: alle back-ups (nieuwste eerst) en wie een handmatige back-up maakte.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "map": {
                      "type": "string"
                    },
                    "bewaar": {
                      "type": "number"
                    },
                    "bezig": {
                      "type": "boolean"
                    },
                    "backups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "inPortaal": {
                            "type": "boolean"
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string"
                          },
                          "gemaaktOp": {
                            "type": "string"
                          },
                          "grootteKb": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "door",
                          "naam",
                          "gemaaktOp",
                          "grootteKb"
                        ]
                      }
                    },
                    "portaal": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "android": {
                          "type": "boolean"
                        },
                        "laatsteVerzonden": {
                          "type": "object",
                          "properties": {
                            "naam": {
                              "type": "string"
                            },
                            "op": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "naam",
                            "op"
                          ],
                          "nullable": true
                        },
                        "fout": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "aan",
                        "android",
                        "laatsteVerzonden",
                        "fout"
                      ]
                    }
                  },
                  "required": [
                    "map",
                    "bewaar",
                    "bezig",
                    "backups",
                    "portaal"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Back-ups"
        ],
        "operationId": "postBeheerBackups",
        "summary": "Nu een back-up maken",
        "description": "Nu een back-up maken. Duurt meestal enkele seconden.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bevestig": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "bestand": {
                          "$ref": "#/components/schemas/BackupBestand"
                        }
                      },
                      "required": [
                        "ok",
                        "bestand"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "fout"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bevestig dat je nu een back-up wilt maken.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bevestig dat je nu een back-up wilt maken."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/backups/herstel": {
      "post": {
        "tags": [
          "Back-ups"
        ],
        "operationId": "postBeheerBackupsHerstel",
        "summary": "Een back-up terugzetten: { bestand, pincode }",
        "description": "Een back-up terugzetten: { bestand, pincode }. Alleen de beheerder, met\nopnieuw de eigen pincode. Niet in België (fiscale module/zwarte doos).\nVooraf automatisch een veiligheidsback-up; daarna wordt iedereen afgemeld.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bestand": {},
                  "pincode": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "fout"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "veiligheidsbackup": {
                          "type": "string"
                        },
                        "waarschuwing": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "ok",
                        "veiligheidsbackup",
                        "waarschuwing"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Voer je eigen pincode in om het terugzetten te bevestigen.\n- Kies een back-up uit de lijst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voer je eigen pincode in om het terugzetten te bevestigen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Deze pincode klopt niet. Voer je eigen pincode in (van de aangemelde beheerder).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze pincode klopt niet. Voer je eigen pincode in (van de aangemelde beheerder)."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/backups/portaal": {
      "get": {
        "tags": [
          "Back-ups"
        ],
        "operationId": "getBeheerBackupsPortaal",
        "summary": "Back-ups in het beheerportaal (alleen als back-ups daarheen gaan; standaard Android)",
        "description": "Back-ups in het beheerportaal (alleen als back-ups daarheen gaan; standaard Android).\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "backups": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PortaalBackup"
                      }
                    }
                  },
                  "required": [
                    "backups"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Back-ups gaan niet naar het beheerportaal op deze kassa.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Back-ups gaan niet naar het beheerportaal op deze kassa."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "De betaalterminal of een externe dienst gaf een fout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/backups/portaal/ophalen": {
      "post": {
        "tags": [
          "Back-ups"
        ],
        "operationId": "postBeheerBackupsPortaalOphalen",
        "summary": "Een back-up uit het portaal ophalen naar dit apparaat: { naam }",
        "description": "Een back-up uit het portaal ophalen naar dit apparaat: { naam }. Daarna staat\nhij in de lijst en zet de beheerder hem terug zoals elke back-up (met pincode).\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bestand": {
                      "$ref": "#/components/schemas/BackupBestand"
                    }
                  },
                  "required": [
                    "ok",
                    "bestand"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Back-ups gaan niet naar het beheerportaal op deze kassa.\n- Er loopt al een back-up of herstel. Wacht even.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Back-ups gaan niet naar het beheerportaal op deze kassa."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/backups/portaal/versturen": {
      "post": {
        "tags": [
          "Back-ups"
        ],
        "operationId": "postBeheerBackupsPortaalVersturen",
        "summary": "Nu versturen wat nog niet in het portaal staat (anders gebeurt dat elk uur vanzelf)",
        "description": "Nu versturen wat nog niet in het portaal staat (anders gebeurt dat elk uur vanzelf).\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Back-ups gaan niet naar het beheerportaal op deze kassa.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Back-ups gaan niet naar het beheerportaal op deze kassa."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Versturen mislukt: …",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Versturen mislukt: …"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling": {
      "get": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "getBeheerBankkoppeling",
        "summary": "Bankkoppeling: app ingesteld (uit .env of niet), terugadres, gekoppeld, bank, rekeningen, geldig tot, autom…",
        "description": "Bankkoppeling: app ingesteld (uit .env of niet), terugadres, gekoppeld, bank, rekeningen, geldig tot, automatisch, laatste keer en fout.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bijgewerkt": {
                      "type": "boolean"
                    },
                    "opRekening": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "ingesteld": {
                          "type": "boolean"
                        },
                        "uitEnv": {
                          "type": "boolean"
                        },
                        "appId": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "ingesteld",
                        "uitEnv",
                        "appId"
                      ]
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "redirectUitEnv": {
                      "type": "boolean"
                    },
                    "terugadres": {
                      "type": "string",
                      "nullable": true
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "verlopen": {
                      "type": "boolean"
                    },
                    "bank": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "land": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "naam",
                        "land"
                      ],
                      "nullable": true
                    },
                    "rekeningen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "iban": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "iban",
                          "naam"
                        ]
                      }
                    },
                    "geldigTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "automatisch": {
                      "type": "boolean"
                    },
                    "laatstOpgehaald": {
                      "type": "string",
                      "nullable": true
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "bijgewerkt",
                    "opRekening",
                    "app",
                    "redirect",
                    "redirectUitEnv",
                    "terugadres",
                    "verbonden",
                    "verlopen",
                    "bank",
                    "rekeningen",
                    "geldigTot",
                    "automatisch",
                    "laatstOpgehaald",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling/app": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postBeheerBankkoppelingApp",
        "summary": "{ appId, sleutel }: de app bij Enable Banking (sleutel = inhoud van het .pem-bestand; leeg = houden, null =…",
        "description": "{ appId, sleutel }: de app bij Enable Banking (sleutel = inhoud van het .pem-bestand; leeg = houden, null = wissen).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bijgewerkt": {
                      "type": "boolean"
                    },
                    "opRekening": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "ingesteld": {
                          "type": "boolean"
                        },
                        "uitEnv": {
                          "type": "boolean"
                        },
                        "appId": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "ingesteld",
                        "uitEnv",
                        "appId"
                      ]
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "redirectUitEnv": {
                      "type": "boolean"
                    },
                    "terugadres": {
                      "type": "string",
                      "nullable": true
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "verlopen": {
                      "type": "boolean"
                    },
                    "bank": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "land": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "naam",
                        "land"
                      ],
                      "nullable": true
                    },
                    "rekeningen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "iban": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "iban",
                          "naam"
                        ]
                      }
                    },
                    "geldigTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "automatisch": {
                      "type": "boolean"
                    },
                    "laatstOpgehaald": {
                      "type": "string",
                      "nullable": true
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "bijgewerkt",
                    "opRekening",
                    "app",
                    "redirect",
                    "redirectUitEnv",
                    "terugadres",
                    "verbonden",
                    "verlopen",
                    "bank",
                    "rekeningen",
                    "geldigTot",
                    "automatisch",
                    "laatstOpgehaald",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling/banken": {
      "get": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "getBeheerBankkoppelingBanken",
        "summary": "?land=NL|BE: de banken die via Enable Banking te koppelen zijn",
        "description": "?land=NL|BE: de banken die via Enable Banking te koppelen zijn.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "land",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "banken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "naam": {
                            "type": "string"
                          },
                          "land": {
                            "type": "string"
                          },
                          "logo": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "naam",
                          "land",
                          "logo"
                        ]
                      }
                    }
                  },
                  "required": [
                    "banken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling/instellingen": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postBeheerBankkoppelingInstellingen",
        "summary": "{ automatisch }: zeker bij een factuur zelf afboeken (standaard uit)",
        "description": "{ automatisch }: zeker bij een factuur zelf afboeken (standaard uit).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bijgewerkt": {
                      "type": "boolean"
                    },
                    "opRekening": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "ingesteld": {
                          "type": "boolean"
                        },
                        "uitEnv": {
                          "type": "boolean"
                        },
                        "appId": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "ingesteld",
                        "uitEnv",
                        "appId"
                      ]
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "redirectUitEnv": {
                      "type": "boolean"
                    },
                    "terugadres": {
                      "type": "string",
                      "nullable": true
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "verlopen": {
                      "type": "boolean"
                    },
                    "bank": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "land": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "naam",
                        "land"
                      ],
                      "nullable": true
                    },
                    "rekeningen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "iban": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "iban",
                          "naam"
                        ]
                      }
                    },
                    "geldigTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "automatisch": {
                      "type": "boolean"
                    },
                    "laatstOpgehaald": {
                      "type": "string",
                      "nullable": true
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "bijgewerkt",
                    "opRekening",
                    "app",
                    "redirect",
                    "redirectUitEnv",
                    "terugadres",
                    "verbonden",
                    "verlopen",
                    "bank",
                    "rekeningen",
                    "geldigTot",
                    "automatisch",
                    "laatstOpgehaald",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling/ontkoppelen": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postBeheerBankkoppelingOntkoppelen",
        "summary": "Ontkoppelen (de toestemming bij de bank intrekken); de bijschrijvingen blijven",
        "description": "Ontkoppelen (de toestemming bij de bank intrekken); de bijschrijvingen blijven.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bijgewerkt": {
                      "type": "boolean"
                    },
                    "opRekening": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "ingesteld": {
                          "type": "boolean"
                        },
                        "uitEnv": {
                          "type": "boolean"
                        },
                        "appId": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "ingesteld",
                        "uitEnv",
                        "appId"
                      ]
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "redirectUitEnv": {
                      "type": "boolean"
                    },
                    "terugadres": {
                      "type": "string",
                      "nullable": true
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "verlopen": {
                      "type": "boolean"
                    },
                    "bank": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "land": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "naam",
                        "land"
                      ],
                      "nullable": true
                    },
                    "rekeningen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "iban": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "iban",
                          "naam"
                        ]
                      }
                    },
                    "geldigTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "automatisch": {
                      "type": "boolean"
                    },
                    "laatstOpgehaald": {
                      "type": "string",
                      "nullable": true
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "bijgewerkt",
                    "opRekening",
                    "app",
                    "redirect",
                    "redirectUitEnv",
                    "terugadres",
                    "verbonden",
                    "verlopen",
                    "bank",
                    "rekeningen",
                    "geldigTot",
                    "automatisch",
                    "laatstOpgehaald",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling/ophalen": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postBeheerBankkoppelingOphalen",
        "summary": "Nu de bijschrijvingen ophalen",
        "description": "Nu de bijschrijvingen ophalen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nieuw": {
                      "type": "number"
                    },
                    "geboekt": {
                      "type": "number"
                    },
                    "voorstel": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "nieuw",
                    "geboekt",
                    "voorstel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bankkoppeling/verbinden": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postBeheerBankkoppelingVerbinden",
        "summary": "{ bank, land }: inloggen bij de bank starten; geeft { url } om te openen",
        "description": "{ bank, land }: inloggen bij de bank starten; geeft { url } om te openen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/betalen": {
      "get": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "getBeheerBetalen",
        "summary": "Instellingen voor het beheerscherm",
        "description": "Instellingen voor het beheerscherm. De sleutel zelf gaat nooit naar de browser.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "testmodus": {
                      "type": "boolean"
                    },
                    "terminals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "terminalId": {
                            "type": "string"
                          },
                          "sleutelIngesteld": {
                            "type": "boolean"
                          },
                          "sleutelEinde": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "terminalId",
                          "sleutelIngesteld",
                          "sleutelEinde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "testmodus",
                    "terminals"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postBeheerBetalen",
        "summary": "apiSleutel alleen meesturen als hij verandert; '' = sleutel wissen",
        "description": "apiSleutel alleen meesturen als hij verandert; '' = sleutel wissen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "apiSleutel": {
                    "type": "string"
                  },
                  "testmodus": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige API-sleutel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige API-sleutel."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgers": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getBeheerBezorgers",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "wisselgeld": {
                      "type": "number",
                      "description": "standaard wisselgeld per rit (centen)"
                    },
                    "volgen": {
                      "type": "boolean",
                      "description": "track & trace: volgpagina voor de klant"
                    },
                    "locatie": {
                      "type": "boolean",
                      "description": "de bezorger live op de kaart (alleen met volgen)"
                    }
                  },
                  "required": [
                    "migratie",
                    "portaal",
                    "aan",
                    "wisselgeld",
                    "volgen",
                    "locatie"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postBeheerBezorgers",
        "summary": "{ aan, wisselgeld, volgen, locatie } (alles optioneel)",
        "description": "{ aan, wisselgeld, volgen, locatie } (alles optioneel).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "wisselgeld": {
                      "type": "number",
                      "description": "standaard wisselgeld per rit (centen)"
                    },
                    "volgen": {
                      "type": "boolean",
                      "description": "track & trace: volgpagina voor de klant"
                    },
                    "locatie": {
                      "type": "boolean",
                      "description": "de bezorger live op de kaart (alleen met volgen)"
                    }
                  },
                  "required": [
                    "migratie",
                    "portaal",
                    "aan",
                    "wisselgeld",
                    "volgen",
                    "locatie"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgersapp": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getBeheerBezorgersapp",
        "summary": "Bezorgersapp (migratie 099): { migratie, portaal, bezorgers, aan, zelfOppakken, vertrek, kaart, koppelingen…",
        "description": "Bezorgersapp (migratie 099): { migratie, portaal, bezorgers, aan, zelfOppakken, vertrek, kaart, koppelingen, medewerkers }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "bezorgers": {
                      "type": "boolean"
                    },
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Koppeling2"
                      }
                    },
                    "medewerkers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "zelfOppakken": {
                      "type": "boolean",
                      "description": "bezorgers mogen zelf bezorgbestellingen oppakken in de app"
                    },
                    "vertrek": {
                      "type": "boolean",
                      "description": "bezorgers mogen zelf vertrekken in de app"
                    },
                    "kaart": {
                      "type": "boolean",
                      "description": "live kaart in de kassa met de bezorgers die aan het werk zijn"
                    }
                  },
                  "required": [
                    "migratie",
                    "portaal",
                    "bezorgers",
                    "koppelingen",
                    "medewerkers",
                    "aan",
                    "zelfOppakken",
                    "vertrek",
                    "kaart"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postBeheerBezorgersapp",
        "summary": "{ aan?, zelfOppakken?, vertrek?, kaart?",
        "description": "{ aan?, zelfOppakken?, vertrek?, kaart? }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "bezorgers": {
                      "type": "boolean"
                    },
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Koppeling2"
                      }
                    },
                    "medewerkers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "zelfOppakken": {
                      "type": "boolean",
                      "description": "bezorgers mogen zelf bezorgbestellingen oppakken in de app"
                    },
                    "vertrek": {
                      "type": "boolean",
                      "description": "bezorgers mogen zelf vertrekken in de app"
                    },
                    "kaart": {
                      "type": "boolean",
                      "description": "live kaart in de kassa met de bezorgers die aan het werk zijn"
                    }
                  },
                  "required": [
                    "migratie",
                    "portaal",
                    "bezorgers",
                    "koppelingen",
                    "medewerkers",
                    "aan",
                    "zelfOppakken",
                    "vertrek",
                    "kaart"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgersapp/koppelingen": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postBeheerBezorgersappKoppelingen",
        "summary": "Telefoon van een bezorger koppelen: { gebruikerId, toestel?",
        "description": "Telefoon van een bezorger koppelen: { gebruikerId, toestel? } → { koppeling, link (QR-code), appLink }. Een oudere koppeling van die medewerker vervalt.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "koppeling": {
                      "$ref": "#/components/schemas/Koppeling2"
                    },
                    "link": {
                      "type": "string"
                    },
                    "appLink": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "koppeling",
                    "link",
                    "appLink"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgersapp/koppelingen/{id}": {
      "delete": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "deleteBeheerBezorgersappKoppelingenId",
        "summary": "Koppeling intrekken: de telefoon ziet meteen niets meer",
        "description": "Koppeling intrekken: de telefoon ziet meteen niets meer.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgplatforms": {
      "get": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "getBeheerBezorgplatforms",
        "summary": "beheer",
        "description": "beheer",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "thefork": {
                      "type": "object",
                      "properties": {
                        "migratie": {
                          "type": "boolean"
                        },
                        "portaal": {
                          "type": "boolean"
                        },
                        "instelling": {
                          "type": "object",
                          "properties": {
                            "aan": {
                              "type": "boolean"
                            },
                            "customerId": {
                              "type": "string",
                              "nullable": true,
                              "description": "restaurant-id bij TheFork (Customer-id, uuid)"
                            },
                            "tafelOpenen": {
                              "type": "boolean",
                              "description": "tafel vanzelf openen bij aankomst"
                            },
                            "rekeningSturen": {
                              "type": "boolean",
                              "description": "rekening na het afrekenen naar TheFork"
                            },
                            "notitie": {
                              "type": "boolean",
                              "description": "notitie (naam, allergieën, aanbetaling) bij de bestelling"
                            },
                            "status": {
                              "type": "string"
                            },
                            "melding": {
                              "type": "string",
                              "nullable": true
                            },
                            "koppelcode": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": [
                            "aan",
                            "customerId",
                            "tafelOpenen",
                            "rekeningSturen",
                            "notitie",
                            "status",
                            "melding",
                            "koppelcode"
                          ]
                        },
                        "orders": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TfOrder"
                          }
                        }
                      },
                      "required": [
                        "migratie",
                        "portaal",
                        "instelling",
                        "orders"
                      ]
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "land": {
                      "type": "string"
                    },
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlatformKoppeling"
                      }
                    },
                    "hubriseApp": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "thefork",
                    "migratie",
                    "portaal",
                    "land",
                    "koppelingen",
                    "hubriseApp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgplatforms/menu": {
      "get": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "getBeheerBezorgplatformsMenu",
        "summary": "Voorbeeld van wat er op het menu komt (producten met \"bestelbaar via bezorgplatforms\")",
        "description": "Voorbeeld van wat er op het menu komt (producten met \"bestelbaar via bezorgplatforms\").",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "groepen": {
                          "type": "array",
                          "items": {}
                        },
                        "artikelen": {
                          "type": "array",
                          "items": {}
                        },
                        "optiegroepen": {
                          "type": "array",
                          "items": {}
                        },
                        "taal": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "groepen",
                        "artikelen",
                        "optiegroepen",
                        "taal"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/PlatformMenu"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgplatforms/producten": {
      "get": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "getBeheerBezorgplatformsProducten",
        "summary": "Welke producten via de bezorgplatforms (Uber Eats, Deliveroo) bestelbaar zijn (alle actieve producten, per …",
        "description": "Welke producten via de bezorgplatforms (Uber Eats, Deliveroo) bestelbaar zijn (alle actieve producten, per groep).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {}
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postBeheerBezorgplatformsProducten",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "artikelIds": {},
                  "aan": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "aantal"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies producten en aan of uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies producten en aan of uit."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Voor de bezorgplatforms is migratie 100 nodig: npm run db:migrate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voor de bezorgplatforms is migratie 100 nodig: npm run db:migrate."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgplatforms/{platform}": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postBeheerBezorgplatformsPlatform",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "thefork": {
                      "type": "object",
                      "properties": {
                        "migratie": {
                          "type": "boolean"
                        },
                        "portaal": {
                          "type": "boolean"
                        },
                        "instelling": {
                          "type": "object",
                          "properties": {
                            "aan": {
                              "type": "boolean"
                            },
                            "customerId": {
                              "type": "string",
                              "nullable": true,
                              "description": "restaurant-id bij TheFork (Customer-id, uuid)"
                            },
                            "tafelOpenen": {
                              "type": "boolean",
                              "description": "tafel vanzelf openen bij aankomst"
                            },
                            "rekeningSturen": {
                              "type": "boolean",
                              "description": "rekening na het afrekenen naar TheFork"
                            },
                            "notitie": {
                              "type": "boolean",
                              "description": "notitie (naam, allergieën, aanbetaling) bij de bestelling"
                            },
                            "status": {
                              "type": "string"
                            },
                            "melding": {
                              "type": "string",
                              "nullable": true
                            },
                            "koppelcode": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": [
                            "aan",
                            "customerId",
                            "tafelOpenen",
                            "rekeningSturen",
                            "notitie",
                            "status",
                            "melding",
                            "koppelcode"
                          ]
                        },
                        "orders": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/TfOrder"
                          }
                        }
                      },
                      "required": [
                        "migratie",
                        "portaal",
                        "instelling",
                        "orders"
                      ]
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "land": {
                      "type": "string"
                    },
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlatformKoppeling"
                      }
                    },
                    "hubriseApp": {
                      "type": "boolean"
                    },
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "thefork",
                    "migratie",
                    "portaal",
                    "land",
                    "koppelingen",
                    "hubriseApp",
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgplatforms/{platform}/inloggen": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postBeheerBezorgplatformsPlatformInloggen",
        "summary": "Uber Eats: adres om in te loggen en de winkel te koppelen",
        "description": "Uber Eats: adres om in te loggen en de winkel te koppelen. HubRise: adres om in te loggen (de code daarna plakken).",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bezorgplatforms/{platform}/menu": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postBeheerBezorgplatformsPlatformMenu",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "aantal",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bi": {
      "get": {
        "tags": [
          "bi"
        ],
        "operationId": "getBeheerBi",
        "summary": "Koppelingen (zonder geheimen), de pakketten, de gegevens en het adres via het portaal",
        "description": "Koppelingen (zonder geheimen), de pakketten, de gegevens en het adres via het portaal.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BiKoppeling"
                      }
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BiDienst"
                      }
                    },
                    "datasets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BiDatasetDef"
                      }
                    },
                    "periodes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "vandaag"
                        ]
                      },
                      "minItems": 10,
                      "maxItems": 10
                    },
                    "portaalAdres": {
                      "type": "string",
                      "nullable": true
                    },
                    "portaalVerbonden": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "koppelingen",
                    "diensten",
                    "datasets",
                    "periodes",
                    "portaalAdres",
                    "portaalVerbonden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "bi"
        ],
        "operationId": "postBeheerBi",
        "summary": "{ dienst, manier, naam, actief, instellingen, geheimen }; de leessleutel (api) komt alleen nu terug",
        "description": "{ dienst, manier, naam, actief, instellingen, geheimen }; de leessleutel (api) komt alleen nu terug.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "koppeling": {
                      "$ref": "#/components/schemas/BiKoppeling"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "koppeling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bi/download/{dataset}": {
      "get": {
        "tags": [
          "bi"
        ],
        "operationId": "getBeheerBiDownloadDataset",
        "summary": "Zelf downloaden (CSV/JSON) voor een periode: { naam, type, inhoud }",
        "description": "Zelf downloaden (CSV/JSON) voor een periode: { naam, type, inhoud }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "formaat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheiding",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sleutel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende gegevens.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende gegevens."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bi/powerbi": {
      "get": {
        "tags": [
          "bi"
        ],
        "operationId": "getBeheerBiPowerbi",
        "summary": "Kant-en-klaar Power BI-sjabloon (.pbit, lib/powerbi.ts) → { naam, type, base64 }",
        "description": "Kant-en-klaar Power BI-sjabloon (.pbit, lib/powerbi.ts) → { naam, type, base64 }. Het adres via het portaal\nstaat er al in (als de kassa aan het klantportaal hangt); bij het openen vraagt Power BI de leessleutel.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "naam": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "base64": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "naam",
                    "type",
                    "base64"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bi/{id}": {
      "post": {
        "tags": [
          "bi"
        ],
        "operationId": "postBeheerBiId",
        "summary": "Wijzigen; geheimen leeg = houden, null = wissen; { nieuweSleutel: true } = nieuwe leessleutel",
        "description": "Wijzigen; geheimen leeg = houden, null = wissen; { nieuweSleutel: true } = nieuwe leessleutel.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "koppeling": {
                      "$ref": "#/components/schemas/BiKoppeling"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "koppeling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bi/{id}/test": {
      "post": {
        "tags": [
          "bi"
        ],
        "operationId": "postBeheerBiIdTest",
        "summary": "Testen: push = voorbeeldbon versturen en daarna wat er klaarstaat; bestand = nu exporteren",
        "description": "Testen: push = voorbeeldbon versturen en daarna wat er klaarstaat; bestand = nu exporteren.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "verstuurd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "ok",
                        "verstuurd"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "bestanden": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "periode": {
                          "type": "string"
                        },
                        "ok": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "bestanden",
                        "periode",
                        "ok"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bij een API-koppeling haalt het BI-pakket zelf op: kopieer het adres en de sleutel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bij een API-koppeling haalt het BI-pakket zelf op: kopieer het adres en de sleutel."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Koppeling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Koppeling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/bi/{id}/verwijderen": {
      "post": {
        "tags": [
          "bi"
        ],
        "operationId": "postBeheerBiIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BiKoppeling"
                      }
                    }
                  },
                  "required": [
                    "koppelingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Koppeling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Koppeling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhouding": {
      "get": {
        "tags": [
          "Boekhouding"
        ],
        "operationId": "getBeheerBoekhouding",
        "summary": "Grootboekrekeningen bekijken (instellingen_beheren)",
        "description": "Grootboekrekeningen bekijken (instellingen_beheren).\n\n**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "dagboek": {
                      "type": "string"
                    },
                    "rekeningen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Rekening"
                      }
                    }
                  },
                  "required": [
                    "land",
                    "dagboek",
                    "rekeningen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Boekhouding"
        ],
        "operationId": "postBeheerBoekhouding",
        "summary": "Grootboekrekeningen en dagboek opslaan",
        "description": "Grootboekrekeningen en dagboek opslaan. Leeg = standaard.\n\n**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dagboek": {},
                  "rekeningen": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "dagboek": {
                      "type": "string"
                    },
                    "rekeningen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Rekening"
                      }
                    }
                  },
                  "required": [
                    "land",
                    "dagboek",
                    "rekeningen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldig rekeningnummer \"…\": alleen cijfers, letters, punt of streepje.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldig rekeningnummer \"…\": alleen cijfers, letters, punt of streepje."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket": {
      "get": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "getBeheerBoekhoudpakket",
        "summary": "Status: gekozen pakket, welke te kiezen zijn, verbonden (administratie), ingevulde velden zonder sleutels, …",
        "description": "Status: gekozen pakket, welke te kiezen zijn, verbonden (administratie),\ningevulde velden zonder sleutels, of het met inloggen gaat (oauth), of het\nin dit land kan, startdatum, laatste fout en de laatste 31 dagen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pakket": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string",
                      "nullable": true
                    },
                    "ingesteld": {
                      "type": "object",
                      "properties": {
                        "acumulus": {
                          "type": "boolean"
                        },
                        "afas": {
                          "type": "boolean"
                        },
                        "businesscentral": {
                          "type": "boolean"
                        },
                        "horus": {
                          "type": "boolean"
                        },
                        "moneybird": {
                          "type": "boolean"
                        },
                        "odoo": {
                          "type": "boolean"
                        },
                        "quickbooks": {
                          "type": "boolean"
                        },
                        "sapb1": {
                          "type": "boolean"
                        },
                        "silvasoft": {
                          "type": "boolean"
                        },
                        "snelstart": {
                          "type": "boolean"
                        },
                        "twinfield": {
                          "type": "boolean"
                        },
                        "xero": {
                          "type": "boolean"
                        },
                        "yuki": {
                          "type": "boolean"
                        },
                        "zoho": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "acumulus",
                        "afas",
                        "businesscentral",
                        "horus",
                        "moneybird",
                        "odoo",
                        "quickbooks",
                        "sapb1",
                        "silvasoft",
                        "snelstart",
                        "twinfield",
                        "xero",
                        "yuki",
                        "zoho"
                      ]
                    },
                    "oauth": {
                      "type": "boolean"
                    },
                    "inLand": {
                      "type": "boolean"
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "administratie": {
                      "type": "string",
                      "nullable": true
                    },
                    "velden": {
                      "type": "object",
                      "additionalProperties": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          }
                        ]
                      }
                    },
                    "startdatum": {
                      "type": "string",
                      "nullable": true
                    },
                    "laatsteFout": {
                      "type": "string",
                      "nullable": true
                    },
                    "redirectUri": {
                      "type": "string"
                    },
                    "envVelden": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "pakketInEnv": {
                      "type": "boolean"
                    },
                    "keuze": {
                      "type": "string"
                    },
                    "exactIngesteld": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "clientId": {
                          "type": "string"
                        },
                        "redirectUri": {
                          "type": "string"
                        },
                        "clientSecretIngevuld": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "clientId",
                        "redirectUri",
                        "clientSecretIngevuld"
                      ],
                      "nullable": true
                    },
                    "snelstartAbonnementInEnv": {
                      "type": "boolean"
                    },
                    "boekingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dag": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "boekstuk": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "geboektOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "dag",
                          "status",
                          "boekstuk",
                          "fout",
                          "geboektOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "pakket",
                    "naam",
                    "ingesteld",
                    "oauth",
                    "inLand",
                    "verbonden",
                    "administratie",
                    "velden",
                    "startdatum",
                    "laatsteFout",
                    "redirectUri",
                    "envVelden",
                    "pakketInEnv",
                    "keuze",
                    "exactIngesteld",
                    "app",
                    "snelstartAbonnementInEnv",
                    "boekingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket/app": {
      "post": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "postBeheerBoekhoudpakketApp",
        "summary": "App van een pakket met inloggen (OAuth) opslaan: client-ID, clientgeheim (leeg = houden) en redirect URI (l…",
        "description": "App van een pakket met inloggen (OAuth) opslaan: client-ID, clientgeheim\n(leeg = houden) en redirect URI (leeg = op de kassa-pc zelf). Velden die in\n.env staan, worden genegeerd.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "velden": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "ingesteld": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "ingesteld"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "… gebruikt geen app: vul de gegevens in en tik op Verbinden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "… gebruikt geen app: vul de gegevens in en tik op Verbinden."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket/boeken": {
      "post": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "postBeheerBoekhoudpakketBoeken",
        "summary": "Nu boeken: alle afgelopen dagen die nog niet in het pakket staan (ook dagen met een fout opnieuw)",
        "description": "Nu boeken: alle afgelopen dagen die nog niet in het pakket staan (ook dagen met een fout opnieuw).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "geboekt": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "leeg": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "fout": {
                      "type": "object",
                      "properties": {
                        "dag": {
                          "type": "string"
                        },
                        "melding": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "dag",
                        "melding"
                      ]
                    }
                  },
                  "required": [
                    "geboekt",
                    "leeg"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Verbind eerst met het boekhoudpakket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Verbind eerst met het boekhoudpakket."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket/kiezen": {
      "post": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "postBeheerBoekhoudpakketKiezen",
        "summary": "Het boekhoudpakket kiezen (Instellingen → Boekhouding; migratie 065): uit (''), exact (Exact Online) of een…",
        "description": "Het boekhoudpakket kiezen (Instellingen → Boekhouding; migratie 065): uit\n(''), exact (Exact Online) of een live koppeling uit de catalogus. Eén\nkeuze: Exact Online en een ander pakket staan nooit samen aan. Alleen\npakketten voor het land van de zaak; niet als BOEKHOUDPAKKET in .env staat.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pakket": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "keuze": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "keuze"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een pakket uit de lijst, of uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een pakket uit de lijst, of uit."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket/ontkoppelen": {
      "post": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "postBeheerBoekhoudpakketOntkoppelen",
        "summary": "Verbinding verbreken (sleutels en tokens weg; wat al geboekt is blijft in de lijst)",
        "description": "Verbinding verbreken (sleutels en tokens weg; wat al geboekt is blijft in de lijst).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket/startdatum": {
      "post": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "postBeheerBoekhoudpakketStartdatum",
        "summary": "Vanaf welke dag boeken (eerdere dagen heeft de boekhouder al)",
        "description": "Vanaf welke dag boeken (eerdere dagen heeft de boekhouder al).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startdatum": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "startdatum": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "startdatum"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige datum.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige datum."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Verbind eerst met het boekhoudpakket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Verbind eerst met het boekhoudpakket."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/boekhoudpakket/verbinden": {
      "post": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "postBeheerBoekhoudpakketVerbinden",
        "summary": "Verbinden. Pakketten met ingevulde gegevens: de velden worden bij het pakket gecontroleerd → { administrati…",
        "description": "Verbinden. Pakketten met ingevulde gegevens: de velden worden bij het\npakket gecontroleerd → { administratie }. OAuth-pakketten (Horus,\nQuickBooks, Twinfield, Xero, Zoho): adres om in te loggen (10 minuten\ngeldig) → { url }; het optionele veld van LIVE_VELDEN (bv. kantoor,\norganisatie, dossier) kiest vooraf de administratie.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "velden": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "administratie": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "administratie"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/btw-assistent": {
      "get": {
        "tags": [
          "wettelijk"
        ],
        "operationId": "getBeheerBtwAssistent",
        "summary": "Alle producten met hun btw, de (geraden) soort, het advies en de planning",
        "description": "Alle producten met hun btw, de (geraden) soort, het advies en de planning.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "tarieven": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tarief"
                      }
                    },
                    "producten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AssistentProduct"
                      }
                    },
                    "ontbreekt": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    },
                    "planning": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BtwPlanning"
                      }
                    }
                  },
                  "required": [
                    "land",
                    "tarieven",
                    "producten",
                    "ontbreekt",
                    "planning"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "wettelijk"
        ],
        "operationId": "postBeheerBtwAssistent",
        "summary": "{ producten: [{ artikelId, soort }], vanaf?: 'JJJJ-MM-DD' } — soort opslaan en de tarieven volgens het advi…",
        "description": "{ producten: [{ artikelId, soort }], vanaf?: 'JJJJ-MM-DD' } — soort opslaan en de tarieven volgens het advies zetten.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "producten": {},
                  "vanaf": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "gewijzigd": {
                      "type": "number"
                    },
                    "gepland": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "gewijzigd",
                    "gepland"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/btw-planning": {
      "get": {
        "tags": [
          "wettelijk"
        ],
        "operationId": "getBeheerBtwPlanning",
        "summary": "Geplande en (laatste 180 dagen) uitgevoerde btw-wijzigingen",
        "description": "Geplande en (laatste 180 dagen) uitgevoerde btw-wijzigingen.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "planning": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BtwPlanning"
                      }
                    }
                  },
                  "required": [
                    "planning"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "wettelijk"
        ],
        "operationId": "postBeheerBtwPlanning",
        "summary": "Nieuwe wijziging: { soort: 'product', artikelId, kolom: 'ter_plaatse'|'afhalen', tariefId, vanaf } of { soo…",
        "description": "Nieuwe wijziging: { soort: 'product', artikelId, kolom: 'ter_plaatse'|'afhalen', tariefId, vanaf }\nof { soort: 'percentage', tariefId, nieuwPercentage, vanaf } (alleen Nederland).\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "planning": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BtwPlanning"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "planning"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/btw-planning/{id}/annuleren": {
      "post": {
        "tags": [
          "wettelijk"
        ],
        "operationId": "postBeheerBtwPlanningIdAnnuleren",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "planning": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BtwPlanning"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "planning"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Geplande wijziging niet gevonden (of al uitgevoerd).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geplande wijziging niet gevonden (of al uitgevoerd)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/cadeaubonnen": {
      "get": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "getBeheerCadeaubonnen",
        "description": "**Toegang:** Vereist recht `cadeaubonnen_beheren` (Cadeaubonnen beheren (saldo corrigeren, blokkeren)).",
        "parameters": [
          {
            "name": "zoek",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cadeaubonnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "codeLeesbaar": {
                            "type": "string"
                          },
                          "beginwaarde": {
                            "type": "number"
                          },
                          "saldo": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "geblokkeerd": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "geactiveerdOp": {
                            "type": "string",
                            "format": "date-time",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "code",
                          "codeLeesbaar",
                          "beginwaarde",
                          "saldo",
                          "actief",
                          "geblokkeerd",
                          "aangemaaktOp",
                          "geactiveerdOp"
                        ]
                      }
                    },
                    "openstaand": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "saldo": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "saldo"
                      ]
                    }
                  },
                  "required": [
                    "cadeaubonnen",
                    "openstaand"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/cadeaubonnen/{id}": {
      "get": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "getBeheerCadeaubonnenId",
        "description": "**Toegang:** Vereist recht `cadeaubonnen_beheren` (Cadeaubonnen beheren (saldo corrigeren, blokkeren)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cadeaubon": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "codeLeesbaar": {
                          "type": "string"
                        },
                        "beginwaarde": {
                          "type": "number"
                        },
                        "saldo": {
                          "type": "number"
                        },
                        "actief": {
                          "type": "boolean"
                        },
                        "geblokkeerd": {
                          "type": "boolean"
                        },
                        "aangemaaktOp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "geactiveerdOp": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "code",
                        "codeLeesbaar",
                        "beginwaarde",
                        "saldo",
                        "actief",
                        "geblokkeerd",
                        "aangemaaktOp",
                        "geactiveerdOp"
                      ]
                    },
                    "mutaties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "saldoNa": {
                            "type": "number"
                          },
                          "omschrijving": {
                            "type": "string",
                            "nullable": true
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "tijd": {
                            "type": "string"
                          },
                          "bestelnummer": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "soort",
                          "bedrag",
                          "saldoNa",
                          "omschrijving",
                          "door",
                          "tijd",
                          "bestelnummer"
                        ]
                      }
                    }
                  },
                  "required": [
                    "cadeaubon",
                    "mutaties"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Cadeaubon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Cadeaubon niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/cadeaubonnen/{id}/blokkeren": {
      "post": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "postBeheerCadeaubonnenIdBlokkeren",
        "summary": "Blokkeren (kwijt, gestolen) of weer vrijgeven",
        "description": "Blokkeren (kwijt, gestolen) of weer vrijgeven.\n\n**Toegang:** Vereist recht `cadeaubonnen_beheren` (Cadeaubonnen beheren (saldo corrigeren, blokkeren)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "geblokkeerd": {},
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cadeaubon": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "codeLeesbaar": {
                          "type": "string"
                        },
                        "beginwaarde": {
                          "type": "number"
                        },
                        "saldo": {
                          "type": "number"
                        },
                        "actief": {
                          "type": "boolean"
                        },
                        "geblokkeerd": {
                          "type": "boolean"
                        },
                        "aangemaaktOp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "geactiveerdOp": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "code",
                        "codeLeesbaar",
                        "beginwaarde",
                        "saldo",
                        "actief",
                        "geblokkeerd",
                        "aangemaaktOp",
                        "geactiveerdOp"
                      ]
                    }
                  },
                  "required": [
                    "cadeaubon"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Cadeaubon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Cadeaubon niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/cadeaubonnen/{id}/saldo": {
      "post": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "postBeheerCadeaubonnenIdSaldo",
        "summary": "Saldo corrigeren (met reden, komt in de geschiedenis en het logboek)",
        "description": "Saldo corrigeren (met reden, komt in de geschiedenis en het logboek).\n\n**Toegang:** Vereist recht `cadeaubonnen_beheren` (Cadeaubonnen beheren (saldo corrigeren, blokkeren)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "saldo": {},
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cadeaubon": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "codeLeesbaar": {
                          "type": "string"
                        },
                        "beginwaarde": {
                          "type": "number"
                        },
                        "saldo": {
                          "type": "number"
                        },
                        "actief": {
                          "type": "boolean"
                        },
                        "geblokkeerd": {
                          "type": "boolean"
                        },
                        "aangemaaktOp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "geactiveerdOp": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "code",
                        "codeLeesbaar",
                        "beginwaarde",
                        "saldo",
                        "actief",
                        "geblokkeerd",
                        "aangemaaktOp",
                        "geactiveerdOp"
                      ]
                    }
                  },
                  "required": [
                    "cadeaubon"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul een geldig saldo in.\n- Geef een reden op.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een geldig saldo in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: cadeaubonnen beheren (saldo corrigeren, blokkeren). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Cadeaubon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Cadeaubon niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/camera": {
      "get": {
        "tags": [
          "Camera's"
        ],
        "operationId": "getBeheerCamera",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "ffmpeg": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "kanalen": {
                            "type": "boolean"
                          },
                          "ophalen": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "soort",
                          "naam",
                          "kanalen",
                          "ophalen"
                        ]
                      }
                    },
                    "systemen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "https": {
                            "type": "boolean"
                          },
                          "gebruiker": {
                            "type": "string",
                            "nullable": true
                          },
                          "wachtwoordIngevuld": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "urlSoort": {
                            "type": "string",
                            "enum": [
                              "foto",
                              "mjpeg",
                              "rtsp"
                            ],
                            "nullable": true
                          },
                          "beeld": {
                            "type": "string",
                            "enum": [
                              "live",
                              "foto"
                            ]
                          },
                          "verversen": {
                            "type": "number"
                          },
                          "cameras": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "toon": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "toon"
                              ]
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "https",
                          "gebruiker",
                          "wachtwoordIngevuld",
                          "url",
                          "urlSoort",
                          "beeld",
                          "verversen",
                          "cameras",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "ffmpeg",
                    "soorten",
                    "systemen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Camera's"
        ],
        "operationId": "postBeheerCamera",
        "summary": "{ aan: true/false }",
        "description": "{ aan: true/false }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "ffmpeg": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "kanalen": {
                            "type": "boolean"
                          },
                          "ophalen": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "soort",
                          "naam",
                          "kanalen",
                          "ophalen"
                        ]
                      }
                    },
                    "systemen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "https": {
                            "type": "boolean"
                          },
                          "gebruiker": {
                            "type": "string",
                            "nullable": true
                          },
                          "wachtwoordIngevuld": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "urlSoort": {
                            "type": "string",
                            "enum": [
                              "foto",
                              "mjpeg",
                              "rtsp"
                            ],
                            "nullable": true
                          },
                          "beeld": {
                            "type": "string",
                            "enum": [
                              "live",
                              "foto"
                            ]
                          },
                          "verversen": {
                            "type": "number"
                          },
                          "cameras": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "toon": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "toon"
                              ]
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "https",
                          "gebruiker",
                          "wachtwoordIngevuld",
                          "url",
                          "urlSoort",
                          "beeld",
                          "verversen",
                          "cameras",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "ffmpeg",
                    "soorten",
                    "systemen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/camera/systemen": {
      "post": {
        "tags": [
          "Camera's"
        ],
        "operationId": "postBeheerCameraSystemen",
        "summary": "Nieuw camerasysteem: { naam, soort, adres, https, gebruiker, wachtwoord, url, urlSoort, beeld, verversen, k…",
        "description": "Nieuw camerasysteem: { naam, soort, adres, https, gebruiker, wachtwoord, url, urlSoort, beeld, verversen, kanalen, cameras }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "ffmpeg": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "kanalen": {
                            "type": "boolean"
                          },
                          "ophalen": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "soort",
                          "naam",
                          "kanalen",
                          "ophalen"
                        ]
                      }
                    },
                    "systemen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "https": {
                            "type": "boolean"
                          },
                          "gebruiker": {
                            "type": "string",
                            "nullable": true
                          },
                          "wachtwoordIngevuld": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "urlSoort": {
                            "type": "string",
                            "enum": [
                              "foto",
                              "mjpeg",
                              "rtsp"
                            ],
                            "nullable": true
                          },
                          "beeld": {
                            "type": "string",
                            "enum": [
                              "live",
                              "foto"
                            ]
                          },
                          "verversen": {
                            "type": "number"
                          },
                          "cameras": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "toon": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "toon"
                              ]
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "https",
                          "gebruiker",
                          "wachtwoordIngevuld",
                          "url",
                          "urlSoort",
                          "beeld",
                          "verversen",
                          "cameras",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "migratie",
                    "aan",
                    "ffmpeg",
                    "soorten",
                    "systemen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/camera/systemen/{id}": {
      "put": {
        "tags": [
          "Camera's"
        ],
        "operationId": "putBeheerCameraSystemenId",
        "summary": "Wijzigen (wachtwoord leeg = houden, null = wissen)",
        "description": "Wijzigen (wachtwoord leeg = houden, null = wissen).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "ffmpeg": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "kanalen": {
                            "type": "boolean"
                          },
                          "ophalen": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "soort",
                          "naam",
                          "kanalen",
                          "ophalen"
                        ]
                      }
                    },
                    "systemen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "https": {
                            "type": "boolean"
                          },
                          "gebruiker": {
                            "type": "string",
                            "nullable": true
                          },
                          "wachtwoordIngevuld": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "urlSoort": {
                            "type": "string",
                            "enum": [
                              "foto",
                              "mjpeg",
                              "rtsp"
                            ],
                            "nullable": true
                          },
                          "beeld": {
                            "type": "string",
                            "enum": [
                              "live",
                              "foto"
                            ]
                          },
                          "verversen": {
                            "type": "number"
                          },
                          "cameras": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "toon": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "toon"
                              ]
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "https",
                          "gebruiker",
                          "wachtwoordIngevuld",
                          "url",
                          "urlSoort",
                          "beeld",
                          "verversen",
                          "cameras",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "migratie",
                    "aan",
                    "ffmpeg",
                    "soorten",
                    "systemen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Camera's"
        ],
        "operationId": "deleteBeheerCameraSystemenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "ffmpeg": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "kanalen": {
                            "type": "boolean"
                          },
                          "ophalen": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "soort",
                          "naam",
                          "kanalen",
                          "ophalen"
                        ]
                      }
                    },
                    "systemen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "https": {
                            "type": "boolean"
                          },
                          "gebruiker": {
                            "type": "string",
                            "nullable": true
                          },
                          "wachtwoordIngevuld": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "urlSoort": {
                            "type": "string",
                            "enum": [
                              "foto",
                              "mjpeg",
                              "rtsp"
                            ],
                            "nullable": true
                          },
                          "beeld": {
                            "type": "string",
                            "enum": [
                              "live",
                              "foto"
                            ]
                          },
                          "verversen": {
                            "type": "number"
                          },
                          "cameras": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "toon": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "toon"
                              ]
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "https",
                          "gebruiker",
                          "wachtwoordIngevuld",
                          "url",
                          "urlSoort",
                          "beeld",
                          "verversen",
                          "cameras",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "ffmpeg",
                    "soorten",
                    "systemen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/camera/systemen/{id}/ophalen": {
      "post": {
        "tags": [
          "Camera's"
        ],
        "operationId": "postBeheerCameraSystemenIdOphalen",
        "summary": "Synology, UniFi en ONVIF: de camera's ophalen",
        "description": "Synology, UniFi en ONVIF: de camera's ophalen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aantal": {
                      "type": "number"
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "ffmpeg": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "kanalen": {
                            "type": "boolean"
                          },
                          "ophalen": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "soort",
                          "naam",
                          "kanalen",
                          "ophalen"
                        ]
                      }
                    },
                    "systemen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "url",
                              "web",
                              "hikvision",
                              "dahua",
                              "axis",
                              "reolink",
                              "synology",
                              "unifi",
                              "onvif"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "https": {
                            "type": "boolean"
                          },
                          "gebruiker": {
                            "type": "string",
                            "nullable": true
                          },
                          "wachtwoordIngevuld": {
                            "type": "boolean"
                          },
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "urlSoort": {
                            "type": "string",
                            "enum": [
                              "foto",
                              "mjpeg",
                              "rtsp"
                            ],
                            "nullable": true
                          },
                          "beeld": {
                            "type": "string",
                            "enum": [
                              "live",
                              "foto"
                            ]
                          },
                          "verversen": {
                            "type": "number"
                          },
                          "cameras": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "toon": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "toon"
                              ]
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "https",
                          "gebruiker",
                          "wachtwoordIngevuld",
                          "url",
                          "urlSoort",
                          "beeld",
                          "verversen",
                          "cameras",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "aantal",
                    "migratie",
                    "aan",
                    "ffmpeg",
                    "soorten",
                    "systemen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/camera/systemen/{id}/test": {
      "post": {
        "tags": [
          "Camera's"
        ],
        "operationId": "postBeheerCameraSystemenIdTest",
        "summary": "Kan de kassa de eerste camera bereiken?",
        "description": "Kan de kassa de eerste camera bereiken?\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "bytes": {
                      "type": "number"
                    },
                    "live": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "bytes",
                    "live"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/catalogus": {
      "get": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "getBeheerCatalogus",
        "summary": "Alles voor het beheerscherm: groepen, producten (in volgorde) en btw-tarieven",
        "description": "Alles voor het beheerscherm: groepen, producten (in volgorde) en btw-tarieven.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "artikelen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "btw": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "wettelijk": {
                      "type": "object",
                      "properties": {
                        "leeftijdscheck": {
                          "type": "boolean"
                        },
                        "wegwerp": {
                          "type": "boolean"
                        },
                        "statiegeld": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "leeftijdscheck",
                        "wegwerp",
                        "statiegeld"
                      ]
                    },
                    "leverwijze": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "groepen",
                    "artikelen",
                    "btw",
                    "wettelijk",
                    "leverwijze"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/configuratie/export": {
      "get": {
        "tags": [
          "Configuratie"
        ],
        "operationId": "getBeheerConfiguratieExport",
        "summary": "Exporteren: ?onderdelen=producten,plattegronden,instellingen",
        "description": "Exporteren: ?onderdelen=producten,plattegronden,instellingen\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "parameters": [
          {
            "name": "onderdelen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rij2"
                }
              }
            }
          },
          "400": {
            "description": "Kies wat je wilt exporteren: producten, plattegronden en/of instellingen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies wat je wilt exporteren: producten, plattegronden en/of instellingen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/configuratie/import": {
      "post": {
        "tags": [
          "Configuratie"
        ],
        "operationId": "postBeheerConfiguratieImport",
        "summary": "Importeren: { pincode, onderdelen: [...], bestand: {...} }",
        "description": "Importeren: { pincode, onderdelen: [...], bestand: {...} }. Vervangt de gekozen onderdelen.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pincode": {},
                  "onderdelen": {},
                  "bestand": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "onderdelen": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "producten",
                          "plattegronden",
                          "instellingen"
                        ]
                      }
                    },
                    "telling": {
                      "$ref": "#/components/schemas/ImportTelling"
                    },
                    "backup": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "onderdelen",
                    "telling",
                    "backup"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Voer je eigen pincode in om het importeren te bevestigen.\n- Kies wat je uit dit bestand wilt importeren.\n- Het bestand klopt niet; er is niets geïmporteerd. (…)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voer je eigen pincode in om het importeren te bevestigen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Deze pincode klopt niet. Voer je eigen pincode in (van de aangemelde beheerder).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze pincode klopt niet. Voer je eigen pincode in (van de aangemelde beheerder)."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Er staan nog … open bestelling(en). Reken die eerst af of sluit ze, en importeer daarna.\n- Er loopt al een import. Wacht even.\n- Er is niets geïmporteerd: de back-up vooraf lukte niet. …",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Er staan nog … open bestelling(en). Reken die eerst af of sluit ze, en importeer daarna."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/dagdelen": {
      "get": {
        "tags": [
          "Acties"
        ],
        "operationId": "getBeheerDagdelen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dagdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Dagdeel"
                      }
                    }
                  },
                  "required": [
                    "dagdelen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerDagdelen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DagdeelInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dagdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Dagdeel"
                      }
                    }
                  },
                  "required": [
                    "dagdelen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/dagdelen/{id}": {
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerDagdelenId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DagdeelInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dagdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Dagdeel"
                      }
                    }
                  },
                  "required": [
                    "dagdelen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Dagdeel niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dagdeel niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/dagdelen/{id}/verwijderen": {
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerDagdelenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dagdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Dagdeel"
                      }
                    }
                  },
                  "required": [
                    "dagdelen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Dagdeel niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dagdeel niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/dagsamenvatting": {
      "get": {
        "tags": [
          "dagsamenvatting"
        ],
        "operationId": "getBeheerDagsamenvatting",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie115": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie115",
                    "aan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "dagsamenvatting"
        ],
        "operationId": "postBeheerDagsamenvatting",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie115": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie115",
                    "aan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/dagsamenvatting/voorbeeld": {
      "get": {
        "tags": [
          "dagsamenvatting"
        ],
        "operationId": "getBeheerDagsamenvattingVoorbeeld",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "regels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "regels"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/database": {
      "get": {
        "tags": [
          "Database"
        ],
        "operationId": "getBeheerDatabase",
        "summary": "Welke database nu, en wat er is ingesteld",
        "description": "Welke database nu, en wat er is ingesteld.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseOverzicht"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/database/omschakelen": {
      "post": {
        "tags": [
          "Database"
        ],
        "operationId": "postBeheerDatabaseOmschakelen",
        "summary": "Omschakelen: { doel: 'intern' | 'extern' | 'mysql', url?, mysql?, pincode }",
        "description": "Omschakelen: { doel: 'intern' | 'extern' | 'mysql', url?, mysql?, pincode }. Alleen de\nbeheerder, met opnieuw de eigen pincode. Alle gegevens gaan mee (alle richtingen).\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "doel": {},
                  "url": {},
                  "mysql": {},
                  "pincode": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "fout"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "modus": {
                          "type": "string",
                          "enum": [
                            "extern",
                            "intern",
                            "mysql"
                          ]
                        },
                        "backup": {
                          "type": "string"
                        },
                        "tabellen": {
                          "type": "number"
                        },
                        "rijen": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "ok",
                        "modus",
                        "backup",
                        "tabellen",
                        "rijen"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies mysql (MySQL/MariaDB), intern (ingebouwd, PGlite) of extern (PostgreSQL).\n- Voer je eigen pincode in om het omschakelen te bevestigen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies mysql (MySQL/MariaDB), intern (ingebouwd, PGlite) of extern (PostgreSQL)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Deze pincode klopt niet. Voer je eigen pincode in (van de aangemelde beheerder).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze pincode klopt niet. Voer je eigen pincode in (van de aangemelde beheerder)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/database/test": {
      "post": {
        "tags": [
          "Database"
        ],
        "operationId": "postBeheerDatabaseTest",
        "summary": "Verbinding testen (zonder iets te veranderen): { url?, soort?, mysql?",
        "description": "Verbinding testen (zonder iets te veranderen): { url?, soort?, mysql? }. soort 'mysql' = MySQL/MariaDB\n(adres als url of in losse velden: mysql = { server, poort, database, gebruiker, wachtwoord }),\nanders (of 'extern') PostgreSQL.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {},
                  "soort": {},
                  "mysql": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "versie": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "ok",
                            "versie"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "fout": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "ok",
                            "fout"
                          ]
                        }
                      ]
                    },
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            },
                            "versie": {
                              "type": "string"
                            },
                            "merk": {
                              "type": "string",
                              "enum": [
                                "MySQL",
                                "MariaDB"
                              ]
                            }
                          },
                          "required": [
                            "ok",
                            "versie",
                            "merk"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean",
                              "enum": [
                                false
                              ]
                            },
                            "fout": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "ok",
                            "fout"
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/etiketten": {
      "get": {
        "tags": [
          "etiketten"
        ],
        "operationId": "getBeheerEtiketten",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "formaat": {
                      "type": "string",
                      "enum": [
                        "38x25",
                        "57x32",
                        "62x29",
                        "100x50"
                      ]
                    },
                    "prijs": {
                      "type": "boolean",
                      "description": "prijs op het etiket"
                    },
                    "streepjescode": {
                      "type": "boolean",
                      "description": "streepjescode op het etiket (als het product een code heeft)"
                    },
                    "scannen": {
                      "type": "boolean",
                      "description": "scannen op het bestelscherm zet het product erbij"
                    },
                    "migratie115": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "formaat",
                    "prijs",
                    "streepjescode",
                    "scannen",
                    "migratie115"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "etiketten"
        ],
        "operationId": "postBeheerEtiketten",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "formaat": {
                      "type": "string",
                      "enum": [
                        "38x25",
                        "57x32",
                        "62x29",
                        "100x50"
                      ]
                    },
                    "prijs": {
                      "type": "boolean",
                      "description": "prijs op het etiket"
                    },
                    "streepjescode": {
                      "type": "boolean",
                      "description": "streepjescode op het etiket (als het product een code heeft)"
                    },
                    "scannen": {
                      "type": "boolean",
                      "description": "scannen op het bestelscherm zet het product erbij"
                    },
                    "migratie115": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "formaat",
                    "prijs",
                    "streepjescode",
                    "scannen",
                    "migratie115"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/exact": {
      "get": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "getBeheerExact",
        "summary": "Status: ingesteld in .env, aan, verbonden (administratie), startdatum, laatste fout en de laatste 31 dagen",
        "description": "Status: ingesteld in .env, aan, verbonden (administratie), startdatum, laatste fout en de laatste 31 dagen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingesteld": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "administratie": {
                      "type": "string",
                      "nullable": true
                    },
                    "startdatum": {
                      "type": "string",
                      "nullable": true
                    },
                    "laatsteFout": {
                      "type": "string",
                      "nullable": true
                    },
                    "redirectUri": {
                      "type": "string"
                    },
                    "app": {
                      "type": "object",
                      "properties": {
                        "clientId": {
                          "type": "string"
                        },
                        "redirectUri": {
                          "type": "string"
                        },
                        "clientSecretIngevuld": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "clientId",
                        "redirectUri",
                        "clientSecretIngevuld"
                      ]
                    },
                    "envVelden": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "boekingen": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {}
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "dag": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "boekstuk": {
                                "type": "string",
                                "nullable": true
                              },
                              "fout": {
                                "type": "string",
                                "nullable": true
                              },
                              "geboektOp": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "dag",
                              "status",
                              "boekstuk",
                              "fout",
                              "geboektOp"
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "ingesteld",
                    "aan",
                    "verbonden",
                    "administratie",
                    "startdatum",
                    "laatsteFout",
                    "redirectUri",
                    "app",
                    "envVelden",
                    "boekingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/exact/app": {
      "post": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "postBeheerExactApp",
        "summary": "App van Exact Online opslaan: client-ID, clientgeheim (leeg = houden) en redirect URI; velden in .env worde…",
        "description": "App van Exact Online opslaan: client-ID, clientgeheim (leeg = houden) en redirect URI; velden in .env worden genegeerd.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "velden": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "ingesteld": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "ingesteld"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/exact/boeken": {
      "post": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "postBeheerExactBoeken",
        "summary": "Nu boeken: alle afgelopen dagen die nog niet in Exact staan (ook dagen met een fout opnieuw)",
        "description": "Nu boeken: alle afgelopen dagen die nog niet in Exact staan (ook dagen met een fout opnieuw).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "geboekt": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "leeg": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "fout": {
                      "type": "object",
                      "properties": {
                        "dag": {
                          "type": "string"
                        },
                        "melding": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "dag",
                        "melding"
                      ]
                    }
                  },
                  "required": [
                    "geboekt",
                    "leeg"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Verbind eerst met Exact Online.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Verbind eerst met Exact Online."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/exact/ontkoppelen": {
      "post": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "postBeheerExactOntkoppelen",
        "summary": "Verbinding verbreken (tokens weg; wat al geboekt is blijft in de lijst)",
        "description": "Verbinding verbreken (tokens weg; wat al geboekt is blijft in de lijst).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/exact/startdatum": {
      "post": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "postBeheerExactStartdatum",
        "summary": "Vanaf welke dag boeken (eerdere dagen heeft de boekhouder al)",
        "description": "Vanaf welke dag boeken (eerdere dagen heeft de boekhouder al).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startdatum": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "startdatum": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "startdatum"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige datum.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige datum."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Verbind eerst met Exact Online.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Verbind eerst met Exact Online."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/exact/verbinden": {
      "post": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "postBeheerExactVerbinden",
        "summary": "Adres om bij Exact Online in te loggen en de kassa toegang te geven (10 minuten geldig)",
        "description": "Adres om bij Exact Online in te loggen en de kassa toegang te geven (10 minuten geldig).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/extra-rapporten": {
      "get": {
        "tags": [
          "extrarapporten"
        ],
        "operationId": "getBeheerExtraRapporten",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie113": {
                      "type": "boolean"
                    },
                    "menuEngineering": {
                      "type": "boolean"
                    },
                    "acties": {
                      "type": "boolean"
                    },
                    "verspilling": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie113",
                    "menuEngineering",
                    "acties",
                    "verspilling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "extrarapporten"
        ],
        "operationId": "postBeheerExtraRapporten",
        "summary": "{ menuEngineering, acties, verspilling } (alles optioneel)",
        "description": "{ menuEngineering, acties, verspilling } (alles optioneel).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie113": {
                      "type": "boolean"
                    },
                    "menuEngineering": {
                      "type": "boolean"
                    },
                    "acties": {
                      "type": "boolean"
                    },
                    "verspilling": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie113",
                    "menuEngineering",
                    "acties",
                    "verspilling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturen",
        "summary": "Facturen, nieuwste eerst; ?zoek= nummer, klant of bonnummer",
        "description": "Facturen, nieuwste eerst; ?zoek= nummer, klant of bonnummer.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "zoek",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "facturen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FactuurRij"
                      }
                    },
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "boolean"
                        },
                        "billit": {
                          "type": "boolean"
                        },
                        "http": {
                          "type": "boolean"
                        },
                        "billitSandbox": {
                          "type": "boolean"
                        },
                        "storecove": {
                          "type": "boolean"
                        },
                        "banqup": {
                          "type": "boolean"
                        },
                        "banqupSandbox": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "email",
                        "billit",
                        "http",
                        "billitSandbox",
                        "storecove",
                        "banqup",
                        "banqupSandbox"
                      ]
                    }
                  },
                  "required": [
                    "facturen",
                    "kanalen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "facturen"
        ],
        "operationId": "postBeheerFacturen",
        "summary": "{ ticketId, afnemer: { naam, adres, postcode, plaats, land, btwNummer, kvk, peppolId, email, referentie }, …",
        "description": "{ ticketId, afnemer: { naam, adres, postcode, plaats, land, btwNummer, kvk, peppolId, email, referentie }, notitie? }\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factuur": {
                      "$ref": "#/components/schemas/FactuurRij"
                    }
                  },
                  "required": [
                    "factuur"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/afnemers": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturenAfnemers",
        "summary": "Eerdere klanten, om snel te kiezen",
        "description": "Eerdere klanten, om snel te kiezen.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "afnemers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FactuurAfnemer"
                      }
                    }
                  },
                  "required": [
                    "afnemers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/bon/{ticketId}": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturenBonTicketId",
        "summary": "Voorstel bij een bon: regels, btw, totaal en of er al een factuur is",
        "description": "Voorstel bij een bon: regels, btw, totaal en of er al een factuur is.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bonnummer": {
                      "type": "number"
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FactuurRegel"
                      }
                    },
                    "btw": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FactuurBtw"
                      }
                    },
                    "totaal": {
                      "type": "number"
                    },
                    "bestaand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "nummer": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "nummer"
                      ],
                      "nullable": true
                    },
                    "fout": {},
                    "code": {}
                  },
                  "required": [
                    "bonnummer",
                    "regels",
                    "btw",
                    "totaal",
                    "bestaand"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/instellingen": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturenInstellingen",
        "summary": "Gegevens op de factuur en welke verzendwijzen er zijn (Billit, Storecove, Banqup en HTTP: in .env of in de …",
        "description": "Gegevens op de factuur en welke verzendwijzen er zijn (Billit, Storecove, Banqup en HTTP: in .env of in de app).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gegevens": {
                      "$ref": "#/components/schemas/FactuurGegevens"
                    },
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "boolean"
                        },
                        "billit": {
                          "type": "boolean"
                        },
                        "http": {
                          "type": "boolean"
                        },
                        "billitSandbox": {
                          "type": "boolean"
                        },
                        "storecove": {
                          "type": "boolean"
                        },
                        "banqup": {
                          "type": "boolean"
                        },
                        "banqupSandbox": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "email",
                        "billit",
                        "http",
                        "billitSandbox",
                        "storecove",
                        "banqup",
                        "banqupSandbox"
                      ]
                    }
                  },
                  "required": [
                    "gegevens",
                    "kanalen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "facturen"
        ],
        "operationId": "postBeheerFacturenInstellingen",
        "summary": "{ kvk, iban, bic, peppolId, betaaltermijn, voorvoegsel, verzendwijze, kopie, notitie } — niet meegestuurd =…",
        "description": "{ kvk, iban, bic, peppolId, betaaltermijn, voorvoegsel, verzendwijze, kopie, notitie } — niet meegestuurd = niet wijzigen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gegevens": {
                      "$ref": "#/components/schemas/FactuurGegevens"
                    },
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "boolean"
                        },
                        "billit": {
                          "type": "boolean"
                        },
                        "http": {
                          "type": "boolean"
                        },
                        "billitSandbox": {
                          "type": "boolean"
                        },
                        "storecove": {
                          "type": "boolean"
                        },
                        "banqup": {
                          "type": "boolean"
                        },
                        "banqupSandbox": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "email",
                        "billit",
                        "http",
                        "billitSandbox",
                        "storecove",
                        "banqup",
                        "banqupSandbox"
                      ]
                    }
                  },
                  "required": [
                    "gegevens",
                    "kanalen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/peppol": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturenPeppol",
        "summary": "Peppol-diensten (Billit, Storecove, Banqup, eigen adres): per dienst per veld { waarde, ingevuld, uitEnv }.…",
        "description": "Peppol-diensten (Billit, Storecove, Banqup, eigen adres): per dienst per veld\n{ waarde, ingevuld, uitEnv }. Geheime velden (sleutels, headers) zonder waarde.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "diensten": {
                      "type": "object",
                      "properties": {
                        "http": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        },
                        "billit": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        },
                        "storecove": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        },
                        "banqup": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        }
                      },
                      "required": [
                        "http",
                        "billit",
                        "storecove",
                        "banqup"
                      ]
                    },
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "boolean"
                        },
                        "billit": {
                          "type": "boolean"
                        },
                        "http": {
                          "type": "boolean"
                        },
                        "billitSandbox": {
                          "type": "boolean"
                        },
                        "storecove": {
                          "type": "boolean"
                        },
                        "banqup": {
                          "type": "boolean"
                        },
                        "banqupSandbox": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "email",
                        "billit",
                        "http",
                        "billitSandbox",
                        "storecove",
                        "banqup",
                        "banqupSandbox"
                      ]
                    }
                  },
                  "required": [
                    "diensten",
                    "kanalen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "facturen"
        ],
        "operationId": "postBeheerFacturenPeppol",
        "summary": "{ billit?: { apiKey, partyId, sandbox }, storecove?: { apiKey, legalEntityId, url }, banqup?: { clientId, c…",
        "description": "{ billit?: { apiKey, partyId, sandbox }, storecove?: { apiKey, legalEntityId, url },\n  banqup?: { clientId, clientSecret, spaceId, sandbox, url }, http?: { url, headers } }\nNiet meegestuurd = niet wijzigen; velden uit .env worden genegeerd; leeg geheim = houden, null = wissen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "diensten": {
                      "type": "object",
                      "properties": {
                        "http": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        },
                        "billit": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        },
                        "storecove": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        },
                        "banqup": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "string"
                              },
                              "ingevuld": {
                                "type": "boolean"
                              },
                              "uitEnv": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "waarde",
                              "ingevuld",
                              "uitEnv"
                            ]
                          }
                        }
                      },
                      "required": [
                        "http",
                        "billit",
                        "storecove",
                        "banqup"
                      ]
                    },
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "boolean"
                        },
                        "billit": {
                          "type": "boolean"
                        },
                        "http": {
                          "type": "boolean"
                        },
                        "billitSandbox": {
                          "type": "boolean"
                        },
                        "storecove": {
                          "type": "boolean"
                        },
                        "banqup": {
                          "type": "boolean"
                        },
                        "banqupSandbox": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "email",
                        "billit",
                        "http",
                        "billitSandbox",
                        "storecove",
                        "banqup",
                        "banqupSandbox"
                      ]
                    }
                  },
                  "required": [
                    "diensten",
                    "kanalen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/{id}": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturenId",
        "description": "**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factuur": {
                      "$ref": "#/components/schemas/FactuurRij"
                    }
                  },
                  "required": [
                    "factuur"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Factuur niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Factuur niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/{id}/bestand": {
      "get": {
        "tags": [
          "facturen"
        ],
        "operationId": "getBeheerFacturenIdBestand",
        "summary": "?soort=ubl (XML, Peppol BIS 3) of html: { naam, type, inhoud }",
        "description": "?soort=ubl (XML, Peppol BIS 3) of html: { naam, type, inhoud }.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "soort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "naam": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "inhoud": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "naam",
                    "type",
                    "inhoud"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Factuur niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Factuur niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/facturen/{id}/versturen": {
      "post": {
        "tags": [
          "facturen"
        ],
        "operationId": "postBeheerFacturenIdVersturen",
        "summary": "{ via?: 'email'|'billit'|'storecove'|'banqup'|'http'|'download', aan?: e-mailadres } — leeg = de standaard …",
        "description": "{ via?: 'email'|'billit'|'storecove'|'banqup'|'http'|'download', aan?: e-mailadres } — leeg = de standaard verzendwijze.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factuur": {
                      "$ref": "#/components/schemas/FactuurRij"
                    }
                  },
                  "required": [
                    "factuur"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/gastprofiel": {
      "get": {
        "tags": [
          "gastprofiel"
        ],
        "operationId": "getBeheerGastprofiel",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie115": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie115",
                    "aan",
                    "klantenkaart"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "gastprofiel"
        ],
        "operationId": "postBeheerGastprofiel",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie115": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie115",
                    "aan",
                    "klantenkaart"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/geldsysteem": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getBeheerGeldsysteem",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "merk": {
                      "type": "string"
                    },
                    "verplicht": {
                      "type": "boolean"
                    },
                    "gegevens": {
                      "type": "object",
                      "additionalProperties": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          }
                        ]
                      }
                    },
                    "laatsteFout": {
                      "type": "string",
                      "nullable": true
                    },
                    "inEnv": {
                      "type": "boolean"
                    },
                    "envVelden": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "merken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "cashdro",
                              "cashmatic",
                              "cashlogy",
                              "cashkeeper",
                              "glory",
                              "extern",
                              "proef"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "velden": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/PakketVeld"
                            }
                          },
                          "functies": {
                            "$ref": "#/components/schemas/GeldFuncties"
                          }
                        },
                        "required": [
                          "code",
                          "naam",
                          "velden",
                          "functies"
                        ]
                      }
                    },
                    "catalogus": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GeldSysteemInfo"
                      }
                    }
                  },
                  "required": [
                    "merk",
                    "verplicht",
                    "gegevens",
                    "laatsteFout",
                    "inEnv",
                    "envVelden",
                    "merken",
                    "catalogus"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postBeheerGeldsysteem",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "merk": {},
                  "velden": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "verplicht": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "merk": {
                      "type": "string"
                    },
                    "verplicht": {
                      "type": "boolean"
                    },
                    "gegevens": {
                      "type": "object",
                      "additionalProperties": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "boolean"
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "merk",
                    "verplicht",
                    "gegevens"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/geldsysteem/test": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postBeheerGeldsysteemTest",
        "summary": "Verbinding met de automaat testen",
        "description": "Verbinding met de automaat testen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "melding": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "melding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/gks-plicht": {
      "post": {
        "tags": [
          "Zaak"
        ],
        "operationId": "postBeheerGksPlicht",
        "summary": "België (migratie 135): is de zaak GKS-plichtig?",
        "description": "België (migratie 135): is de zaak GKS-plichtig? Ja = afrekenen alleen met een werkende zwarte doos (GKS 2.0).\nNee = zonder zwarte doos, alleen met de verklaring van de beheerder (verklaring: true); elk jaar opnieuw\nte bevestigen (dezelfde vraag nog eens). De keuze komt in het logboek.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plichtig": {},
                  "verklaring": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gksMaaltijdOmzet": {
                      "type": "number",
                      "description": "Alleen in Instellingen → Zaak (België): maaltijden ter plaatse (btw 12%) in de laatste 12 maanden, excl. btw, in centen."
                    },
                    "vestigingsnummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "juridischeNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "btwNummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "gksPlichtig": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "België (migratie 135): GKS-plichtig? null = nog niet gekozen (dan kan de zaak niet afrekenen), true = alleen\r\nafrekenen met een werkende zwarte doos (GKS 2.0), false = niet GKS-plichtig (verklaring van de beheerder)."
                    },
                    "gksVerklaringOp": {
                      "type": "string",
                      "nullable": true,
                      "description": "Wanneer de keuze (bij \"nee\": de verklaring) is gedaan (ISO); elk jaar opnieuw te bevestigen."
                    },
                    "fiscaalDemo": {
                      "type": "boolean",
                      "description": "Demo- of testzaak: de nagebootste zwarte doos (FISCAL_MODE=mock) mag. Nooit bij een echte zaak."
                    },
                    "adres": {
                      "type": "string",
                      "nullable": true
                    },
                    "postcode": {
                      "type": "string",
                      "nullable": true
                    },
                    "plaats": {
                      "type": "string",
                      "nullable": true
                    },
                    "telefoon": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "nullable": true,
                      "description": "E-mailadres van de zaak (niet op de bon; o.a. voor het beheerportaal van Pin Voordeel)."
                    },
                    "gksProductienummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "bonVoettekst": {
                      "type": "string",
                      "nullable": true,
                      "description": "Tekst onderaan de kassabon (meerdere regels mogen).\r\nnull/undefined = STANDAARD_BONVOETTEKST, '' = geen tekst."
                    },
                    "bonTaal": {
                      "type": "string",
                      "nullable": true,
                      "description": "Taal van de vaste teksten op de kassabon (migratie 052; alleen Latijns schrift,\r\nzie packages/printing/src/bontaal.ts). null/undefined = Nederlands.\r\nLos van de taal van de schermen."
                    },
                    "contantAfronden": {
                      "type": "boolean",
                      "description": "Contante betalingen afronden op 5 cent (standaard uit)."
                    },
                    "fooi": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/FooiInstelling"
                        }
                      ],
                      "description": "Fooiknoppen bij afrekenen (ontbreekt = STANDAARD_FOOI)."
                    },
                    "klokken": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aan",
                        "verplicht"
                      ],
                      "description": "In- en uitklokken van personeel (ontbreekt = 'uit')."
                    },
                    "allergenen": {
                      "type": "boolean",
                      "description": "Allergenen per product tonen en invullen (standaard uit)."
                    },
                    "happyhour": {
                      "type": "boolean",
                      "description": "Happy hour gebruiken (standaard uit)."
                    },
                    "menus": {
                      "type": "boolean",
                      "description": "Menu's gebruiken (standaard uit)."
                    },
                    "dagdelen": {
                      "type": "boolean",
                      "description": "Assortiment per dagdeel en seizoen (migratie 084, standaard uit)."
                    },
                    "leverwijze": {
                      "type": "boolean",
                      "description": "Assortiment en prijzen per leverwijze: ter plaatse, afhalen, bezorgen (migratie 084, standaard uit)."
                    },
                    "cadeaubonBetalen": {
                      "type": "boolean",
                      "description": "\"Cadeaubon\" als betaalwijze bij afrekenen (ontbreekt = aan, zoals altijd)."
                    },
                    "cadeaubonSaldo": {
                      "type": "boolean",
                      "description": "Cadeaubonnen verkopen met code en saldo (standaard uit)."
                    },
                    "voorraad": {
                      "type": "boolean",
                      "description": "Voorraad bijhouden (per product of via ingrediënten; standaard uit)."
                    },
                    "thema": {
                      "type": "string",
                      "enum": [
                        "donker",
                        "licht"
                      ],
                      "description": "Thema van de schermen (ontbreekt = donker, zoals altijd)."
                    },
                    "afrekenknop": {
                      "type": "string",
                      "enum": [
                        "groot",
                        "klein"
                      ],
                      "description": "Knop \"Afrekenen\" op het bestelscherm: groot onder de bestelde producten of klein onderin (migratie 054; ontbreekt = groot)."
                    },
                    "bonMailen": {
                      "type": "boolean",
                      "description": "Bon per e-mail bij afrekenen (standaard uit)."
                    },
                    "keukenGeluid": {
                      "type": "boolean",
                      "description": "Piep op de kassa van de bediening als het keukenscherm iets klaar meldt (standaard uit)."
                    },
                    "zRapportMail": {
                      "type": "string",
                      "description": "E-mail van de beheerder: Z-rapport na dag afsluiten automatisch mailen (leeg = niet mailen)."
                    },
                    "fooiVerdelen": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "eigen",
                        "uren",
                        "gelijk"
                      ],
                      "description": "Fooi per medewerker op X/Z/periode-rapport (ontbreekt = uit)."
                    },
                    "klantenkaart": {
                      "type": "boolean",
                      "description": "Klantenkaart / spaarpunten (migratie 038; standaard uit)."
                    },
                    "gastprofiel": {
                      "type": "boolean",
                      "description": "Gastprofiel (migratie 115; standaard uit, alleen met de klantenkaart): VIP, dieetwensen en voorkeuren van de klant."
                    },
                    "spaarPuntenPerEuro": {
                      "type": "number",
                      "description": "punten per besteedde euro (0 = alleen stempelkaarten)"
                    },
                    "spaarPuntenNodig": {
                      "type": "number",
                      "description": "zoveel punten = één beloning"
                    },
                    "spaarBeloning": {
                      "type": "number",
                      "description": "beloning in centen korting"
                    },
                    "marketingSms": {
                      "type": "boolean",
                      "description": "Sms-marketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met CM_TOKEN)."
                    },
                    "marketingEmail": {
                      "type": "boolean",
                      "description": "E-mailmarketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met SMTP_HOST)."
                    },
                    "adresZoeken": {
                      "type": "boolean",
                      "description": "Snel adres invoeren met postcode en huisnummer, Nederland (migratie 057; standaard uit)."
                    },
                    "importeren": {
                      "type": "boolean",
                      "description": "Importeren uit een andere kassa: producten en klanten uit CSV/Excel (migratie 058; standaard uit)."
                    },
                    "exact": {
                      "type": "boolean",
                      "description": "Koppeling met Exact Online: dagomzet boeken (migratie 059; standaard uit)."
                    },
                    "exactIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: staat de Exact-app in .env (EXACT_CLIENT_ID en EXACT_CLIENT_SECRET)?"
                    },
                    "boekhoudpakket": {
                      "type": "string",
                      "enum": [
                        "",
                        "acumulus",
                        "afas",
                        "businesscentral",
                        "horus",
                        "moneybird",
                        "odoo",
                        "quickbooks",
                        "sapb1",
                        "silvasoft",
                        "snelstart",
                        "twinfield",
                        "xero",
                        "yuki",
                        "zoho"
                      ],
                      "description": "Koppeling met een ander boekhoudpakket: dagomzet zelf boeken in het gekozen pakket ('' = uit; migraties 062/063; standaard uit). Zie boekhoudcatalogus.ts."
                    },
                    "boekhoudpakketInEnv": {
                      "type": "boolean",
                      "description": "Alleen-lezen: ligt het pakket vast in .env (BOEKHOUDPAKKET)? Dan geen keuze bij Instellingen → Boekhouding."
                    },
                    "boekhoudpakketten": {
                      "type": "object",
                      "properties": {
                        "acumulus": {
                          "type": "boolean"
                        },
                        "afas": {
                          "type": "boolean"
                        },
                        "businesscentral": {
                          "type": "boolean"
                        },
                        "horus": {
                          "type": "boolean"
                        },
                        "moneybird": {
                          "type": "boolean"
                        },
                        "odoo": {
                          "type": "boolean"
                        },
                        "quickbooks": {
                          "type": "boolean"
                        },
                        "sapb1": {
                          "type": "boolean"
                        },
                        "silvasoft": {
                          "type": "boolean"
                        },
                        "snelstart": {
                          "type": "boolean"
                        },
                        "twinfield": {
                          "type": "boolean"
                        },
                        "xero": {
                          "type": "boolean"
                        },
                        "yuki": {
                          "type": "boolean"
                        },
                        "zoho": {
                          "type": "boolean"
                        }
                      },
                      "description": "Alleen-lezen: welke koppelingen kunnen verbinden (pakketten met inloggen alleen met hun app, in .env of bij Instellingen → Boekhouding)."
                    },
                    "reserveringen": {
                      "type": "boolean",
                      "description": "Reserveringen (migratie 039; standaard uit)."
                    },
                    "reserveringVooraf": {
                      "type": "number",
                      "description": "zoveel minuten vóór de tijd staat de tafel als gereserveerd op de plattegrond"
                    },
                    "reserveringDuurMin": {
                      "type": "number",
                      "description": "standaard duur van een reservering in minuten"
                    },
                    "wachtlijst": {
                      "type": "boolean",
                      "description": "Wachtlijst voor walk-ins (migratie 051; standaard uit)."
                    },
                    "wachtlijstSmsTekst": {
                      "type": "string",
                      "description": "tekst van de sms \"uw tafel is klaar\" ({naam}, {zaak}, {personen}); leeg = standaardtekst"
                    },
                    "smsIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: is sms ingesteld in .env (CM_TOKEN, CM.com)?"
                    },
                    "updatemelding": {
                      "type": "boolean",
                      "description": "Updatemelding in de kassa (migratie 040; standaard uit)."
                    },
                    "snelleVerkoop": {
                      "type": "boolean",
                      "description": "Knop \"Snelle verkoop\" (balie, zonder tafel) op het tafelscherm (migratie 041; ontbreekt = aan)."
                    },
                    "afhalen": {
                      "type": "boolean",
                      "description": "Knop \"Afhalen\" op het tafelscherm (migratie 041; ontbreekt = aan)."
                    },
                    "bezorgen": {
                      "type": "boolean",
                      "description": "Bezorgen en tijdvakken in de kassa (migratie 060): knop \"Bezorgen\" op het tafelscherm (ontbreekt = uit)."
                    },
                    "bezorgZones": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BezorgZone"
                      },
                      "description": "Bezorggebieden, de eerste die past geldt; leeg = overal, zonder kosten of minimum. Bedragen in centen."
                    },
                    "bezorgTijdMin": {
                      "type": "number",
                      "description": "Minuten tot bezorgd / klaar voor afhalen als het zo snel mogelijk moet."
                    },
                    "afhaalTijdMin": {
                      "type": "number"
                    },
                    "tijdvakMin": {
                      "type": "number",
                      "description": "Lengte van een tijdvak (minuten) en het maximum aantal bestellingen erin (afhalen + bezorgen; 0 = geen maximum)."
                    },
                    "perTijdvak": {
                      "type": "number"
                    },
                    "webshopVolgt": {
                      "type": "boolean",
                      "description": "Kassa en webshop gelijk (migratie 061; alles standaard uit = zoals voorheen).\r\nwebshopVolgt: de webshop gebruikt de bezorggebieden, tijden, het tijdvak, het\r\nmaximum, de openingstijden en gesloten dagen van de kassa en telt de\r\nbestellingen van de kassa mee (de kassa is leidend)."
                    },
                    "openTijden": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OpenTijden"
                        }
                      ],
                      "nullable": true,
                      "description": "Eigen openingstijden voor afhalen en bezorgen (1 = maandag ... 7 = zondag); null = zoals voorheen."
                    },
                    "geslotenDagen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Gesloten datums (JJJJ-MM-DD) voor afhalen en bezorgen."
                    },
                    "vooruitDagen": {
                      "type": "number",
                      "description": "Zoveel dagen vooruit een tijd kiezen (0 = alleen vandaag)."
                    },
                    "drukteMin": {
                      "type": "number",
                      "description": "Druk: zoveel minuten extra bij \"zo snel mogelijk\" (kassa en webshop)."
                    },
                    "bezorgBerichten": {
                      "type": "boolean",
                      "description": "De klant een sms/e-mail sturen bij aannemen, klaar en onderweg."
                    },
                    "webshopPauze": {
                      "type": "boolean",
                      "description": "Webshop vanuit de kassa even dicht (pauze), met een tekst voor de gast."
                    },
                    "webshopPauzeTekst": {
                      "type": "string",
                      "nullable": true
                    },
                    "reserverenOnline": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ReserverenOnline"
                        }
                      ],
                      "nullable": true,
                      "description": "Online reserveren in de webshop met de regels van de kassa; null = die van de webshop zelf."
                    },
                    "cadeaubonOnline": {
                      "type": "boolean",
                      "description": "Cadeaubonnen verkopen in de webshop (online betaald)."
                    },
                    "kortingscodes": {
                      "type": "boolean",
                      "description": "Kortingscodes aan de kassa en in de webshop."
                    },
                    "mailIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: is er een mailserver ingesteld in .env (SMTP_HOST)?"
                    },
                    "favorieten": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "auto",
                        "zelf"
                      ],
                      "description": "Favorieten/snelknoppen op het bestelscherm (ontbreekt = uit)."
                    },
                    "tafelStilMinuten": {
                      "type": "number",
                      "description": "Tafeltijd: oranje rand na zoveel minuten zonder bestelling (0 = uit; ontbreekt = 20)."
                    },
                    "ayce": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AyceInstelling"
                        }
                      ],
                      "description": "All-you-can-eat (migratie 042; ontbreekt = uit)."
                    },
                    "klantscherm": {
                      "type": "boolean",
                      "description": "Klantscherm: scherm naar de klant toe met bestelling en bedrag (migratie 044; ontbreekt = uit)."
                    },
                    "klantschermWelkom": {
                      "type": "string",
                      "nullable": true,
                      "description": "Welkomsttekst op het klantscherm als er niemand afrekent (leeg = \"Welkom\")."
                    },
                    "productfotoKnoppen": {
                      "type": "boolean",
                      "description": "Productfoto op de productknoppen van het bestelscherm (migratie 045; ontbreekt = uit)."
                    },
                    "productfotoKlantscherm": {
                      "type": "boolean",
                      "description": "Productfoto bij de regels op het klantscherm (migratie 045; ontbreekt = uit)."
                    },
                    "weegschaal": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WeegschaalInstelling"
                        }
                      ],
                      "description": "Weegschaal (migratie 047; ontbreekt of aan = false = uit): producten met een prijs per\r\nkilo, wegen op een Aclas OS6X en etiketten van een Aclas TS6X scannen."
                    },
                    "leeftijdscheck": {
                      "type": "boolean",
                      "description": "Leeftijdscheck alcohol (migratie 072; ontbreekt = uit): 18+ in de webshop en op werkbon/bezorgbon."
                    },
                    "wegwerp": {
                      "type": "boolean",
                      "description": "Wegwerptoeslag per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "statiegeld": {
                      "type": "boolean",
                      "description": "Statiegeld per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "contantLimiet": {
                      "type": "boolean",
                      "description": "Waarschuwing bij contant € 3.000 of meer voor goederen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "facturen": {
                      "type": "boolean",
                      "description": "Facturen (UBL/Peppol) voor zakelijke klanten (migratie 072; ontbreekt = uit)."
                    },
                    "haccp": {
                      "type": "boolean",
                      "description": "Digitale HACCP-registratie: temperaturen en schoonmaak (migratie 073; ontbreekt = uit)."
                    },
                    "tap": {
                      "type": "boolean",
                      "description": "Tapsysteem / flowmeters (migratie 076): taps op de bon"
                    },
                    "resplatform": {
                      "type": "boolean",
                      "description": "Reserveringsplatforms (migratie 078): TheFork, Formitable, Zenchef, Resengo, OpenTable"
                    },
                    "bi": {
                      "type": "boolean",
                      "description": "BI en data-export (migratie 079): Power BI, Looker Studio, Excel, datawarehouse"
                    },
                    "biKeten": {
                      "type": "boolean",
                      "description": "BI voor ketens: het klantportaal mag de gegevens ophalen (migratie 080)"
                    },
                    "spaarpartner": {
                      "type": "boolean",
                      "description": "Spaarprogramma van een ander platform: Piggy of Joyn (migratie 081)"
                    },
                    "reviews": {
                      "type": "boolean",
                      "description": "Reviews vragen na het bezoek: Google en/of Trustpilot (migratie 081)"
                    },
                    "reviewbeheer": {
                      "type": "boolean",
                      "description": "Reviewbeheer: Google en Trustpilot in de kassa lezen en beantwoorden (migratie 082)"
                    },
                    "opRekening": {
                      "type": "boolean",
                      "description": "Betalen op rekening voor zakelijke klanten, met een factuur (migratie 085; alleen met facturen aan)"
                    },
                    "opRekeningWebshop": {
                      "type": "boolean",
                      "description": "Op rekening ook in de webshop: zakelijke klanten bestellen online met een eigen klantcode (migratie 108)"
                    },
                    "ayceWebshop": {
                      "type": "boolean",
                      "description": "All-you-can-eat ook bij bestellen aan tafel via de QR-code van de webshop (migratie 108)"
                    },
                    "wachtlijstOnline": {
                      "type": "boolean",
                      "description": "Gasten zetten zichzelf op de wachtlijst via de webshop (migratie 108; alleen met de wachtlijst aan)"
                    },
                    "teLaat": {
                      "type": "boolean",
                      "description": "Melding bij te lange doorlooptijd van afhalen en bezorgen (migratie 088; ontbreekt = uit)"
                    },
                    "mailingKoppeling": {
                      "type": "boolean",
                      "description": "Koppeling met Mailchimp of Klaviyo met een gekozen lijst (migratie 089): toestemming voor e-mail vragen"
                    },
                    "webshopPush": {
                      "type": "boolean",
                      "description": "Pushberichten met aanbiedingen in de webshop: een actie kan als pushbericht (migratie 095; tabblad Marketing)"
                    },
                    "muziek": {
                      "type": "boolean",
                      "description": "Muziek bedienen vanaf de kassa: knop Muziek in de bovenbalk (migratie 091; ontbreekt = uit)"
                    },
                    "camera": {
                      "type": "boolean",
                      "description": "Camerabeelden in de kassa: knop Camera's (migratie 092; ontbreekt = uit; bekijken met het recht camera_bekijken)"
                    },
                    "tablet": {
                      "type": "boolean",
                      "description": "Tablets als tweede scherm: muziek en camera's met één knop naar een gekoppelde tablet (migratie 094; ontbreekt = uit)"
                    },
                    "oproep": {
                      "type": "boolean",
                      "description": "Oproepscherm \"wordt bereid / klaar\" voor afhalers (migratie 096): knop Oproepen in de kassa, ophaalnummer op de kassabon."
                    },
                    "bezorgers": {
                      "type": "boolean",
                      "description": "Eigen bezorgers (migratie 097): knop Ritten (rit maken, bezorgerspagina op het portaal, kasafdracht, track & trace)."
                    },
                    "ritplanning": {
                      "type": "boolean",
                      "description": "Ritplanning (migratie 098; alleen met eigen bezorgers): ritten voorstellen per gebied, met afstand en reistijd."
                    },
                    "bezorgersapp": {
                      "type": "boolean",
                      "description": "Bezorgersapp (migratie 099; alleen met eigen bezorgers): telefoons koppelen, zelf oppakken, live kaart met alle bezorgers."
                    }
                  },
                  "required": [
                    "vestigingsnummer",
                    "juridischeNaam",
                    "id",
                    "naam",
                    "land",
                    "btwNummer",
                    "adres",
                    "postcode",
                    "plaats",
                    "telefoon",
                    "gksProductienummer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Alleen voor een zaak in België.\n- Kies of de zaak GKS-plichtig is: ja of nee.\n- Zonder zwarte doos alleen met de verklaring dat de zaak niet GKS-plichtig is.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen voor een zaak in België."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/groepen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerGroepen",
        "summary": "groepen",
        "description": "groepen\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroepInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/groepen/{id}": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerGroepenId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroepInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Productgroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Productgroep niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/groepen/{id}/verwijderen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerGroepenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Productgroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Productgroep niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze groep heeft nog … product(en). Verwijder of verplaats die eerst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze groep heeft nog … product(en). Verwijder of verplaats die eerst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp": {
      "get": {
        "tags": [
          "haccp"
        ],
        "operationId": "getBeheerHaccp",
        "summary": "Alle meetpunten en taken (ook om in te stellen)",
        "description": "Alle meetpunten en taken (ook om in te stellen).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/overzicht": {
      "get": {
        "tags": [
          "haccp"
        ],
        "operationId": "getBeheerHaccpOverzicht",
        "summary": "?van=JJJJ-MM-DD&tot=JJJJ-MM-DD (hooguit 366 dagen): registraties, afwijkingen, gemiste dagen en CSV",
        "description": "?van=JJJJ-MM-DD&tot=JJJJ-MM-DD (hooguit 366 dagen): registraties, afwijkingen, gemiste dagen en CSV.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "registraties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HaccpRegistratie"
                      }
                    },
                    "afwijkingen": {
                      "type": "number"
                    },
                    "gemist": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "naam": {
                            "type": "string"
                          },
                          "dagen": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "naam",
                          "dagen"
                        ]
                      }
                    },
                    "csv": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "van",
                    "tot",
                    "registraties",
                    "afwijkingen",
                    "gemist",
                    "csv"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een geldige periode.\n- Kies een periode van hooguit een jaar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/punten": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpPunten",
        "summary": "{ naam, soort, minTemp, maxTemp, frequentie }",
        "description": "{ naam, soort, minTemp, maxTemp, frequentie }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/punten/{id}": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpPuntenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/punten/{id}/verwijderen": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpPuntenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Meetpunt niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Meetpunt niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/standaard": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpStandaard",
        "summary": "De standaardlijst toevoegen (koeling, vriezer, warmhouden, kerntemperatuur, ontvangst; schoonmaak en contro…",
        "description": "De standaardlijst toevoegen (koeling, vriezer, warmhouden, kerntemperatuur, ontvangst; schoonmaak en controles).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "toegevoegd": {
                      "type": "object",
                      "properties": {
                        "punten": {
                          "type": "number"
                        },
                        "taken": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "punten",
                        "taken"
                      ]
                    },
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "toegevoegd",
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/taken": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpTaken",
        "summary": "{ naam, ruimte, instructie, frequentie, weekdag }",
        "description": "{ naam, ruimte, instructie, frequentie, weekdag }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/taken/{id}": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpTakenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/haccp/taken/{id}/verwijderen": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postBeheerHaccpTakenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Taak niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Taak niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/happyhours": {
      "get": {
        "tags": [
          "Acties"
        ],
        "operationId": "getBeheerHappyhours",
        "summary": "happy hour",
        "description": "happy hour\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "happyhours": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HappyHour"
                      }
                    }
                  },
                  "required": [
                    "happyhours"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerHappyhours",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HappyHourInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "happyhours": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HappyHour"
                      }
                    }
                  },
                  "required": [
                    "happyhours"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 084).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 084)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/happyhours/{id}": {
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerHappyhoursId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HappyHourInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "happyhours": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HappyHour"
                      }
                    }
                  },
                  "required": [
                    "happyhours"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Happy hour niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Happy hour niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 084).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 084)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/happyhours/{id}/verwijderen": {
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerHappyhoursIdVerwijderen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "happyhours": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HappyHour"
                      }
                    }
                  },
                  "required": [
                    "happyhours"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Happy hour niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Happy hour niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/hotel": {
      "get": {
        "tags": [
          "hotel"
        ],
        "operationId": "getBeheerHotel",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "leverancier": {
                          "type": "string",
                          "enum": [
                            "mews",
                            "apaleo",
                            "cloudbeds",
                            "demo",
                            "amadeus",
                            "bookingexperts",
                            "clock",
                            "eviivo",
                            "guestline",
                            "hotelogix",
                            "infor",
                            "littlehotelier",
                            "opera",
                            "protel",
                            "roomraccoon",
                            "shiji",
                            "stayntouch",
                            "vips",
                            "sirvoy"
                          ],
                          "nullable": true
                        },
                        "omgeving": {
                          "type": "string",
                          "enum": [
                            "test",
                            "productie"
                          ],
                          "description": "test- of echte omgeving (Mews demo, Cloudbeds sandbox ...)"
                        },
                        "serviceId": {
                          "type": "string",
                          "nullable": true,
                          "description": "Mews: service (restaurant/bar) en boekhoudcategorie; apaleo: property-id en subrekening; Cloudbeds: property-id"
                        },
                        "categorieId": {
                          "type": "string",
                          "nullable": true
                        },
                        "propertyId": {
                          "type": "string",
                          "nullable": true
                        },
                        "basisUrl": {
                          "type": "string",
                          "nullable": true,
                          "description": "eigen adres van de API (bv. de OHIP-gateway van OPERA, de server van VIPS of Infor); leeg = het standaardadres"
                        },
                        "btwCodes": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Mews: btw-code per percentage (bv. {\"21\":\"BE-2017-S\",\"12\":\"BE-2017-R2\"}); apaleo: vatType per percentage"
                        },
                        "omschrijving": {
                          "type": "string",
                          "description": "omschrijving op de hotelrekening, {bon} = bonnummer"
                        },
                        "zelfbediening": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Zelfbediening"
                            }
                          ],
                          "description": "de gast zet zelf op zijn kamer: op de kiosk en/of in de webshop (standaard uit), tot dit bedrag per bestelling (centen)"
                        }
                      },
                      "required": [
                        "aan",
                        "leverancier",
                        "omgeving",
                        "serviceId",
                        "categorieId",
                        "propertyId",
                        "basisUrl",
                        "btwCodes",
                        "omschrijving",
                        "zelfbediening"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "ingevuld": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "boolean"
                      }
                    },
                    "webhook": {
                      "type": "boolean",
                      "description": "Sirvoy: is er een webhook-adres gemaakt (de sleutel zelf is alleen bij het maken te zien)"
                    },
                    "migratie134": {
                      "type": "boolean",
                      "description": "migratie 134 gedraaid (nodig voor Sirvoy)"
                    },
                    "portaalWebhook": {
                      "type": "string",
                      "nullable": true,
                      "description": "Sirvoy: webhook-adres via het beheerportaal (zonder ?sleutel=), null = de kassa hangt niet aan het portaal"
                    },
                    "portaalVerbonden": {
                      "type": "boolean"
                    },
                    "catalogus": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HotelCatalogusItem"
                      }
                    },
                    "boekingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {},
                          "leverancier": {},
                          "kamer": {},
                          "gast": {},
                          "bedrag": {},
                          "status": {},
                          "fout": {
                            "type": "object",
                            "nullable": true
                          },
                          "externId": {
                            "type": "object",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          },
                          "regels": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/HotelBoekregel"
                            },
                            "nullable": true
                          },
                          "bon": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "leverancier",
                          "kamer",
                          "gast",
                          "bedrag",
                          "status",
                          "fout",
                          "externId",
                          "op",
                          "regels",
                          "bon"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "instelling",
                    "status",
                    "melding",
                    "ingevuld",
                    "webhook",
                    "migratie134",
                    "portaalWebhook",
                    "portaalVerbonden",
                    "catalogus",
                    "boekingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "hotel"
        ],
        "operationId": "postBeheerHotel",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "leverancier": {
                          "type": "string",
                          "enum": [
                            "mews",
                            "apaleo",
                            "cloudbeds",
                            "demo",
                            "amadeus",
                            "bookingexperts",
                            "clock",
                            "eviivo",
                            "guestline",
                            "hotelogix",
                            "infor",
                            "littlehotelier",
                            "opera",
                            "protel",
                            "roomraccoon",
                            "shiji",
                            "stayntouch",
                            "vips",
                            "sirvoy"
                          ],
                          "nullable": true
                        },
                        "omgeving": {
                          "type": "string",
                          "enum": [
                            "test",
                            "productie"
                          ],
                          "description": "test- of echte omgeving (Mews demo, Cloudbeds sandbox ...)"
                        },
                        "serviceId": {
                          "type": "string",
                          "nullable": true,
                          "description": "Mews: service (restaurant/bar) en boekhoudcategorie; apaleo: property-id en subrekening; Cloudbeds: property-id"
                        },
                        "categorieId": {
                          "type": "string",
                          "nullable": true
                        },
                        "propertyId": {
                          "type": "string",
                          "nullable": true
                        },
                        "basisUrl": {
                          "type": "string",
                          "nullable": true,
                          "description": "eigen adres van de API (bv. de OHIP-gateway van OPERA, de server van VIPS of Infor); leeg = het standaardadres"
                        },
                        "btwCodes": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Mews: btw-code per percentage (bv. {\"21\":\"BE-2017-S\",\"12\":\"BE-2017-R2\"}); apaleo: vatType per percentage"
                        },
                        "omschrijving": {
                          "type": "string",
                          "description": "omschrijving op de hotelrekening, {bon} = bonnummer"
                        },
                        "zelfbediening": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Zelfbediening"
                            }
                          ],
                          "description": "de gast zet zelf op zijn kamer: op de kiosk en/of in de webshop (standaard uit), tot dit bedrag per bestelling (centen)"
                        }
                      },
                      "required": [
                        "aan",
                        "leverancier",
                        "omgeving",
                        "serviceId",
                        "categorieId",
                        "propertyId",
                        "basisUrl",
                        "btwCodes",
                        "omschrijving",
                        "zelfbediening"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "ingevuld": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "boolean"
                      }
                    },
                    "webhook": {
                      "type": "boolean",
                      "description": "Sirvoy: is er een webhook-adres gemaakt (de sleutel zelf is alleen bij het maken te zien)"
                    },
                    "migratie134": {
                      "type": "boolean",
                      "description": "migratie 134 gedraaid (nodig voor Sirvoy)"
                    },
                    "portaalWebhook": {
                      "type": "string",
                      "nullable": true,
                      "description": "Sirvoy: webhook-adres via het beheerportaal (zonder ?sleutel=), null = de kassa hangt niet aan het portaal"
                    },
                    "portaalVerbonden": {
                      "type": "boolean"
                    },
                    "catalogus": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HotelCatalogusItem"
                      }
                    },
                    "boekingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {},
                          "leverancier": {},
                          "kamer": {},
                          "gast": {},
                          "bedrag": {},
                          "status": {},
                          "fout": {
                            "type": "object",
                            "nullable": true
                          },
                          "externId": {
                            "type": "object",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          },
                          "regels": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/HotelBoekregel"
                            },
                            "nullable": true
                          },
                          "bon": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "leverancier",
                          "kamer",
                          "gast",
                          "bedrag",
                          "status",
                          "fout",
                          "externId",
                          "op",
                          "regels",
                          "bon"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "instelling",
                    "status",
                    "melding",
                    "ingevuld",
                    "webhook",
                    "migratie134",
                    "portaalWebhook",
                    "portaalVerbonden",
                    "catalogus",
                    "boekingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/hotel/boekingen/{id}/ingevoerd": {
      "post": {
        "tags": [
          "hotel"
        ],
        "operationId": "postBeheerHotelBoekingenIdIngevoerd",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ingevoerd": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "leverancier": {
                          "type": "string",
                          "enum": [
                            "mews",
                            "apaleo",
                            "cloudbeds",
                            "demo",
                            "amadeus",
                            "bookingexperts",
                            "clock",
                            "eviivo",
                            "guestline",
                            "hotelogix",
                            "infor",
                            "littlehotelier",
                            "opera",
                            "protel",
                            "roomraccoon",
                            "shiji",
                            "stayntouch",
                            "vips",
                            "sirvoy"
                          ],
                          "nullable": true
                        },
                        "omgeving": {
                          "type": "string",
                          "enum": [
                            "test",
                            "productie"
                          ],
                          "description": "test- of echte omgeving (Mews demo, Cloudbeds sandbox ...)"
                        },
                        "serviceId": {
                          "type": "string",
                          "nullable": true,
                          "description": "Mews: service (restaurant/bar) en boekhoudcategorie; apaleo: property-id en subrekening; Cloudbeds: property-id"
                        },
                        "categorieId": {
                          "type": "string",
                          "nullable": true
                        },
                        "propertyId": {
                          "type": "string",
                          "nullable": true
                        },
                        "basisUrl": {
                          "type": "string",
                          "nullable": true,
                          "description": "eigen adres van de API (bv. de OHIP-gateway van OPERA, de server van VIPS of Infor); leeg = het standaardadres"
                        },
                        "btwCodes": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Mews: btw-code per percentage (bv. {\"21\":\"BE-2017-S\",\"12\":\"BE-2017-R2\"}); apaleo: vatType per percentage"
                        },
                        "omschrijving": {
                          "type": "string",
                          "description": "omschrijving op de hotelrekening, {bon} = bonnummer"
                        },
                        "zelfbediening": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/Zelfbediening"
                            }
                          ],
                          "description": "de gast zet zelf op zijn kamer: op de kiosk en/of in de webshop (standaard uit), tot dit bedrag per bestelling (centen)"
                        }
                      },
                      "required": [
                        "aan",
                        "leverancier",
                        "omgeving",
                        "serviceId",
                        "categorieId",
                        "propertyId",
                        "basisUrl",
                        "btwCodes",
                        "omschrijving",
                        "zelfbediening"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "ingevuld": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "boolean"
                      }
                    },
                    "webhook": {
                      "type": "boolean",
                      "description": "Sirvoy: is er een webhook-adres gemaakt (de sleutel zelf is alleen bij het maken te zien)"
                    },
                    "migratie134": {
                      "type": "boolean",
                      "description": "migratie 134 gedraaid (nodig voor Sirvoy)"
                    },
                    "portaalWebhook": {
                      "type": "string",
                      "nullable": true,
                      "description": "Sirvoy: webhook-adres via het beheerportaal (zonder ?sleutel=), null = de kassa hangt niet aan het portaal"
                    },
                    "portaalVerbonden": {
                      "type": "boolean"
                    },
                    "catalogus": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HotelCatalogusItem"
                      }
                    },
                    "boekingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {},
                          "leverancier": {},
                          "kamer": {},
                          "gast": {},
                          "bedrag": {},
                          "status": {},
                          "fout": {
                            "type": "object",
                            "nullable": true
                          },
                          "externId": {
                            "type": "object",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          },
                          "regels": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/HotelBoekregel"
                            },
                            "nullable": true
                          },
                          "bon": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "leverancier",
                          "kamer",
                          "gast",
                          "bedrag",
                          "status",
                          "fout",
                          "externId",
                          "op",
                          "regels",
                          "bon"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "instelling",
                    "status",
                    "melding",
                    "ingevuld",
                    "webhook",
                    "migratie134",
                    "portaalWebhook",
                    "portaalVerbonden",
                    "catalogus",
                    "boekingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/hotel/boekingen/{id}/opnieuw": {
      "post": {
        "tags": [
          "hotel"
        ],
        "operationId": "postBeheerHotelBoekingenIdOpnieuw",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "externId": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "externId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/hotel/test": {
      "post": {
        "tags": [
          "hotel"
        ],
        "operationId": "postBeheerHotelTest",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "melding": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "melding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/hotel/webhook": {
      "post": {
        "tags": [
          "hotel"
        ],
        "operationId": "postBeheerHotelWebhook",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "sleutel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/importeren": {
      "post": {
        "tags": [
          "Importeren"
        ],
        "operationId": "postBeheerImporteren",
        "summary": "Importeren",
        "description": "Importeren. Producten: groepen die nog niet bestaan worden gemaakt; btw op\npercentage (of hoog/laag), anders btwStandaard. Klanten: punten erbij als\ncorrectie \"Geïmporteerd\"; toestemming voor sms/e-mail gaat NIET mee (AVG).\nbestaand: 'overslaan' (standaard) of 'bijwerken' (zelfde code/naam of telefoon/e-mail).\n\n**Toegang:** Controleert daarnaast: `producten_beheren` (Producten, groepen en keuzeopties beheren), `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {},
                  "bestand": {
                    "$ref": "#/components/schemas/Bestand"
                  },
                  "koppeling": {},
                  "btwStandaard": {},
                  "bestaand": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Uitkomst"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies producten of klanten.\n- Kies welke kolom de naam is.\n- Kies welke kolom de prijs is.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies producten of klanten."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Zet eerst de klantenkaart aan (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Zet eerst de klantenkaart aan (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/importeren/voorbeeld": {
      "post": {
        "tags": [
          "Importeren"
        ],
        "operationId": "postBeheerImporterenVoorbeeld",
        "summary": "Voorbeeld: kolomnamen, welke kolom bij welk veld hoort (herkend op naam), de eerste 10 regels zoals ze geïm…",
        "description": "Voorbeeld: kolomnamen, welke kolom bij welk veld hoort (herkend op naam),\nde eerste 10 regels zoals ze geïmporteerd worden en het aantal regels.\n\n**Toegang:** Controleert daarnaast: `producten_beheren` (Producten, groepen en keuzeopties beheren), `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {},
                  "bestand": {
                    "$ref": "#/components/schemas/Bestand"
                  },
                  "koppeling": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kop": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "koppeling": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number",
                        "nullable": true
                      }
                    },
                    "velden": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Regel"
                      }
                    }
                  },
                  "required": [
                    "kop",
                    "koppeling",
                    "velden",
                    "aantal",
                    "regels"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies producten of klanten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies producten of klanten."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ingredienten": {
      "post": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "postBeheerIngredienten",
        "summary": "Ingrediënt toevoegen of wijzigen (naam, eenheid, meldniveau, actief)",
        "description": "Ingrediënt toevoegen of wijzigen (naam, eenheid, meldniveau, actief).\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {},
                  "eenheid": {},
                  "minimum": {},
                  "actief": {},
                  "aanvullenTot": {},
                  "leverancier": {},
                  "leverancierId": {},
                  "bestelcode": {},
                  "bestelEan": {},
                  "bestelPer": {},
                  "bestelEenheid": {},
                  "inkoopprijs": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingredienten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "eenheid": {
                            "type": "string"
                          },
                          "voorraad": {
                            "type": "number"
                          },
                          "minimum": {
                            "type": "number",
                            "nullable": true
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "gebruikt": {
                            "type": "number"
                          },
                          "aanvullenTot": {
                            "type": "number",
                            "nullable": true
                          },
                          "leverancier": {
                            "type": "string",
                            "nullable": true
                          },
                          "leverancierId": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelcode": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelEan": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelPer": {
                            "type": "number"
                          },
                          "bestelEenheid": {
                            "type": "string",
                            "nullable": true
                          },
                          "inkoopprijs": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "eenheid",
                          "voorraad",
                          "minimum",
                          "actief",
                          "gebruikt",
                          "aanvullenTot",
                          "leverancier",
                          "leverancierId",
                          "bestelcode",
                          "bestelEan",
                          "bestelPer",
                          "bestelEenheid",
                          "inkoopprijs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ingredienten"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Geef het ingrediënt een naam.\n- Ongeldig meldniveau.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef het ingrediënt een naam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Ingrediënt niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ingrediënt niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Er is al een ingrediënt \"…\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ingredienten/{id}": {
      "post": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "postBeheerIngredientenId",
        "summary": "Ingrediënt toevoegen of wijzigen (naam, eenheid, meldniveau, actief)",
        "description": "Ingrediënt toevoegen of wijzigen (naam, eenheid, meldniveau, actief).\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {},
                  "eenheid": {},
                  "minimum": {},
                  "actief": {},
                  "aanvullenTot": {},
                  "leverancier": {},
                  "leverancierId": {},
                  "bestelcode": {},
                  "bestelEan": {},
                  "bestelPer": {},
                  "bestelEenheid": {},
                  "inkoopprijs": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingredienten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "eenheid": {
                            "type": "string"
                          },
                          "voorraad": {
                            "type": "number"
                          },
                          "minimum": {
                            "type": "number",
                            "nullable": true
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "gebruikt": {
                            "type": "number"
                          },
                          "aanvullenTot": {
                            "type": "number",
                            "nullable": true
                          },
                          "leverancier": {
                            "type": "string",
                            "nullable": true
                          },
                          "leverancierId": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelcode": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelEan": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelPer": {
                            "type": "number"
                          },
                          "bestelEenheid": {
                            "type": "string",
                            "nullable": true
                          },
                          "inkoopprijs": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "eenheid",
                          "voorraad",
                          "minimum",
                          "actief",
                          "gebruikt",
                          "aanvullenTot",
                          "leverancier",
                          "leverancierId",
                          "bestelcode",
                          "bestelEan",
                          "bestelPer",
                          "bestelEenheid",
                          "inkoopprijs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "ingredienten"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Geef het ingrediënt een naam.\n- Ongeldig meldniveau.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef het ingrediënt een naam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Ingrediënt niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ingrediënt niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Er is al een ingrediënt \"…\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop": {
      "get": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "getBeheerInkoop",
        "summary": "Instelling, leveranciers en de lijst met bekende leveranciers voor het land van de zaak",
        "description": "Instelling, leveranciers en de lijst met bekende leveranciers voor het land van de zaak.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "instelling": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "voorraad": {
                          "type": "boolean"
                        },
                        "gln": {
                          "type": "string",
                          "nullable": true
                        },
                        "mail": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan",
                        "voorraad",
                        "gln",
                        "mail"
                      ]
                    },
                    "leveranciers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uitEnv": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "email",
                                "id",
                                "naam",
                                "opmerking",
                                "actief",
                                "bestand",
                                "catalogus",
                                "klantnummer",
                                "wijze",
                                "emailKopie",
                                "bijlage",
                                "csvScheiding",
                                "csvKop",
                                "csvKolommen",
                                "eancomVersie",
                                "koppelingUrl",
                                "koppelingVan",
                                "koppelingNaar",
                                "koppelingDomein",
                                "koppelingSleutel",
                                "koppelingGebruiker",
                                "koppelingWachtwoord",
                                "koppelingHeaders",
                                "uploadProtocol",
                                "uploadHost",
                                "uploadPoort",
                                "uploadMap",
                                "uploadGebruiker",
                                "uploadWachtwoord",
                                "uploadSleutel",
                                "uploadSleutelWachtwoord",
                                "uploadVingerafdruk",
                                "envCode",
                                "koppelingAangevraagd",
                                "aanvraagAan",
                                "gln",
                                "besteldagen",
                                "besteltijd",
                                "levertijdDagen",
                                "minimumBedrag",
                                "automatisch",
                                "laatsteAuto"
                              ]
                            }
                          },
                          "envCode": {
                            "type": "string",
                            "nullable": true
                          },
                          "envVoorvoegsel": {
                            "type": "string",
                            "nullable": true
                          },
                          "uploadPubliekeSleutel": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "uitEnv",
                          "envCode",
                          "envVoorvoegsel",
                          "uploadPubliekeSleutel"
                        ]
                      }
                    },
                    "catalogus": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CatalogusLeverancier"
                      }
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "platform",
                              "overig",
                              "groothandel",
                              "foodservice",
                              "dranken",
                              "brouwer",
                              "vers",
                              "nonfood"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "naam"
                        ]
                      }
                    },
                    "bestanden": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "naam"
                        ]
                      }
                    },
                    "wijzen": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "webhook",
                          "email",
                          "bestand",
                          "cxml",
                          "upload",
                          "printen"
                        ]
                      }
                    },
                    "protocollen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "sftp",
                              "ftps",
                              "ftps-impliciet",
                              "ftp"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "poort": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "naam",
                          "poort"
                        ]
                      }
                    },
                    "aanvraagSoorten": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "ubl",
                          "cxml",
                          "edi",
                          "api"
                        ]
                      }
                    }
                  },
                  "required": [
                    "instelling",
                    "leveranciers",
                    "catalogus",
                    "groepen",
                    "bestanden",
                    "wijzen",
                    "protocollen",
                    "aanvraagSoorten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/automatisch": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopAutomatisch",
        "summary": "Nu kijken of er automatisch besteld moet worden (anders gebeurt dat elke 5 minuten vanzelf)",
        "description": "Nu kijken of er automatisch besteld moet worden (anders gebeurt dat elke 5 minuten vanzelf).\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resultaat": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "leverancier": {
                            "type": "string"
                          },
                          "nummer": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string"
                          },
                          "fout": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "leverancier",
                          "status"
                        ]
                      }
                    }
                  },
                  "required": [
                    "resultaat"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/instelling": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopInstelling",
        "summary": "Bestellen bij leveranciers aan/uit en het eigen GLN",
        "description": "Bestellen bij leveranciers aan/uit en het eigen GLN.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {},
                  "gln": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "instelling": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "voorraad": {
                          "type": "boolean"
                        },
                        "gln": {
                          "type": "string",
                          "nullable": true
                        },
                        "mail": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan",
                        "voorraad",
                        "gln",
                        "mail"
                      ]
                    }
                  },
                  "required": [
                    "instelling"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Een GLN heeft 13 cijfers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Een GLN heeft 13 cijfers."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Zet eerst Voorraad bijhouden aan (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Zet eerst Voorraad bijhouden aan (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/leveranciers": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopLeveranciers",
        "summary": "leveranciers",
        "description": "leveranciers\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leverancier": {
                      "type": "object",
                      "properties": {
                        "uitEnv": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "email",
                              "id",
                              "naam",
                              "opmerking",
                              "actief",
                              "bestand",
                              "catalogus",
                              "klantnummer",
                              "wijze",
                              "emailKopie",
                              "bijlage",
                              "csvScheiding",
                              "csvKop",
                              "csvKolommen",
                              "eancomVersie",
                              "koppelingUrl",
                              "koppelingVan",
                              "koppelingNaar",
                              "koppelingDomein",
                              "koppelingSleutel",
                              "koppelingGebruiker",
                              "koppelingWachtwoord",
                              "koppelingHeaders",
                              "uploadProtocol",
                              "uploadHost",
                              "uploadPoort",
                              "uploadMap",
                              "uploadGebruiker",
                              "uploadWachtwoord",
                              "uploadSleutel",
                              "uploadSleutelWachtwoord",
                              "uploadVingerafdruk",
                              "envCode",
                              "koppelingAangevraagd",
                              "aanvraagAan",
                              "gln",
                              "besteldagen",
                              "besteltijd",
                              "levertijdDagen",
                              "minimumBedrag",
                              "automatisch",
                              "laatsteAuto"
                            ]
                          }
                        },
                        "envCode": {
                          "type": "string",
                          "nullable": true
                        },
                        "envVoorvoegsel": {
                          "type": "string",
                          "nullable": true
                        },
                        "uploadPubliekeSleutel": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "uitEnv",
                        "envCode",
                        "envVoorvoegsel",
                        "uploadPubliekeSleutel"
                      ]
                    },
                    "leveranciers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uitEnv": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "email",
                                "id",
                                "naam",
                                "opmerking",
                                "actief",
                                "bestand",
                                "catalogus",
                                "klantnummer",
                                "wijze",
                                "emailKopie",
                                "bijlage",
                                "csvScheiding",
                                "csvKop",
                                "csvKolommen",
                                "eancomVersie",
                                "koppelingUrl",
                                "koppelingVan",
                                "koppelingNaar",
                                "koppelingDomein",
                                "koppelingSleutel",
                                "koppelingGebruiker",
                                "koppelingWachtwoord",
                                "koppelingHeaders",
                                "uploadProtocol",
                                "uploadHost",
                                "uploadPoort",
                                "uploadMap",
                                "uploadGebruiker",
                                "uploadWachtwoord",
                                "uploadSleutel",
                                "uploadSleutelWachtwoord",
                                "uploadVingerafdruk",
                                "envCode",
                                "koppelingAangevraagd",
                                "aanvraagAan",
                                "gln",
                                "besteldagen",
                                "besteltijd",
                                "levertijdDagen",
                                "minimumBedrag",
                                "automatisch",
                                "laatsteAuto"
                              ]
                            }
                          },
                          "envCode": {
                            "type": "string",
                            "nullable": true
                          },
                          "envVoorvoegsel": {
                            "type": "string",
                            "nullable": true
                          },
                          "uploadPubliekeSleutel": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "uitEnv",
                          "envCode",
                          "envVoorvoegsel",
                          "uploadPubliekeSleutel"
                        ]
                      }
                    }
                  },
                  "required": [
                    "leverancier",
                    "leveranciers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/leveranciers/{id}": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopLeveranciersId",
        "summary": "leveranciers",
        "description": "leveranciers\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leverancier": {
                      "type": "object",
                      "properties": {
                        "uitEnv": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "email",
                              "id",
                              "naam",
                              "opmerking",
                              "actief",
                              "bestand",
                              "catalogus",
                              "klantnummer",
                              "wijze",
                              "emailKopie",
                              "bijlage",
                              "csvScheiding",
                              "csvKop",
                              "csvKolommen",
                              "eancomVersie",
                              "koppelingUrl",
                              "koppelingVan",
                              "koppelingNaar",
                              "koppelingDomein",
                              "koppelingSleutel",
                              "koppelingGebruiker",
                              "koppelingWachtwoord",
                              "koppelingHeaders",
                              "uploadProtocol",
                              "uploadHost",
                              "uploadPoort",
                              "uploadMap",
                              "uploadGebruiker",
                              "uploadWachtwoord",
                              "uploadSleutel",
                              "uploadSleutelWachtwoord",
                              "uploadVingerafdruk",
                              "envCode",
                              "koppelingAangevraagd",
                              "aanvraagAan",
                              "gln",
                              "besteldagen",
                              "besteltijd",
                              "levertijdDagen",
                              "minimumBedrag",
                              "automatisch",
                              "laatsteAuto"
                            ]
                          }
                        },
                        "envCode": {
                          "type": "string",
                          "nullable": true
                        },
                        "envVoorvoegsel": {
                          "type": "string",
                          "nullable": true
                        },
                        "uploadPubliekeSleutel": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "uitEnv",
                        "envCode",
                        "envVoorvoegsel",
                        "uploadPubliekeSleutel"
                      ]
                    },
                    "leveranciers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uitEnv": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "email",
                                "id",
                                "naam",
                                "opmerking",
                                "actief",
                                "bestand",
                                "catalogus",
                                "klantnummer",
                                "wijze",
                                "emailKopie",
                                "bijlage",
                                "csvScheiding",
                                "csvKop",
                                "csvKolommen",
                                "eancomVersie",
                                "koppelingUrl",
                                "koppelingVan",
                                "koppelingNaar",
                                "koppelingDomein",
                                "koppelingSleutel",
                                "koppelingGebruiker",
                                "koppelingWachtwoord",
                                "koppelingHeaders",
                                "uploadProtocol",
                                "uploadHost",
                                "uploadPoort",
                                "uploadMap",
                                "uploadGebruiker",
                                "uploadWachtwoord",
                                "uploadSleutel",
                                "uploadSleutelWachtwoord",
                                "uploadVingerafdruk",
                                "envCode",
                                "koppelingAangevraagd",
                                "aanvraagAan",
                                "gln",
                                "besteldagen",
                                "besteltijd",
                                "levertijdDagen",
                                "minimumBedrag",
                                "automatisch",
                                "laatsteAuto"
                              ]
                            }
                          },
                          "envCode": {
                            "type": "string",
                            "nullable": true
                          },
                          "envVoorvoegsel": {
                            "type": "string",
                            "nullable": true
                          },
                          "uploadPubliekeSleutel": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "uitEnv",
                          "envCode",
                          "envVoorvoegsel",
                          "uploadPubliekeSleutel"
                        ]
                      }
                    }
                  },
                  "required": [
                    "leverancier",
                    "leveranciers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "deleteBeheerInkoopLeveranciersId",
        "description": "**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leveranciers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uitEnv": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "email",
                                "id",
                                "naam",
                                "opmerking",
                                "actief",
                                "bestand",
                                "catalogus",
                                "klantnummer",
                                "wijze",
                                "emailKopie",
                                "bijlage",
                                "csvScheiding",
                                "csvKop",
                                "csvKolommen",
                                "eancomVersie",
                                "koppelingUrl",
                                "koppelingVan",
                                "koppelingNaar",
                                "koppelingDomein",
                                "koppelingSleutel",
                                "koppelingGebruiker",
                                "koppelingWachtwoord",
                                "koppelingHeaders",
                                "uploadProtocol",
                                "uploadHost",
                                "uploadPoort",
                                "uploadMap",
                                "uploadGebruiker",
                                "uploadWachtwoord",
                                "uploadSleutel",
                                "uploadSleutelWachtwoord",
                                "uploadVingerafdruk",
                                "envCode",
                                "koppelingAangevraagd",
                                "aanvraagAan",
                                "gln",
                                "besteldagen",
                                "besteltijd",
                                "levertijdDagen",
                                "minimumBedrag",
                                "automatisch",
                                "laatsteAuto"
                              ]
                            }
                          },
                          "envCode": {
                            "type": "string",
                            "nullable": true
                          },
                          "envVoorvoegsel": {
                            "type": "string",
                            "nullable": true
                          },
                          "uploadPubliekeSleutel": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "uitEnv",
                          "envCode",
                          "envVoorvoegsel",
                          "uploadPubliekeSleutel"
                        ]
                      }
                    }
                  },
                  "required": [
                    "leveranciers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Leverancier niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Leverancier niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/leveranciers/{id}/aanvraag": {
      "get": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "getBeheerInkoopLeveranciersIdAanvraag",
        "summary": "Koppeling aanvragen: voorstel voor de mail (?soort=cxml|edi|ubl|api)",
        "description": "Koppeling aanvragen: voorstel voor de mail (?soort=cxml|edi|ubl|api).\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "soort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "string",
                      "nullable": true
                    },
                    "onderwerp": {
                      "type": "string"
                    },
                    "tekst": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "aan",
                    "onderwerp",
                    "tekst"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopLeveranciersIdAanvraag",
        "summary": "Koppeling aanvragen: { aan, onderwerp, tekst } versturen (kopie en antwoorden naar de zaak)",
        "description": "Koppeling aanvragen: { aan, onderwerp, tekst } versturen (kopie en antwoorden naar de zaak).\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {},
                  "onderwerp": {},
                  "tekst": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leverancier": {
                      "type": "object",
                      "properties": {
                        "uitEnv": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "email",
                              "id",
                              "naam",
                              "opmerking",
                              "actief",
                              "bestand",
                              "catalogus",
                              "klantnummer",
                              "wijze",
                              "emailKopie",
                              "bijlage",
                              "csvScheiding",
                              "csvKop",
                              "csvKolommen",
                              "eancomVersie",
                              "koppelingUrl",
                              "koppelingVan",
                              "koppelingNaar",
                              "koppelingDomein",
                              "koppelingSleutel",
                              "koppelingGebruiker",
                              "koppelingWachtwoord",
                              "koppelingHeaders",
                              "uploadProtocol",
                              "uploadHost",
                              "uploadPoort",
                              "uploadMap",
                              "uploadGebruiker",
                              "uploadWachtwoord",
                              "uploadSleutel",
                              "uploadSleutelWachtwoord",
                              "uploadVingerafdruk",
                              "envCode",
                              "koppelingAangevraagd",
                              "aanvraagAan",
                              "gln",
                              "besteldagen",
                              "besteltijd",
                              "levertijdDagen",
                              "minimumBedrag",
                              "automatisch",
                              "laatsteAuto"
                            ]
                          }
                        },
                        "envCode": {
                          "type": "string",
                          "nullable": true
                        },
                        "envVoorvoegsel": {
                          "type": "string",
                          "nullable": true
                        },
                        "uploadPubliekeSleutel": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "uitEnv",
                        "envCode",
                        "envVoorvoegsel",
                        "uploadPubliekeSleutel"
                      ],
                      "nullable": true
                    },
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "melding": {
                      "type": "string"
                    },
                    "aangevraagd": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "leverancier",
                    "ok",
                    "melding",
                    "aangevraagd"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Mailen lukte niet: …",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Mailen lukte niet: …"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/leveranciers/{id}/sleutel": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopLeveranciersIdSleutel",
        "summary": "Upload: nieuw SSH-sleutelpaar { soort: 'ed25519' | 'rsa' }; geeft de publieke sleutel voor de leverancier",
        "description": "Upload: nieuw SSH-sleutelpaar { soort: 'ed25519' | 'rsa' }; geeft de publieke sleutel voor de leverancier.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "publiek": {
                      "type": "string"
                    },
                    "leverancier": {
                      "type": "object",
                      "properties": {
                        "uitEnv": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "email",
                              "id",
                              "naam",
                              "opmerking",
                              "actief",
                              "bestand",
                              "catalogus",
                              "klantnummer",
                              "wijze",
                              "emailKopie",
                              "bijlage",
                              "csvScheiding",
                              "csvKop",
                              "csvKolommen",
                              "eancomVersie",
                              "koppelingUrl",
                              "koppelingVan",
                              "koppelingNaar",
                              "koppelingDomein",
                              "koppelingSleutel",
                              "koppelingGebruiker",
                              "koppelingWachtwoord",
                              "koppelingHeaders",
                              "uploadProtocol",
                              "uploadHost",
                              "uploadPoort",
                              "uploadMap",
                              "uploadGebruiker",
                              "uploadWachtwoord",
                              "uploadSleutel",
                              "uploadSleutelWachtwoord",
                              "uploadVingerafdruk",
                              "envCode",
                              "koppelingAangevraagd",
                              "aanvraagAan",
                              "gln",
                              "besteldagen",
                              "besteltijd",
                              "levertijdDagen",
                              "minimumBedrag",
                              "automatisch",
                              "laatsteAuto"
                            ]
                          }
                        },
                        "envCode": {
                          "type": "string",
                          "nullable": true
                        },
                        "envVoorvoegsel": {
                          "type": "string",
                          "nullable": true
                        },
                        "uploadPubliekeSleutel": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "uitEnv",
                        "envCode",
                        "envVoorvoegsel",
                        "uploadPubliekeSleutel"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "publiek",
                    "leverancier"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/leveranciers/{id}/test": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopLeveranciersIdTest",
        "summary": "Upload: inloggen op de server van de leverancier testen (legt bij SFTP de vingerafdruk vast)",
        "description": "Upload: inloggen op de server van de leverancier testen (legt bij SFTP de vingerafdruk vast).\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leverancier": {
                      "type": "object",
                      "properties": {
                        "uitEnv": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "email",
                              "id",
                              "naam",
                              "opmerking",
                              "actief",
                              "bestand",
                              "catalogus",
                              "klantnummer",
                              "wijze",
                              "emailKopie",
                              "bijlage",
                              "csvScheiding",
                              "csvKop",
                              "csvKolommen",
                              "eancomVersie",
                              "koppelingUrl",
                              "koppelingVan",
                              "koppelingNaar",
                              "koppelingDomein",
                              "koppelingSleutel",
                              "koppelingGebruiker",
                              "koppelingWachtwoord",
                              "koppelingHeaders",
                              "uploadProtocol",
                              "uploadHost",
                              "uploadPoort",
                              "uploadMap",
                              "uploadGebruiker",
                              "uploadWachtwoord",
                              "uploadSleutel",
                              "uploadSleutelWachtwoord",
                              "uploadVingerafdruk",
                              "envCode",
                              "koppelingAangevraagd",
                              "aanvraagAan",
                              "gln",
                              "besteldagen",
                              "besteltijd",
                              "levertijdDagen",
                              "minimumBedrag",
                              "automatisch",
                              "laatsteAuto"
                            ]
                          }
                        },
                        "envCode": {
                          "type": "string",
                          "nullable": true
                        },
                        "envVoorvoegsel": {
                          "type": "string",
                          "nullable": true
                        },
                        "uploadPubliekeSleutel": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "uitEnv",
                        "envCode",
                        "envVoorvoegsel",
                        "uploadPubliekeSleutel"
                      ],
                      "nullable": true
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "melding": {
                      "type": "string"
                    },
                    "vingerafdruk": {
                      "type": "string",
                      "nullable": true
                    },
                    "vastgelegd": {
                      "type": "boolean",
                      "description": "vingerafdruk nu vastgelegd (SFTP, eerste keer)"
                    },
                    "mapBestaat": {
                      "type": "boolean",
                      "nullable": true
                    }
                  },
                  "required": [
                    "leverancier",
                    "ok",
                    "melding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/orders": {
      "get": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "getBeheerInkoopOrders",
        "description": "**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leverancierId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      }
                    }
                  },
                  "required": [
                    "orders"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopOrders",
        "summary": "Nieuwe bestelling (concept): { leverancierId, regels: [{ soort, id, aantal }], opmerking?, leverdatum? }",
        "description": "Nieuwe bestelling (concept): { leverancierId, regels: [{ soort, id, aantal }], opmerking?, leverdatum? }.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "leverancierId": {},
                  "regels": {},
                  "opmerking": {},
                  "leverdatum": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "order"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een leverancier.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een leverancier."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/orders/{id}": {
      "get": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "getBeheerInkoopOrdersId",
        "description": "**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "order"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopOrdersId",
        "summary": "Concept aanpassen",
        "description": "Concept aanpassen.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regels": {},
                  "opmerking": {},
                  "leverdatum": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "order"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/orders/{id}/annuleren": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopOrdersIdAnnuleren",
        "description": "**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "order"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/orders/{id}/bestand": {
      "get": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "getBeheerInkoopOrdersIdBestand",
        "summary": "De bestelling als bestand (CSV, Excel, Care4Fresh, UBL, EANCOM of cXML zonder het geheim): { naam, type, in…",
        "description": "De bestelling als bestand (CSV, Excel, Care4Fresh, UBL, EANCOM of cXML zonder het geheim):\n{ naam, type, inhoud } (tekst) of { naam, type, base64 } (Excel).\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "soort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "inhoud": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "naam",
                        "type",
                        "inhoud"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "base64": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "naam",
                        "type",
                        "base64"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/orders/{id}/ontvangen": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopOrdersIdOntvangen",
        "summary": "Ontvangen: { regels: { <regelId>: aantal } } (leeg = zoals besteld)",
        "description": "Ontvangen: { regels: { <regelId>: aantal } } (leeg = zoals besteld). Boekt de voorraad bij.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regels": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "order"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/orders/{id}/versturen": {
      "post": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "postBeheerInkoopOrdersIdVersturen",
        "summary": "Versturen (op de manier van de leverancier, of { wijze } voor deze keer)",
        "description": "Versturen (op de manier van de leverancier, of { wijze } voor deze keer).\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "wijze": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerstuurResultaat"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/inkoop/voorstel": {
      "get": {
        "tags": [
          "Bestellen bij leveranciers"
        ],
        "operationId": "getBeheerInkoopVoorstel",
        "summary": "Bestelvoorstel per leverancier; ?alles=1 ook wat (nog) niet nodig is",
        "description": "Bestelvoorstel per leverancier; ?alles=1 ook wat (nog) niet nodig is.\n\n**Toegang:** Vereist recht `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "alles",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leverancierId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "leveranciers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "leverancier": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              },
                              "wijze": {
                                "type": "string",
                                "enum": [
                                  "webhook",
                                  "email",
                                  "bestand",
                                  "cxml",
                                  "upload",
                                  "printen"
                                ]
                              },
                              "minimumBedrag": {
                                "type": "number"
                              },
                              "actief": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "naam",
                              "wijze",
                              "minimumBedrag",
                              "actief"
                            ]
                          },
                          "regels": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/VoorstelRegel"
                            }
                          }
                        },
                        "required": [
                          "leverancier",
                          "regels"
                        ]
                      }
                    }
                  },
                  "required": [
                    "leveranciers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: voorraad beheren (ontvangst, telling, afboeken, ingrediënten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Bestellen bij leveranciers staat uit (Instellingen → Voorraad).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kassaopties": {
      "get": {
        "tags": [
          "kassaopties"
        ],
        "operationId": "getBeheerKassaopties",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "opties": {
                      "$ref": "#/components/schemas/KassaOpties"
                    },
                    "nietGetest": {
                      "type": "object",
                      "properties": {
                        "onbetaald": {
                          "type": "string"
                        },
                        "gasten": {
                          "type": "string"
                        },
                        "optellen": {
                          "type": "string"
                        },
                        "meenemen": {
                          "type": "string"
                        },
                        "stoel": {
                          "type": "string"
                        },
                        "terugnemen": {
                          "type": "string"
                        },
                        "voorschot": {
                          "type": "string"
                        },
                        "spv": {
                          "type": "string"
                        },
                        "apart": {
                          "type": "string"
                        },
                        "verbeteren": {
                          "type": "string"
                        },
                        "zonderwerkbon": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "opties",
                    "nietGetest"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "kassaopties"
        ],
        "operationId": "postBeheerKassaopties",
        "description": "**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "opties": {
                      "$ref": "#/components/schemas/KassaOpties"
                    },
                    "nietGetest": {
                      "type": "object",
                      "properties": {
                        "onbetaald": {
                          "type": "string"
                        },
                        "gasten": {
                          "type": "string"
                        },
                        "optellen": {
                          "type": "string"
                        },
                        "meenemen": {
                          "type": "string"
                        },
                        "stoel": {
                          "type": "string"
                        },
                        "terugnemen": {
                          "type": "string"
                        },
                        "voorschot": {
                          "type": "string"
                        },
                        "spv": {
                          "type": "string"
                        },
                        "apart": {
                          "type": "string"
                        },
                        "verbeteren": {
                          "type": "string"
                        },
                        "zonderwerkbon": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "opties",
                    "nietGetest"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/keuken": {
      "post": {
        "tags": [
          "Keuken"
        ],
        "operationId": "postBeheerKeuken",
        "summary": "Instellen (Instellingen → Printers → Keukenscherm)",
        "description": "Instellen (Instellingen → Printers → Keukenscherm).\n\n**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "doorzetten": {
                      "type": "boolean"
                    },
                    "volgende": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "extraStations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "herordenen": {
                      "type": "boolean"
                    },
                    "gang": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aanvragen",
                        "afroepen"
                      ]
                    },
                    "migratie": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "doorzetten",
                    "volgende",
                    "extraStations",
                    "herordenen",
                    "gang",
                    "migratie"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kiosk": {
      "get": {
        "tags": [
          "kiosk"
        ],
        "operationId": "getBeheerKiosk",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "$ref": "#/components/schemas/KioskInstelling"
                    },
                    "apparaten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KioskApparaat"
                      }
                    },
                    "migratie110": {
                      "type": "boolean",
                      "description": "migratie 110 (betalen aan de kassa) gedraaid"
                    },
                    "migratie111": {
                      "type": "boolean",
                      "description": "migratie 111 (bestelstatus op de telefoon) gedraaid"
                    },
                    "terminals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    },
                    "pin": {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "testmodus": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan",
                        "testmodus"
                      ]
                    },
                    "adressen": {
                      "type": "object",
                      "properties": {
                        "lan": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "portaal": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "lan",
                        "portaal"
                      ],
                      "description": "adressen voor de kiosk-app: in het netwerk van de zaak (http) en via het beheerportaal (https, als de kassa verbonden is)"
                    },
                    "tegoed": {
                      "type": "boolean",
                      "description": "oplaadbaar tegoed staat aan (nodig voor opwaarderen op de kiosk)"
                    },
                    "land": {
                      "type": "string",
                      "description": "land van de zaak (BE: waarschuwing bij de noodmodus van de kiosk-app)"
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "instelling",
                    "apparaten",
                    "migratie110",
                    "migratie111",
                    "terminals",
                    "groepen",
                    "pin",
                    "adressen",
                    "tegoed",
                    "land"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postBeheerKiosk",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kiosk/apparaten": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postBeheerKioskApparaten",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kiosk/apparaten/{id}": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postBeheerKioskApparatenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kiosk/apparaten/{id}/koppelcode": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postBeheerKioskApparatenIdKoppelcode",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kiosk/apparaten/{id}/verwijderen": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postBeheerKioskApparatenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/klanten": {
      "get": {
        "tags": [
          "Klanten"
        ],
        "operationId": "getBeheerKlanten",
        "summary": "Klantenlijst met laatste activiteit (beheer)",
        "description": "Klantenlijst met laatste activiteit (beheer).\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "zoek",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/klanten/{id}": {
      "put": {
        "tags": [
          "Klanten"
        ],
        "operationId": "putBeheerKlantenId",
        "description": "**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KlantInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/KlantInfo"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Dit telefoonnummer hoort al bij ….",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit telefoonnummer hoort al bij …."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Klanten"
        ],
        "operationId": "deleteBeheerKlantenId",
        "summary": "Verwijderen (AVG): gegevens weg; de historie blijft anoniem bewaard",
        "description": "Verwijderen (AVG): gegevens weg; de historie blijft anoniem bewaard.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze klant hangt aan een open bestelling. Reken die eerst af of koppel los.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze klant hangt aan een open bestelling. Reken die eerst af of koppel los."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/klanten/{id}/correctie": {
      "post": {
        "tags": [
          "Klanten"
        ],
        "operationId": "postBeheerKlantenIdCorrectie",
        "summary": "Punten corrigeren (+ of -), met reden",
        "description": "Punten corrigeren (+ of -), met reden.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "punten": {
                    "type": "number"
                  },
                  "reden": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/KlantInfo"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul een aantal punten in (bv. 50 of -50).\n- Geef een reden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een aantal punten in (bv. 50 of -50)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/klanten/{id}/historie": {
      "get": {
        "tags": [
          "Klanten"
        ],
        "operationId": "getBeheerKlantenIdHistorie",
        "summary": "Historie van één klant",
        "description": "Historie van één klant.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/klantscherm-extra": {
      "get": {
        "tags": [
          "klantschermextra"
        ],
        "operationId": "getBeheerKlantschermExtra",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie113": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "klantscherm": {
                      "type": "boolean"
                    },
                    "bon": {
                      "type": "boolean",
                      "description": "Digitale bon via een QR-code na het afrekenen."
                    },
                    "dia": {
                      "$ref": "#/components/schemas/DiaInstelling"
                    }
                  },
                  "required": [
                    "migratie113",
                    "portaal",
                    "klantscherm",
                    "bon",
                    "dia"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "klantschermextra"
        ],
        "operationId": "postBeheerKlantschermExtra",
        "summary": "{ bon, dia: { aan, seconden, acties, uitgelicht, spaarkaart, teksten } } (alles optioneel)",
        "description": "{ bon, dia: { aan, seconden, acties, uitgelicht, spaarkaart, teksten } } (alles optioneel).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie113": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "klantscherm": {
                      "type": "boolean"
                    },
                    "bon": {
                      "type": "boolean",
                      "description": "Digitale bon via een QR-code na het afrekenen."
                    },
                    "dia": {
                      "$ref": "#/components/schemas/DiaInstelling"
                    }
                  },
                  "required": [
                    "migratie113",
                    "portaal",
                    "klantscherm",
                    "bon",
                    "dia"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kortingscodes": {
      "get": {
        "tags": [
          "Kortingscodes"
        ],
        "operationId": "getBeheerKortingscodes",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "codes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Kortingscode"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "codes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Kortingscodes"
        ],
        "operationId": "postBeheerKortingscodes",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Kortingscode"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "De code … bestaat al.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De code … bestaat al."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/kortingscodes/{id}": {
      "put": {
        "tags": [
          "Kortingscodes"
        ],
        "operationId": "putBeheerKortingscodesId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Kortingscode"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Kortingscode niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kortingscode niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- De code … bestaat al.\n- Deze code is al gebruikt; de code zelf kan niet meer veranderen. Maak een nieuwe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De code … bestaat al."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Kortingscodes"
        ],
        "operationId": "deleteBeheerKortingscodesId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "uitgezet": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "uitgezet"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Kortingscode niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kortingscode niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/lade": {
      "get": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "getBeheerLade",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "medewerkers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "lade": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "lade"
                        ]
                      }
                    },
                    "bonprinter": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "netwerk": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "naam",
                        "netwerk"
                      ]
                    },
                    "sensor": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "hoog_open",
                        "laag_open"
                      ]
                    },
                    "blokkeren": {
                      "type": "boolean"
                    },
                    "maxOpen": {
                      "type": "number"
                    },
                    "perMedewerker": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "medewerkers",
                    "bonprinter",
                    "sensor",
                    "blokkeren",
                    "maxOpen",
                    "perMedewerker"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postBeheerLade",
        "summary": "{ sensor, blokkeren, maxOpen, perMedewerker, lades: { <gebruikerId>: 1 | 2 | null } }",
        "description": "{ sensor, blokkeren, maxOpen, perMedewerker, lades: { <gebruikerId>: 1 | 2 | null } }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sensor": {},
                  "blokkeren": {},
                  "maxOpen": {},
                  "perMedewerker": {},
                  "lades": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sensor": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "hoog_open",
                        "laag_open"
                      ]
                    },
                    "blokkeren": {
                      "type": "boolean"
                    },
                    "maxOpen": {
                      "type": "number"
                    },
                    "perMedewerker": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "sensor",
                    "blokkeren",
                    "maxOpen",
                    "perMedewerker"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Te lang open: 0 tot 3600 seconden (0 = geen melding).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Te lang open: 0 tot 3600 seconden (0 = geen melding)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/lade/meten": {
      "get": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "getBeheerLadeMeten",
        "summary": "Meten (instellen van de sensor): wat de bonprinter nu over de lade zegt",
        "description": "Meten (instellen van de sensor): wat de bonprinter nu over de lade zegt.\nEén keer met de lade dicht en één keer open: het verschil bepaalt de instelling.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kan": {
                      "type": "boolean"
                    },
                    "printer": {
                      "type": "string"
                    },
                    "byte": {
                      "type": "number",
                      "nullable": true
                    },
                    "geldig": {
                      "type": "boolean"
                    },
                    "hoog": {
                      "type": "boolean",
                      "nullable": true
                    },
                    "openBijHoog": {
                      "type": "boolean",
                      "nullable": true
                    }
                  },
                  "required": [
                    "kan",
                    "printer",
                    "byte",
                    "geldig",
                    "hoog",
                    "openBijHoog"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/lade/test": {
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postBeheerLadeTest",
        "summary": "Lade 1 of 2 openen om te testen",
        "description": "Lade 1 of 2 openen om te testen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lade": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/maaltijdcheques": {
      "get": {
        "tags": [
          "maaltijdcheques"
        ],
        "operationId": "getBeheerMaaltijdcheques",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "uitgevers": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "pluxee",
                          "edenred",
                          "monizze"
                        ]
                      },
                      "description": "welke uitgevers de zaak aanneemt (alfabetisch)"
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "alleen voor producten uit deze productgroepen; leeg = alles"
                    },
                    "migratie114": {
                      "type": "boolean"
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    }
                  },
                  "required": [
                    "aan",
                    "uitgevers",
                    "groepen",
                    "migratie114",
                    "land"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "maaltijdcheques"
        ],
        "operationId": "postBeheerMaaltijdcheques",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "uitgevers": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "pluxee",
                          "edenred",
                          "monizze"
                        ]
                      },
                      "description": "welke uitgevers de zaak aanneemt (alfabetisch)"
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "alleen voor producten uit deze productgroepen; leeg = alles"
                    },
                    "migratie114": {
                      "type": "boolean"
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    }
                  },
                  "required": [
                    "aan",
                    "uitgevers",
                    "groepen",
                    "migratie114",
                    "land"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing": {
      "get": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "getBeheerMailing",
        "summary": "Per dienst: verbonden (hoe), gekozen lijst, aantal aangemeld, laatste keer en fout; terugadres voor inloggen",
        "description": "Per dienst: verbonden (hoe), gekozen lijst, aantal aangemeld, laatste keer en fout; terugadres voor inloggen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "toestemming": {
                      "type": "number"
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "verbonden": {
                            "type": "boolean"
                          },
                          "via": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelUitEnv": {
                            "type": "boolean"
                          },
                          "inloggenMogelijk": {
                            "type": "boolean"
                          },
                          "app": {
                            "type": "object",
                            "properties": {
                              "uitEnv": {
                                "type": "boolean"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "geheimIngevuld": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "uitEnv",
                              "clientId",
                              "geheimIngevuld"
                            ]
                          },
                          "redirect": {
                            "type": "string"
                          },
                          "redirectUitEnv": {
                            "type": "boolean"
                          },
                          "lijst": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "laatstOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "aangemeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam",
                          "verbonden",
                          "via",
                          "sleutelUitEnv",
                          "inloggenMogelijk",
                          "app",
                          "redirect",
                          "redirectUitEnv",
                          "lijst",
                          "laatstOp",
                          "fout",
                          "aangemeld"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "klantenkaart",
                    "toestemming",
                    "redirect",
                    "diensten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/app": {
      "post": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "postBeheerMailingDienstApp",
        "summary": "{ clientId, clientGeheim (leeg = houden, null = wissen), terugadres }: de app voor inloggen (OAuth)",
        "description": "{ clientId, clientGeheim (leeg = houden, null = wissen), terugadres }: de app voor inloggen (OAuth).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "toestemming": {
                      "type": "number"
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "verbonden": {
                            "type": "boolean"
                          },
                          "via": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelUitEnv": {
                            "type": "boolean"
                          },
                          "inloggenMogelijk": {
                            "type": "boolean"
                          },
                          "app": {
                            "type": "object",
                            "properties": {
                              "uitEnv": {
                                "type": "boolean"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "geheimIngevuld": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "uitEnv",
                              "clientId",
                              "geheimIngevuld"
                            ]
                          },
                          "redirect": {
                            "type": "string"
                          },
                          "redirectUitEnv": {
                            "type": "boolean"
                          },
                          "lijst": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "laatstOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "aangemeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam",
                          "verbonden",
                          "via",
                          "sleutelUitEnv",
                          "inloggenMogelijk",
                          "app",
                          "redirect",
                          "redirectUitEnv",
                          "lijst",
                          "laatstOp",
                          "fout",
                          "aangemeld"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "klantenkaart",
                    "toestemming",
                    "redirect",
                    "diensten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/bijwerken": {
      "post": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "postBeheerMailingDienstBijwerken",
        "summary": "Nu bijwerken (anders elke 5 minuten): afmeldingen, klanten en bonnen",
        "description": "Nu bijwerken (anders elke 5 minuten): afmeldingen, klanten en bonnen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "toestemming": {
                      "type": "number"
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "verbonden": {
                            "type": "boolean"
                          },
                          "via": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelUitEnv": {
                            "type": "boolean"
                          },
                          "inloggenMogelijk": {
                            "type": "boolean"
                          },
                          "app": {
                            "type": "object",
                            "properties": {
                              "uitEnv": {
                                "type": "boolean"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "geheimIngevuld": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "uitEnv",
                              "clientId",
                              "geheimIngevuld"
                            ]
                          },
                          "redirect": {
                            "type": "string"
                          },
                          "redirectUitEnv": {
                            "type": "boolean"
                          },
                          "lijst": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "laatstOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "aangemeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam",
                          "verbonden",
                          "via",
                          "sleutelUitEnv",
                          "inloggenMogelijk",
                          "app",
                          "redirect",
                          "redirectUitEnv",
                          "lijst",
                          "laatstOp",
                          "fout",
                          "aangemeld"
                        ]
                      }
                    },
                    "afgemeld": {
                      "type": "number"
                    },
                    "aangemeld": {
                      "type": "number"
                    },
                    "uitgeschreven": {
                      "type": "number"
                    },
                    "bonnen": {
                      "type": "number"
                    },
                    "meer": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie",
                    "klantenkaart",
                    "toestemming",
                    "redirect",
                    "diensten",
                    "afgemeld",
                    "aangemeld",
                    "uitgeschreven",
                    "bonnen",
                    "meer"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/lijst": {
      "post": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "postBeheerMailingDienstLijst",
        "summary": "{ id, naam }: deze lijst gebruiken (leeg = geen lijst: dan gebeurt er niets)",
        "description": "{ id, naam }: deze lijst gebruiken (leeg = geen lijst: dan gebeurt er niets).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "toestemming": {
                      "type": "number"
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "verbonden": {
                            "type": "boolean"
                          },
                          "via": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelUitEnv": {
                            "type": "boolean"
                          },
                          "inloggenMogelijk": {
                            "type": "boolean"
                          },
                          "app": {
                            "type": "object",
                            "properties": {
                              "uitEnv": {
                                "type": "boolean"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "geheimIngevuld": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "uitEnv",
                              "clientId",
                              "geheimIngevuld"
                            ]
                          },
                          "redirect": {
                            "type": "string"
                          },
                          "redirectUitEnv": {
                            "type": "boolean"
                          },
                          "lijst": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "laatstOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "aangemeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam",
                          "verbonden",
                          "via",
                          "sleutelUitEnv",
                          "inloggenMogelijk",
                          "app",
                          "redirect",
                          "redirectUitEnv",
                          "lijst",
                          "laatstOp",
                          "fout",
                          "aangemeld"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "klantenkaart",
                    "toestemming",
                    "redirect",
                    "diensten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/lijsten": {
      "get": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "getBeheerMailingDienstLijsten",
        "summary": "De lijsten (Mailchimp: audiences) om uit te kiezen",
        "description": "De lijsten (Mailchimp: audiences) om uit te kiezen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lijsten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    }
                  },
                  "required": [
                    "lijsten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/ontkoppelen": {
      "post": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "postBeheerMailingDienstOntkoppelen",
        "summary": "Ontkoppelen: in de kassa weg; in Mailchimp/Klaviyo blijft alles staan",
        "description": "Ontkoppelen: in de kassa weg; in Mailchimp/Klaviyo blijft alles staan.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "toestemming": {
                      "type": "number"
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "verbonden": {
                            "type": "boolean"
                          },
                          "via": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelUitEnv": {
                            "type": "boolean"
                          },
                          "inloggenMogelijk": {
                            "type": "boolean"
                          },
                          "app": {
                            "type": "object",
                            "properties": {
                              "uitEnv": {
                                "type": "boolean"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "geheimIngevuld": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "uitEnv",
                              "clientId",
                              "geheimIngevuld"
                            ]
                          },
                          "redirect": {
                            "type": "string"
                          },
                          "redirectUitEnv": {
                            "type": "boolean"
                          },
                          "lijst": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "laatstOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "aangemeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam",
                          "verbonden",
                          "via",
                          "sleutelUitEnv",
                          "inloggenMogelijk",
                          "app",
                          "redirect",
                          "redirectUitEnv",
                          "lijst",
                          "laatstOp",
                          "fout",
                          "aangemeld"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "klantenkaart",
                    "toestemming",
                    "redirect",
                    "diensten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/sleutel": {
      "post": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "postBeheerMailingDienstSleutel",
        "summary": "{ sleutel }: API-sleutel (gecontroleerd bij de dienst); null = wissen",
        "description": "{ sleutel }: API-sleutel (gecontroleerd bij de dienst); null = wissen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "toestemming": {
                      "type": "number"
                    },
                    "redirect": {
                      "type": "string"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "verbonden": {
                            "type": "boolean"
                          },
                          "via": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelUitEnv": {
                            "type": "boolean"
                          },
                          "inloggenMogelijk": {
                            "type": "boolean"
                          },
                          "app": {
                            "type": "object",
                            "properties": {
                              "uitEnv": {
                                "type": "boolean"
                              },
                              "clientId": {
                                "type": "string"
                              },
                              "geheimIngevuld": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "uitEnv",
                              "clientId",
                              "geheimIngevuld"
                            ]
                          },
                          "redirect": {
                            "type": "string"
                          },
                          "redirectUitEnv": {
                            "type": "boolean"
                          },
                          "lijst": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "laatstOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "aangemeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam",
                          "verbonden",
                          "via",
                          "sleutelUitEnv",
                          "inloggenMogelijk",
                          "app",
                          "redirect",
                          "redirectUitEnv",
                          "lijst",
                          "laatstOp",
                          "fout",
                          "aangemeld"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "klantenkaart",
                    "toestemming",
                    "redirect",
                    "diensten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/mailing/{dienst}/verbinden": {
      "post": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "postBeheerMailingDienstVerbinden",
        "summary": "Inloggen starten (OAuth, met de app in .env); geeft { url } om te openen",
        "description": "Inloggen starten (OAuth, met de app in .env); geeft { url } om te openen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "dienst",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende dienst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende dienst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/marketing": {
      "get": {
        "tags": [
          "Marketing"
        ],
        "operationId": "getBeheerMarketing",
        "summary": "Overzicht: welke kanalen aan staan, hoeveel klanten toestemming gaven (per kanaal) en alle acties (nieuwste…",
        "description": "Overzicht: welke kanalen aan staan, hoeveel klanten toestemming gaven\n(per kanaal) en alle acties (nieuwste eerst).\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "sms": {
                          "type": "boolean"
                        },
                        "email": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "sms",
                        "email"
                      ]
                    },
                    "toestemming": {
                      "type": "object",
                      "properties": {
                        "sms": {
                          "type": "number"
                        },
                        "email": {
                          "type": "number"
                        },
                        "klanten": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "sms",
                        "email",
                        "klanten"
                      ]
                    },
                    "maxPerKeer": {
                      "type": "number"
                    },
                    "kortingscodes": {
                      "type": "boolean"
                    },
                    "diensten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dienst": {
                            "type": "string",
                            "enum": [
                              "mailchimp",
                              "klaviyo"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "dienst",
                          "naam"
                        ]
                      }
                    },
                    "migratie090": {
                      "type": "boolean"
                    },
                    "push": {
                      "type": "object",
                      "properties": {
                        "migratie": {
                          "type": "boolean"
                        },
                        "aan": {
                          "type": "boolean"
                        },
                        "aantal": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "migratie",
                        "aan",
                        "aantal"
                      ]
                    },
                    "mailserver": {
                      "type": "boolean"
                    },
                    "campagnes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "codes": {
                            "type": "object",
                            "properties": {
                              "uitgegeven": {
                                "type": "number"
                              },
                              "gebruikt": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "uitgegeven",
                              "gebruikt"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "eenmalig",
                              "verjaardag",
                              "terugkomen"
                            ]
                          },
                          "kanaal": {
                            "type": "string",
                            "enum": [
                              "sms",
                              "email"
                            ]
                          },
                          "onderwerp": {
                            "type": "string",
                            "nullable": true
                          },
                          "tekst": {
                            "type": "string"
                          },
                          "dagen": {
                            "type": "number",
                            "nullable": true,
                            "description": "eenmalig: niet geweest sinds zoveel dagen (leeg = iedereen); terugkomen: na zoveel dagen"
                          },
                          "minPunten": {
                            "type": "number",
                            "nullable": true,
                            "description": "eenmalig: minimaal zoveel punten (leeg = iedereen)"
                          },
                          "actief": {
                            "type": "boolean",
                            "description": "automatische berichten: aan/uit"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "verstuurd",
                              "concept",
                              "bezig"
                            ]
                          },
                          "onderbroken": {
                            "type": "boolean",
                            "description": "status 'bezig' maar er wordt niet (meer) verstuurd, bv. na een herstart: verder versturen kan"
                          },
                          "verstuurdOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "aantalVerstuurd": {
                            "type": "number"
                          },
                          "aantalMislukt": {
                            "type": "number"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          },
                          "gewijzigdOp": {
                            "type": "string",
                            "nullable": true
                          },
                          "code": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/CampagneCode"
                              }
                            ],
                            "nullable": true,
                            "description": "persoonlijke kortingscode bij elk bericht (migratie 068); null = geen"
                          },
                          "via": {
                            "type": "string",
                            "enum": [
                              "kassa",
                              "push",
                              "mailchimp",
                              "klaviyo"
                            ],
                            "description": "wie verstuurt (migratie 090): de kassa, of Mailchimp/Klaviyo"
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true,
                            "description": "waarom versturen via Mailchimp/Klaviyo niet lukte (de actie is dan weer een concept)"
                          }
                        },
                        "required": [
                          "codes",
                          "id",
                          "naam",
                          "soort",
                          "kanaal",
                          "onderwerp",
                          "tekst",
                          "dagen",
                          "minPunten",
                          "actief",
                          "status",
                          "onderbroken",
                          "verstuurdOp",
                          "aantalVerstuurd",
                          "aantalMislukt",
                          "aangemaaktOp",
                          "gewijzigdOp",
                          "code",
                          "via",
                          "fout"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kanalen",
                    "toestemming",
                    "maxPerKeer",
                    "kortingscodes",
                    "diensten",
                    "migratie090",
                    "push",
                    "mailserver",
                    "campagnes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Marketing"
        ],
        "operationId": "postBeheerMarketing",
        "summary": "Nieuwe actie (eenmalig = concept; verjaardag/terugkomen = automatisch, aan als actief)",
        "description": "Nieuwe actie (eenmalig = concept; verjaardag/terugkomen = automatisch, aan als actief).\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampagneInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Campagne"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/marketing/ontvangers": {
      "post": {
        "tags": [
          "Marketing"
        ],
        "operationId": "postBeheerMarketingOntvangers",
        "summary": "Hoeveel klanten een eenmalige actie zouden krijgen (toestemming voor het kanaal, eventueel niet geweest sin…",
        "description": "Hoeveel klanten een eenmalige actie zouden krijgen (toestemming voor het\nkanaal, eventueel niet geweest sinds x dagen / minimaal x punten), plus een\nvoorbeeld van het bericht en het aantal sms-delen.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampagneInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "meer": {
                          "type": "boolean"
                        },
                        "voorbeeld": {
                          "type": "object",
                          "properties": {
                            "onderwerp": {
                              "type": "string"
                            },
                            "tekst": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "onderwerp",
                            "tekst"
                          ]
                        },
                        "smsDelen": {
                          "type": "number"
                        },
                        "via": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "aantal",
                        "meer",
                        "voorbeeld",
                        "smsDelen",
                        "via"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "meer": {
                          "type": "boolean"
                        },
                        "voorbeeld": {
                          "type": "object",
                          "properties": {
                            "onderwerp": {
                              "type": "string"
                            },
                            "tekst": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "onderwerp",
                            "tekst"
                          ]
                        },
                        "smsDelen": {
                          "type": "number"
                        },
                        "via": {
                          "type": "string",
                          "enum": [
                            "mailchimp",
                            "klaviyo"
                          ]
                        }
                      },
                      "required": [
                        "aantal",
                        "meer",
                        "voorbeeld",
                        "smsDelen",
                        "via"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "meer": {
                          "type": "boolean"
                        },
                        "voorbeeld": {
                          "type": "object",
                          "properties": {
                            "onderwerp": {
                              "type": "string"
                            },
                            "tekst": {
                              "type": "string"
                            },
                            "html": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "onderwerp",
                            "tekst"
                          ]
                        },
                        "smsDelen": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "meer",
                        "voorbeeld",
                        "smsDelen"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/marketing/test": {
      "post": {
        "tags": [
          "Marketing"
        ],
        "operationId": "postBeheerMarketingTest",
        "summary": "Testbericht naar een eigen nummer of adres ({naam} = \"Test\", {punten} = 120)",
        "description": "Testbericht naar een eigen nummer of adres ({naam} = \"Test\", {punten} = 120).\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {},
                  "soort": {
                    "description": "'eenmalig' | 'verjaardag' | 'terugkomen'"
                  },
                  "kanaal": {
                    "description": "'sms' | 'email'"
                  },
                  "onderwerp": {
                    "description": "alleen e-mail"
                  },
                  "tekst": {
                    "description": "{naam}, {zaak} en {punten} worden ingevuld"
                  },
                  "dagen": {
                    "description": "eenmalig: niet geweest sinds zoveel dagen (leeg = iedereen); terugkomen: na zoveel dagen (verplicht)"
                  },
                  "minPunten": {
                    "description": "eenmalig: minimaal zoveel punten (leeg = iedereen)"
                  },
                  "actief": {
                    "description": "automatische berichten: aan/uit"
                  },
                  "code": {
                    "type": "object",
                    "properties": {
                      "soort": {},
                      "waarde": {},
                      "minimum": {},
                      "dagen": {},
                      "kassa": {},
                      "webshop": {}
                    },
                    "nullable": true,
                    "description": "persoonlijke kortingscode (migratie 068): { soort, waarde, minimum, dagen, kassa, webshop }; leeg/null = geen"
                  },
                  "via": {
                    "description": "wie verstuurt (migratie 090): 'kassa' (standaard), 'mailchimp' of 'klaviyo' (alleen eenmalig per e-mail); 'push' (migratie 095)"
                  },
                  "naar": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldig telefoonnummer.\n- Ongeldig e-mailadres.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldig telefoonnummer."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Een test van een pushbericht: zet op je eigen telefoon in de webshop \"Aanbiedingen als melding\" aan; dan krijg je de actie zelf ook.\n- Een test sturen gaat via de mailserver van de kassa (SMTP_HOST in .env); stuur anders een test vanuit Mailchimp of Klaviyo.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Een test van een pushbericht: zet op je eigen telefoon in de webshop \"Aanbiedingen als melding\" aan; dan krijg je de actie zelf ook."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "De betaalterminal of een externe dienst gaf een fout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/marketing/{id}": {
      "put": {
        "tags": [
          "Marketing"
        ],
        "operationId": "putBeheerMarketingId",
        "summary": "Actie wijzigen: een eenmalige alleen zolang hij nog niet verstuurd is",
        "description": "Actie wijzigen: een eenmalige alleen zolang hij nog niet verstuurd is.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampagneInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Campagne"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Deze actie is al verstuurd en kan niet meer veranderen. Maak een nieuwe.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze actie is al verstuurd en kan niet meer veranderen. Maak een nieuwe."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Marketing"
        ],
        "operationId": "deleteBeheerMarketingId",
        "summary": "Actie weghalen (niet terwijl hij aan het versturen is)",
        "description": "Actie weghalen (niet terwijl hij aan het versturen is). Wat al verstuurd is, gaat mee weg uit het overzicht.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Deze actie is nog aan het versturen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze actie is nog aan het versturen."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/marketing/{id}/versturen": {
      "post": {
        "tags": [
          "Marketing"
        ],
        "operationId": "postBeheerMarketingIdVersturen",
        "summary": "Eenmalige actie versturen (op de achtergrond; status \"bezig\", daarna \"verstuurd\")",
        "description": "Eenmalige actie versturen (op de achtergrond; status \"bezig\", daarna\n\"verstuurd\"). Ook voor \"Verder versturen\" na een onderbreking: wie al een\nbericht kreeg, krijgt er geen tweede. Geeft het aantal ontvangers.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ontvangers": {
                      "type": "number"
                    },
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "eenmalig",
                        "verjaardag",
                        "terugkomen"
                      ]
                    },
                    "kanaal": {
                      "type": "string",
                      "enum": [
                        "sms",
                        "email"
                      ]
                    },
                    "onderwerp": {
                      "type": "string",
                      "nullable": true
                    },
                    "tekst": {
                      "type": "string"
                    },
                    "dagen": {
                      "type": "number",
                      "nullable": true,
                      "description": "eenmalig: niet geweest sinds zoveel dagen (leeg = iedereen); terugkomen: na zoveel dagen"
                    },
                    "minPunten": {
                      "type": "number",
                      "nullable": true,
                      "description": "eenmalig: minimaal zoveel punten (leeg = iedereen)"
                    },
                    "actief": {
                      "type": "boolean",
                      "description": "automatische berichten: aan/uit"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "verstuurd",
                        "concept",
                        "bezig"
                      ]
                    },
                    "onderbroken": {
                      "type": "boolean",
                      "description": "status 'bezig' maar er wordt niet (meer) verstuurd, bv. na een herstart: verder versturen kan"
                    },
                    "verstuurdOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "aantalVerstuurd": {
                      "type": "number"
                    },
                    "aantalMislukt": {
                      "type": "number"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    },
                    "gewijzigdOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "code": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CampagneCode"
                        }
                      ],
                      "nullable": true,
                      "description": "persoonlijke kortingscode bij elk bericht (migratie 068); null = geen"
                    },
                    "via": {
                      "type": "string",
                      "enum": [
                        "kassa",
                        "push",
                        "mailchimp",
                        "klaviyo"
                      ],
                      "description": "wie verstuurt (migratie 090): de kassa, of Mailchimp/Klaviyo"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true,
                      "description": "waarom versturen via Mailchimp/Klaviyo niet lukte (de actie is dan weer een concept)"
                    }
                  },
                  "required": [
                    "ontvangers",
                    "id",
                    "naam",
                    "soort",
                    "kanaal",
                    "onderwerp",
                    "tekst",
                    "dagen",
                    "minPunten",
                    "actief",
                    "status",
                    "onderbroken",
                    "verstuurdOp",
                    "aantalVerstuurd",
                    "aantalMislukt",
                    "aangemaaktOp",
                    "gewijzigdOp",
                    "code",
                    "via",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Automatische berichten gaan vanzelf (zet ze aan of uit).\n- … is niet gekoppeld (Instellingen → Zaak → Mailchimp en Klaviyo: verbinden en een lijst kiezen).\n- Deze actie is al aan het versturen.\n- Deze actie is al verstuurd.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Automatische berichten gaan vanzelf (zet ze aan of uit)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "De betaalterminal of een externe dienst gaf een fout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/menu/{artikelId}": {
      "get": {
        "tags": [
          "Acties"
        ],
        "operationId": "getBeheerMenuArtikelId",
        "summary": "menu's",
        "description": "menu's\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "artikelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "onderdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MenuOnderdeel"
                      }
                    }
                  },
                  "required": [
                    "onderdelen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Acties"
        ],
        "operationId": "postBeheerMenuArtikelId",
        "summary": "Alle onderdelen van een menu in één keer opslaan (leeg = geen menu meer)",
        "description": "Alle onderdelen van een menu in één keer opslaan (leeg = geen menu meer).\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "artikelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "onderdelen": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "naam": {},
                        "soort": {},
                        "artikelIds": {},
                        "groepId": {},
                        "aantal": {},
                        "gang": {},
                        "menuprijs": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "onderdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MenuOnderdeel"
                      }
                    }
                  },
                  "required": [
                    "onderdelen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Hooguit 12 onderdelen per menu.\n- Onderdeel …: ongeldig.\n- Onderdeel …: geef het een naam (bv. Voorgerecht).\n- …: aantal 1 tot 20.\n- …: gang 1 tot 9.\n- …: kies het product.\n- …: kies een productgroep of producten om uit te kiezen.\n- …: ongeldig deel van de menuprijs.\n- Een menu kan geen ander menu bevatten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Hooguit 12 onderdelen per menu."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/menubord": {
      "get": {
        "tags": [
          "menubord"
        ],
        "operationId": "getBeheerMenubord",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie113": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "titel": {
                      "type": "string",
                      "description": "Kop boven de kaart (leeg = de naam van de zaak)."
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Welke productgroepen, in deze volgorde (leeg = alle groepen in de volgorde van de kassa)."
                    },
                    "kolommen": {
                      "type": "number",
                      "description": "Zoveel kolommen naast elkaar (1-4)."
                    },
                    "thema": {
                      "type": "string",
                      "enum": [
                        "donker",
                        "licht"
                      ]
                    },
                    "uitverkocht": {
                      "type": "string",
                      "enum": [
                        "tonen",
                        "verbergen"
                      ],
                      "description": "Uitverkocht: doorgestreept met \"Uitverkocht\" tonen, of van het bord halen."
                    },
                    "fotos": {
                      "type": "boolean",
                      "description": "Productfoto's naast de producten (als die er zijn)."
                    },
                    "allergenen": {
                      "type": "boolean",
                      "description": "Allergenen klein onder het product."
                    },
                    "seconden": {
                      "type": "number",
                      "description": "Past niet alles op het scherm: zoveel seconden per pagina (5-120)."
                    }
                  },
                  "required": [
                    "migratie113",
                    "aan",
                    "titel",
                    "groepen",
                    "kolommen",
                    "thema",
                    "uitverkocht",
                    "fotos",
                    "allergenen",
                    "seconden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "menubord"
        ],
        "operationId": "postBeheerMenubord",
        "summary": "{ aan, titel, groepen, kolommen, thema, uitverkocht, fotos, allergenen, seconden } (alles optioneel)",
        "description": "{ aan, titel, groepen, kolommen, thema, uitverkocht, fotos, allergenen, seconden } (alles optioneel).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie113": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "titel": {
                      "type": "string",
                      "description": "Kop boven de kaart (leeg = de naam van de zaak)."
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Welke productgroepen, in deze volgorde (leeg = alle groepen in de volgorde van de kassa)."
                    },
                    "kolommen": {
                      "type": "number",
                      "description": "Zoveel kolommen naast elkaar (1-4)."
                    },
                    "thema": {
                      "type": "string",
                      "enum": [
                        "donker",
                        "licht"
                      ]
                    },
                    "uitverkocht": {
                      "type": "string",
                      "enum": [
                        "tonen",
                        "verbergen"
                      ],
                      "description": "Uitverkocht: doorgestreept met \"Uitverkocht\" tonen, of van het bord halen."
                    },
                    "fotos": {
                      "type": "boolean",
                      "description": "Productfoto's naast de producten (als die er zijn)."
                    },
                    "allergenen": {
                      "type": "boolean",
                      "description": "Allergenen klein onder het product."
                    },
                    "seconden": {
                      "type": "number",
                      "description": "Past niet alles op het scherm: zoveel seconden per pagina (5-120)."
                    }
                  },
                  "required": [
                    "migratie113",
                    "aan",
                    "titel",
                    "groepen",
                    "kolommen",
                    "thema",
                    "uitverkocht",
                    "fotos",
                    "allergenen",
                    "seconden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/muziek": {
      "get": {
        "tags": [
          "Muziek"
        ],
        "operationId": "getBeheerMuziek",
        "summary": "Aan/uit, de soorten koppelingen en de bronnen (zonder token of wachtwoord)",
        "description": "Aan/uit, de soorten koppelingen en de bronnen (zonder token of wachtwoord).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "soort",
                          "naam"
                        ]
                      }
                    },
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelIngevuld": {
                            "type": "boolean"
                          },
                          "zone": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "commandos": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "sleutelIngevuld",
                          "zone",
                          "commandos",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "soorten",
                    "bronnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postBeheerMuziek",
        "summary": "{ aan: true/false }",
        "description": "{ aan: true/false }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "soort",
                          "naam"
                        ]
                      }
                    },
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelIngevuld": {
                            "type": "boolean"
                          },
                          "zone": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "commandos": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "sleutelIngevuld",
                          "zone",
                          "commandos",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "soorten",
                    "bronnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/muziek/bronnen": {
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postBeheerMuziekBronnen",
        "summary": "Nieuwe bron: { naam, soort, adres, sleutel, zone: { id, naam }, commandos, volgorde }",
        "description": "Nieuwe bron: { naam, soort, adres, sleutel, zone: { id, naam }, commandos, volgorde }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "soort",
                          "naam"
                        ]
                      }
                    },
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelIngevuld": {
                            "type": "boolean"
                          },
                          "zone": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "commandos": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "sleutelIngevuld",
                          "zone",
                          "commandos",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "soorten",
                    "bronnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/muziek/bronnen/{id}": {
      "put": {
        "tags": [
          "Muziek"
        ],
        "operationId": "putBeheerMuziekBronnenId",
        "summary": "Bron wijzigen (sleutel leeg = houden, null = wissen)",
        "description": "Bron wijzigen (sleutel leeg = houden, null = wissen).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "soort",
                          "naam"
                        ]
                      }
                    },
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelIngevuld": {
                            "type": "boolean"
                          },
                          "zone": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "commandos": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "sleutelIngevuld",
                          "zone",
                          "commandos",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "soorten",
                    "bronnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Muziek"
        ],
        "operationId": "deleteBeheerMuziekBronnenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "soorten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "soort",
                          "naam"
                        ]
                      }
                    },
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "adres": {
                            "type": "string",
                            "nullable": true
                          },
                          "sleutelIngevuld": {
                            "type": "boolean"
                          },
                          "zone": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ],
                            "nullable": true
                          },
                          "commandos": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "adres",
                          "sleutelIngevuld",
                          "zone",
                          "commandos",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "soorten",
                    "bronnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/muziek/bronnen/{id}/test": {
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postBeheerMuziekBronnenIdTest",
        "summary": "Kan de kassa de bron bereiken?",
        "description": "Kan de kassa de bron bereiken? Geeft wat er nu speelt.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "status": {
                      "$ref": "#/components/schemas/MuziekStatus"
                    }
                  },
                  "required": [
                    "ok",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/muziek/soundtrack/zones": {
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postBeheerMuziekSoundtrackZones",
        "summary": "Soundtrack: de geluidszones bij { sleutel } (of { bron } voor het opgeslagen token)",
        "description": "Soundtrack: de geluidszones bij { sleutel } (of { bron } voor het opgeslagen token).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "zones": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    }
                  },
                  "required": [
                    "zones"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/oproep": {
      "get": {
        "tags": [
          "Oproepscherm"
        ],
        "operationId": "getBeheerOproep",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "migratie112": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "minuten": {
                      "type": "number"
                    },
                    "balie": {
                      "type": "boolean"
                    },
                    "naam": {
                      "type": "boolean"
                    },
                    "geluid": {
                      "type": "boolean"
                    },
                    "bezorgers": {
                      "type": "boolean",
                      "description": "Ook bestellingen die een bezorger van een platform ophaalt (migratie 109; standaard uit)."
                    },
                    "stem": {
                      "type": "boolean",
                      "description": "Een nieuw klaar nummer voorlezen (migratie 112; standaard uit)."
                    },
                    "stemTaal": {
                      "type": "string",
                      "enum": [
                        "nl",
                        "ar",
                        "de",
                        "en",
                        "es",
                        "fr",
                        "it",
                        "pl",
                        "pt",
                        "tr"
                      ]
                    },
                    "statusQr": {
                      "type": "boolean",
                      "description": "QR-code op de kassabon: de bestelstatus op de telefoon, via het beheerportaal (migratie 112; standaard uit)."
                    }
                  },
                  "required": [
                    "migratie",
                    "migratie112",
                    "portaal",
                    "aan",
                    "minuten",
                    "balie",
                    "naam",
                    "geluid",
                    "bezorgers",
                    "stem",
                    "stemTaal",
                    "statusQr"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Oproepscherm"
        ],
        "operationId": "postBeheerOproep",
        "summary": "{ aan, minuten, balie, naam, geluid } (alles optioneel)",
        "description": "{ aan, minuten, balie, naam, geluid } (alles optioneel).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "migratie112": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "minuten": {
                      "type": "number"
                    },
                    "balie": {
                      "type": "boolean"
                    },
                    "naam": {
                      "type": "boolean"
                    },
                    "geluid": {
                      "type": "boolean"
                    },
                    "bezorgers": {
                      "type": "boolean",
                      "description": "Ook bestellingen die een bezorger van een platform ophaalt (migratie 109; standaard uit)."
                    },
                    "stem": {
                      "type": "boolean",
                      "description": "Een nieuw klaar nummer voorlezen (migratie 112; standaard uit)."
                    },
                    "stemTaal": {
                      "type": "string",
                      "enum": [
                        "nl",
                        "ar",
                        "de",
                        "en",
                        "es",
                        "fr",
                        "it",
                        "pl",
                        "pt",
                        "tr"
                      ]
                    },
                    "statusQr": {
                      "type": "boolean",
                      "description": "QR-code op de kassabon: de bestelstatus op de telefoon, via het beheerportaal (migratie 112; standaard uit)."
                    }
                  },
                  "required": [
                    "migratie",
                    "migratie112",
                    "portaal",
                    "aan",
                    "minuten",
                    "balie",
                    "naam",
                    "geluid",
                    "bezorgers",
                    "stem",
                    "stemTaal",
                    "statusQr"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/optiegroepen": {
      "get": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "getBeheerOptiegroepen",
        "summary": "Keuzegroepen van een product (?artikelId=) of productgroep (?groepId=)",
        "description": "Keuzegroepen van een product (?artikelId=) of productgroep (?groepId=).\nBij een product ook die van zijn productgroep (alleen ter info).\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "artikelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groepId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "eigen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "vanGroep": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "groepNaam": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "eigen",
                        "vanGroep",
                        "groepNaam"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "eigen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          }
                        },
                        "vanGroep": {
                          "type": "array",
                          "items": {}
                        },
                        "groepNaam": {
                          "nullable": true
                        }
                      },
                      "required": [
                        "eigen",
                        "vanGroep",
                        "groepNaam"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geef een product of productgroep op.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef een product of productgroep op."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Mogelijke meldingen:\n- Product niet gevonden.\n- Productgroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerOptiegroepen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptiegroepInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een product óf een productgroep.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een product óf een productgroep."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/optiegroepen/{id}": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerOptiegroepenId",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptiegroepInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Keuzegroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Keuzegroep niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/optiegroepen/{id}/verwijderen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerOptiegroepenIdVerwijderen",
        "summary": "Verwijderen mag gewoon: bestelregels bewaren de gekozen opties (naam en prijs) zelf, dus oude bonnen en het…",
        "description": "Verwijderen mag gewoon: bestelregels bewaren de gekozen opties (naam en\nprijs) zelf, dus oude bonnen en het journaal blijven kloppen.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Keuzegroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Keuzegroep niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/pasje": {
      "get": {
        "tags": [
          "pasje"
        ],
        "operationId": "getBeheerPasje",
        "description": "**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie114": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie114",
                    "aan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag het personeel beheren.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag het personeel beheren."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "pasje"
        ],
        "operationId": "postBeheerPasje",
        "description": "**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie114": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie114",
                    "aan"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies aan of uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies aan of uit."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag het personeel beheren.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag het personeel beheren."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/personeel": {
      "get": {
        "tags": [
          "Personeel"
        ],
        "operationId": "getBeheerPersoneel",
        "summary": "Alle medewerkers, actieve eerst",
        "description": "Alle medewerkers, actieve eerst.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "medewerkers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "rol": {
                            "type": "string",
                            "enum": [
                              "bediening",
                              "manager",
                              "beheerder"
                            ]
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "rijksregisternummerIngesteld": {
                            "type": "boolean"
                          },
                          "taal": {
                            "type": "string",
                            "nullable": true
                          },
                          "pasIngesteld": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "rol",
                          "actief",
                          "rijksregisternummerIngesteld",
                          "taal",
                          "pasIngesteld"
                        ]
                      }
                    },
                    "pasAan": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "land",
                    "medewerkers",
                    "pasAan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag het personeel beheren.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag het personeel beheren."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Personeel"
        ],
        "operationId": "postBeheerPersoneel",
        "description": "**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MedewerkerInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "rol": {
                      "type": "string",
                      "enum": [
                        "bediening",
                        "manager",
                        "beheerder"
                      ]
                    },
                    "actief": {
                      "type": "boolean"
                    },
                    "rijksregisternummerIngesteld": {
                      "type": "boolean"
                    },
                    "taal": {
                      "type": "string",
                      "nullable": true
                    },
                    "pasIngesteld": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "naam",
                    "rol",
                    "actief",
                    "rijksregisternummerIngesteld",
                    "taal",
                    "pasIngesteld"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul een naam in.\n- Onbekende taal.\n- Kies een rol.\n- De pincode moet 4 tot 8 cijfers zijn.\n- Een rijksregisternummer heeft 11 cijfers.\n- Dit rijksregisternummer klopt niet; controleer de cijfers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een naam in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag het personeel beheren.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag het personeel beheren."
                }
              }
            }
          },
          "409": {
            "description": "Deze pincode wordt al door een andere medewerker gebruikt. Kies een andere.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze pincode wordt al door een andere medewerker gebruikt. Kies een andere."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/personeel/{id}": {
      "post": {
        "tags": [
          "Personeel"
        ],
        "operationId": "postBeheerPersoneelId",
        "description": "**Toegang:** Alleen voor de rol **beheerder**.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MedewerkerInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "rol": {
                      "type": "string",
                      "enum": [
                        "bediening",
                        "manager",
                        "beheerder"
                      ]
                    },
                    "actief": {
                      "type": "boolean"
                    },
                    "rijksregisternummerIngesteld": {
                      "type": "boolean"
                    },
                    "taal": {
                      "type": "string",
                      "nullable": true
                    },
                    "pasIngesteld": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "naam",
                    "rol",
                    "actief",
                    "rijksregisternummerIngesteld",
                    "taal",
                    "pasIngesteld"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Onbekende taal.\n- Vul een naam in.\n- Kies een rol.\n- De pincode moet 4 tot 8 cijfers zijn.\n- Een rijksregisternummer heeft 11 cijfers.\n- Dit rijksregisternummer klopt niet; controleer de cijfers.\n- Dit pasje kan de kassa niet lezen. Houd het nog eens tegen de lezer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende taal."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag het personeel beheren.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag het personeel beheren."
                }
              }
            }
          },
          "404": {
            "description": "Medewerker niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Medewerker niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Dit pasje is al gekoppeld aan …. Haal het daar eerst weg.\n- Dit is de laatste actieve beheerder. Maak eerst iemand anders beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit pasje is al gekoppeld aan …. Haal het daar eerst weg."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/plattegronden": {
      "get": {
        "tags": [
          "Plattegronden"
        ],
        "operationId": "getBeheerPlattegronden",
        "summary": "Alle plattegronden met hun tafels; per tafel ook of er een bestelling open staat",
        "description": "Alle plattegronden met hun tafels; per tafel ook of er een bestelling open staat.\n\n**Toegang:** Vereist recht `plattegronden_beheren` (Plattegronden en tafels beheren).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "maat": {
                      "type": "object",
                      "properties": {
                        "breedte": {
                          "type": "number",
                          "enum": [
                            1600
                          ]
                        },
                        "hoogte": {
                          "type": "number",
                          "enum": [
                            1000
                          ]
                        }
                      },
                      "required": [
                        "breedte",
                        "hoogte"
                      ]
                    },
                    "ruimtes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tafels": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                },
                                "breedte": {
                                  "type": "number"
                                },
                                "hoogte": {
                                  "type": "number"
                                },
                                "vorm": {
                                  "type": "string",
                                  "enum": [
                                    "rond",
                                    "vierkant"
                                  ]
                                },
                                "plaatsen": {
                                  "type": "number"
                                },
                                "ruimteId": {
                                  "type": "string"
                                },
                                "bezet": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "naam",
                                "x",
                                "y",
                                "breedte",
                                "hoogte",
                                "vorm",
                                "plaatsen",
                                "ruimteId",
                                "bezet"
                              ]
                            }
                          },
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "volgorde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "tafels",
                          "id",
                          "naam",
                          "volgorde"
                        ]
                      }
                    }
                  },
                  "required": [
                    "maat",
                    "ruimtes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rechten": {
      "get": {
        "tags": [
          "Rechten"
        ],
        "operationId": "getBeheerRechten",
        "description": "**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "groep": {
                            "type": "string"
                          },
                          "standaard": {
                            "type": "object",
                            "properties": {
                              "bediening": {
                                "type": "boolean"
                              },
                              "manager": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "bediening",
                              "manager"
                            ]
                          },
                          "bediening": {
                            "type": "boolean"
                          },
                          "manager": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "code",
                          "naam",
                          "groep",
                          "standaard",
                          "bediening",
                          "manager"
                        ]
                      }
                    }
                  },
                  "required": [
                    "rechten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag de rechten wijzigen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag de rechten wijzigen."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Rechten"
        ],
        "operationId": "postBeheerRechten",
        "summary": "Eén of meer rechten aan/uit zetten",
        "description": "Eén of meer rechten aan/uit zetten. Gelijk aan de standaard = rij weg.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "wijzigingen": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "rol": {
                          "type": "string"
                        },
                        "recht": {
                          "type": "string"
                        },
                        "aan": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "groep": {
                            "type": "string"
                          },
                          "standaard": {
                            "type": "object",
                            "properties": {
                              "bediening": {
                                "type": "boolean"
                              },
                              "manager": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "bediening",
                              "manager"
                            ]
                          },
                          "bediening": {
                            "type": "boolean"
                          },
                          "manager": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "code",
                          "naam",
                          "groep",
                          "standaard",
                          "bediening",
                          "manager"
                        ]
                      }
                    }
                  },
                  "required": [
                    "rechten"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige wijziging van rechten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige wijziging van rechten."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag de rechten wijzigen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag de rechten wijzigen."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rechten/standaard": {
      "post": {
        "tags": [
          "Rechten"
        ],
        "operationId": "postBeheerRechtenStandaard",
        "summary": "Alles terug naar de standaard",
        "description": "Alles terug naar de standaard.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "groep": {
                            "type": "string"
                          },
                          "standaard": {
                            "type": "object",
                            "properties": {
                              "bediening": {
                                "type": "boolean"
                              },
                              "manager": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "bediening",
                              "manager"
                            ]
                          },
                          "bediening": {
                            "type": "boolean"
                          },
                          "manager": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "code",
                          "naam",
                          "groep",
                          "standaard",
                          "bediening",
                          "manager"
                        ]
                      }
                    }
                  },
                  "required": [
                    "rechten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Alleen een beheerder mag de rechten wijzigen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een beheerder mag de rechten wijzigen."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rekeningklanten": {
      "get": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "getBeheerRekeningklanten",
        "summary": "Alle zakelijke klanten op rekening (ook inactieve), met openstaand, aantal open facturen en wat over de ver…",
        "description": "Alle zakelijke klanten op rekening (ook inactieve), met openstaand, aantal open facturen en wat over de vervaldatum is.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "klanten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RekeningKlant"
                      }
                    },
                    "bijgewerkt": {
                      "type": "boolean"
                    },
                    "kanalen": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "boolean"
                        },
                        "billit": {
                          "type": "boolean"
                        },
                        "http": {
                          "type": "boolean"
                        },
                        "billitSandbox": {
                          "type": "boolean"
                        },
                        "storecove": {
                          "type": "boolean"
                        },
                        "banqup": {
                          "type": "boolean"
                        },
                        "banqupSandbox": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "email",
                        "billit",
                        "http",
                        "billitSandbox",
                        "storecove",
                        "banqup",
                        "banqupSandbox"
                      ]
                    },
                    "webshop": {
                      "type": "boolean"
                    },
                    "klantcodes": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "klanten",
                    "bijgewerkt",
                    "kanalen",
                    "webshop",
                    "klantcodes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postBeheerRekeningklanten",
        "summary": "{ afnemer: { naam, adres, postcode, plaats, land, btwNummer, kvk, peppolId, email }, limiet (centen of null…",
        "description": "{ afnemer: { naam, adres, postcode, plaats, land, btwNummer, kvk, peppolId, email }, limiet (centen of null), betaaltermijn (dagen of null),\n  versturen, notitie, actief, verzamelfactuur (één factuur voor alle bonnen, bv. per maand; migratie 132) }\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "klant": {
                      "$ref": "#/components/schemas/RekeningKlant"
                    }
                  },
                  "required": [
                    "klant"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rekeningklanten/{id}": {
      "get": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "getBeheerRekeningklantenId",
        "summary": "Eén klant met zijn facturen op rekening",
        "description": "Eén klant met zijn facturen op rekening.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "klant": {
                      "$ref": "#/components/schemas/RekeningKlant"
                    },
                    "facturen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FactuurRij"
                      }
                    },
                    "tegoed": {
                      "type": "boolean"
                    },
                    "stortingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "methode",
                          "bedrag",
                          "door",
                          "op"
                        ]
                      }
                    },
                    "verzamelfactuur": {
                      "type": "boolean"
                    },
                    "posten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RekeningPost"
                      }
                    }
                  },
                  "required": [
                    "klant",
                    "facturen",
                    "tegoed",
                    "stortingen",
                    "verzamelfactuur",
                    "posten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postBeheerRekeningklantenId",
        "summary": "Wijzigen; niet meegestuurd = laten",
        "description": "Wijzigen; niet meegestuurd = laten.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "klant": {
                      "$ref": "#/components/schemas/RekeningKlant"
                    }
                  },
                  "required": [
                    "klant"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rekeningklanten/{id}/klantcode": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postBeheerRekeningklantenIdKlantcode",
        "summary": "Klantcode voor de webshop (migratie 108): nieuwe code maken (de oude vervalt)",
        "description": "Klantcode voor de webshop (migratie 108): nieuwe code maken (de oude vervalt). De code staat alleen in dit\nantwoord (de kassa bewaart de hash); geef hem door aan de klant.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "klantcode": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "klantcode"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rekeningklanten/{id}/klantcode/verwijderen": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postBeheerRekeningklantenIdKlantcodeVerwijderen",
        "summary": "Klantcode weghalen: deze klant kan niet meer online op rekening bestellen",
        "description": "Klantcode weghalen: deze klant kan niet meer online op rekening bestellen.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/rekeningklanten/{id}/verwijderen": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postBeheerRekeningklantenIdVerwijderen",
        "summary": "Verwijderen; heeft de klant facturen, dan wordt hij inactief en blijft alles bewaard",
        "description": "Verwijderen; heeft de klant facturen, dan wordt hij inactief en blijft alles bewaard.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "verwijderd": {
                      "type": "boolean"
                    },
                    "klant": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/RekeningKlant"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "verwijderd",
                    "klant"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reserveringsplatforms": {
      "get": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "getBeheerReserveringsplatforms",
        "summary": "Gekoppelde platforms (zonder geheimen) en welke platforms in het land van de zaak werken",
        "description": "Gekoppelde platforms (zonder geheimen) en welke platforms in het land van de zaak werken.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "platforms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResPlatformBron"
                      }
                    },
                    "beschikbaar": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResPlatform"
                      }
                    },
                    "alle": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResPlatform"
                      }
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    }
                  },
                  "required": [
                    "platforms",
                    "beschikbaar",
                    "alle",
                    "land"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "postBeheerReserveringsplatforms",
        "summary": "{ platform, naam, actief, instellingen: { restaurantUuid, clientId, terugUrl }, geheimen: { clientSecret, t…",
        "description": "{ platform, naam, actief, instellingen: { restaurantUuid, clientId, terugUrl }, geheimen: { clientSecret, terugSleutel } }; de sleutel komt alleen nu terug.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "platform": {
                      "$ref": "#/components/schemas/ResPlatformBron"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "platform"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reserveringsplatforms/{id}": {
      "post": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "postBeheerReserveringsplatformsId",
        "summary": "Idem wijzigen; geheimen leeg = houden, null = wissen; { nieuweSleutel: true } = nieuwe webhook-sleutel",
        "description": "Idem wijzigen; geheimen leeg = houden, null = wissen; { nieuweSleutel: true } = nieuwe webhook-sleutel.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "platform": {
                      "$ref": "#/components/schemas/ResPlatformBron"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "platform"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reserveringsplatforms/{id}/ophalen": {
      "post": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "postBeheerReserveringsplatformsIdOphalen",
        "summary": "TheFork: nu ophalen (vandaag tot en met 14 dagen vooruit)",
        "description": "TheFork: nu ophalen (vandaag tot en met 14 dagen vooruit).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResOntvangen"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Platform niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Platform niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Ophalen kan alleen bij TheFork; de andere platforms sturen zelf naar de kassa.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ophalen kan alleen bij TheFork; de andere platforms sturen zelf naar de kassa."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reserveringsplatforms/{id}/test": {
      "post": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "postBeheerReserveringsplatformsIdTest",
        "summary": "Test-reservering (zoals het platform hem zou sturen): { naam, personen, datum, tijd, tafel?",
        "description": "Test-reservering (zoals het platform hem zou sturen): { naam, personen, datum, tijd, tafel? }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResOntvangen"
                }
              }
            }
          },
          "400": {
            "description": "Vul een naam, het aantal personen, een datum en een tijd in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een naam, het aantal personen, een datum en een tijd in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Platform niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Platform niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reserveringsplatforms/{id}/verwijderen": {
      "post": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "postBeheerReserveringsplatformsIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "platforms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ResPlatformBron"
                      }
                    }
                  },
                  "required": [
                    "platforms"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Platform niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Platform niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reviewbeheer": {
      "get": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "getBeheerReviewbeheer",
        "summary": "Koppelingen (zonder geheimen), de platforms, het terugadres voor Google en welke apps van de leverancier he…",
        "description": "Koppelingen (zonder geheimen), de platforms, het terugadres voor Google en welke apps van de leverancier het portaal heeft.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReviewKoppeling"
                      }
                    },
                    "platforms": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReviewPlatformDef"
                      }
                    },
                    "redirectUri": {
                      "type": "string"
                    },
                    "portaal": {
                      "type": "object",
                      "properties": {
                        "google": {
                          "type": "boolean"
                        },
                        "trustpilot": {
                          "type": "boolean"
                        },
                        "redirectUri": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "google",
                        "trustpilot",
                        "redirectUri"
                      ]
                    }
                  },
                  "required": [
                    "aan",
                    "koppelingen",
                    "platforms",
                    "redirectUri",
                    "portaal"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postBeheerReviewbeheer",
        "summary": "{ platform, manier, actief, instellingen, geheimen }; geheimen leeg = houden, null = wissen",
        "description": "{ platform, manier, actief, instellingen, geheimen }; geheimen leeg = houden, null = wissen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewKoppeling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reviewbeheer/google/verbinden": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postBeheerReviewbeheerGoogleVerbinden",
        "summary": "Google: adres om in te loggen (op de kassa-pc openen, of het terugadres van GOOGLE_REVIEWS_REDIRECT_URI)",
        "description": "Google: adres om in te loggen (op de kassa-pc openen, of het terugadres van GOOGLE_REVIEWS_REDIRECT_URI).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reviewbeheer/{platform}/ophalen": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postBeheerReviewbeheerPlatformOphalen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nieuw": {
                      "type": "number"
                    },
                    "bijgewerkt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "nieuw",
                    "bijgewerkt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Koppeling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Koppeling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reviewbeheer/{platform}/verbinden": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postBeheerReviewbeheerPlatformVerbinden",
        "summary": "Inloggen bij Google of Trustpilot (via het portaal: app van de leverancier; de kassa wacht daarna zelf op d…",
        "description": "Inloggen bij Google of Trustpilot (via het portaal: app van de leverancier; de kassa wacht daarna zelf op de inlog).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Koppeling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Koppeling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/reviewbeheer/{platform}/verwijderen": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postBeheerReviewbeheerPlatformVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReviewKoppeling"
                      }
                    }
                  },
                  "required": [
                    "koppelingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Koppeling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Koppeling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ritplanning": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getBeheerRitplanning",
        "summary": "Ritplanning (migratie 098): { aan, maxStops, maxMin, snelheid, venster, perStop, dienst, url, sleutelIngest…",
        "description": "Ritplanning (migratie 098): { aan, maxStops, maxMin, snelheid, venster, perStop, dienst, url, sleutelIngesteld }.\nMet het recht \"Ritplanning instellen\" (standaard ook de manager) of \"Zaak, betalen en printers instellen\".\n\n**Toegang:** Controleert daarnaast: `ritplanning_instellen` (Ritplanning instellen (adressen per rit, reistijd, tijdvenster, snelheid)), `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "alles": {
                      "type": "boolean"
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "sleutelIngesteld": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string",
                      "nullable": true
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "maxStops": {
                      "type": "number"
                    },
                    "maxMin": {
                      "type": "number"
                    },
                    "snelheid": {
                      "type": "number"
                    },
                    "venster": {
                      "type": "number"
                    },
                    "perStop": {
                      "type": "number"
                    },
                    "dienst": {
                      "type": "string",
                      "enum": [
                        "schatting",
                        "osrm",
                        "openrouteservice"
                      ]
                    }
                  },
                  "required": [
                    "alles",
                    "migratie",
                    "sleutelIngesteld",
                    "url",
                    "aan",
                    "maxStops",
                    "maxMin",
                    "snelheid",
                    "venster",
                    "perStop",
                    "dienst"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postBeheerRitplanning",
        "summary": "{ aan?, maxStops?, maxMin?, snelheid?, venster?, perStop?, dienst?, url?, sleutel?",
        "description": "{ aan?, maxStops?, maxMin?, snelheid?, venster?, perStop?, dienst?, url?, sleutel? } (sleutel '' = weghalen).\nMet \"Ritplanning instellen\": alleen maxStops, maxMin, snelheid, venster en perStop; aan/uit en de routedienst\nalleen met \"Zaak, betalen en printers instellen\".\n\n**Toegang:** Controleert daarnaast: `instellingen_beheren` (Zaak, betalen en printers instellen), `ritplanning_instellen` (Ritplanning instellen (adressen per rit, reistijd, tijdvenster, snelheid)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "alles": {
                      "type": "boolean"
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "sleutelIngesteld": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string",
                      "nullable": true
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "maxStops": {
                      "type": "number"
                    },
                    "maxMin": {
                      "type": "number"
                    },
                    "snelheid": {
                      "type": "number"
                    },
                    "venster": {
                      "type": "number"
                    },
                    "perStop": {
                      "type": "number"
                    },
                    "dienst": {
                      "type": "string",
                      "enum": [
                        "schatting",
                        "osrm",
                        "openrouteservice"
                      ]
                    }
                  },
                  "required": [
                    "alles",
                    "migratie",
                    "sleutelIngesteld",
                    "url",
                    "aan",
                    "maxStops",
                    "maxMin",
                    "snelheid",
                    "venster",
                    "perStop",
                    "dienst"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ritplanning/test": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postBeheerRitplanningTest",
        "summary": "Routedienst testen: { ok, bron, km, min, fout }",
        "description": "Routedienst testen: { ok, bron, km, min, fout }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bron": {
                      "type": "string",
                      "enum": [
                        "schatting",
                        "osrm",
                        "openrouteservice"
                      ]
                    },
                    "km": {
                      "type": "number"
                    },
                    "min": {
                      "type": "number"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "bron",
                    "km",
                    "min",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ruimtes": {
      "post": {
        "tags": [
          "Plattegronden"
        ],
        "operationId": "postBeheerRuimtes",
        "description": "**Toegang:** Vereist recht `plattegronden_beheren` (Plattegronden en tafels beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Geef de plattegrond een naam, bv. \"Zaal\" of \"Terras\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef de plattegrond een naam, bv. \"Zaal\" of \"Terras\"."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ruimtes/{id}": {
      "post": {
        "tags": [
          "Plattegronden"
        ],
        "operationId": "postBeheerRuimtesId",
        "description": "**Toegang:** Vereist recht `plattegronden_beheren` (Plattegronden en tafels beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Geef de plattegrond een naam.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef de plattegrond een naam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Plattegrond niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Plattegrond niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ruimtes/{id}/tafels": {
      "post": {
        "tags": [
          "Plattegronden"
        ],
        "operationId": "postBeheerRuimtesIdTafels",
        "summary": "Alle tafels van één plattegrond opslaan zoals ze in de editor staan",
        "description": "Alle tafels van één plattegrond opslaan zoals ze in de editor staan.\nTafels zonder id zijn nieuw; bestaande tafels die ontbreken worden\nverwijderd.\n\n**Toegang:** Vereist recht `plattegronden_beheren` (Plattegronden en tafels beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tafels": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/TafelInvoer"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige tafellijst.\n- Tafel \"…\" staat twee keer op deze plattegrond.\n- Tafel \"…\" bestaat al op …. Kies een ander nummer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige tafellijst."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Plattegrond niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Plattegrond niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Tafel … heeft nog een open bestelling en kan niet weg. Reken die eerst af.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Tafel … heeft nog een open bestelling en kan niet weg. Reken die eerst af."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/ruimtes/{id}/verwijderen": {
      "post": {
        "tags": [
          "Plattegronden"
        ],
        "operationId": "postBeheerRuimtesIdVerwijderen",
        "description": "**Toegang:** Vereist recht `plattegronden_beheren` (Plattegronden en tafels beheren).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Plattegrond niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Plattegrond niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Op … staan nog bestellingen open (tafel …). Reken die eerst af.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Op … staan nog bestellingen open (tafel …). Reken die eerst af."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/salarisplanning": {
      "get": {
        "tags": [
          "Salaris en planning"
        ],
        "operationId": "getBeheerSalarisplanning",
        "summary": "Status van salaris en planning: gekozen pakket (of vast in .env), velden zonder geheimen, welke velden in .…",
        "description": "Status van salaris en planning: gekozen pakket (of vast in .env), velden\nzonder geheimen, welke velden in .env staan, personeelsnummers en\nmedewerkers (salaris), laatste keer verstuurd en laatste fout (planning).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "klokken": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aan",
                        "verplicht"
                      ]
                    },
                    "medewerkers": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {}
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ]
                          }
                        }
                      ]
                    },
                    "salaris": {
                      "type": "object",
                      "properties": {
                        "nummers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "pakket": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string",
                          "nullable": true
                        },
                        "pakketInEnv": {
                          "type": "boolean"
                        },
                        "velden": {
                          "type": "object",
                          "additionalProperties": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "boolean"
                              }
                            ]
                          }
                        },
                        "envVelden": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "laatsteSync": {
                          "type": "string",
                          "nullable": true
                        },
                        "laatsteFout": {
                          "type": "string",
                          "nullable": true
                        },
                        "verbonden": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "pakket",
                        "naam",
                        "pakketInEnv",
                        "velden",
                        "envVelden",
                        "laatsteSync",
                        "laatsteFout",
                        "verbonden"
                      ]
                    },
                    "planning": {
                      "type": "object",
                      "properties": {
                        "nummers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "pakket": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string",
                          "nullable": true
                        },
                        "pakketInEnv": {
                          "type": "boolean"
                        },
                        "velden": {
                          "type": "object",
                          "additionalProperties": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "boolean"
                              }
                            ]
                          }
                        },
                        "envVelden": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "laatsteSync": {
                          "type": "string",
                          "nullable": true
                        },
                        "laatsteFout": {
                          "type": "string",
                          "nullable": true
                        },
                        "verbonden": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "pakket",
                        "naam",
                        "pakketInEnv",
                        "velden",
                        "envVelden",
                        "laatsteSync",
                        "laatsteFout",
                        "verbonden"
                      ]
                    }
                  },
                  "required": [
                    "land",
                    "klokken",
                    "medewerkers",
                    "salaris",
                    "planning"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/salarisplanning/gegevens": {
      "get": {
        "tags": [
          "Salaris en planning"
        ],
        "operationId": "getBeheerSalarisplanningGegevens",
        "summary": "Uren (per medewerker per dag) en omzet (per dag en uur) van een periode, voor de bestanden",
        "description": "Uren (per medewerker per dag) en omzet (per dag en uur) van een periode, voor de bestanden.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "uren": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UrenRegel"
                      }
                    },
                    "omzet": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OmzetRegel"
                      }
                    }
                  },
                  "required": [
                    "van",
                    "tot",
                    "uren",
                    "omzet"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige periode (van tot en met tot).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van tot en met tot)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/salarisplanning/koppeling": {
      "post": {
        "tags": [
          "Salaris en planning"
        ],
        "operationId": "postBeheerSalarisplanningKoppeling",
        "summary": "Keuze, velden en (salaris) personeelsnummers opslaan",
        "description": "Keuze, velden en (salaris) personeelsnummers opslaan.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {},
                  "pakket": {},
                  "velden": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "nummers": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "pakket": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "pakket"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies salaris of planning.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies salaris of planning."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/salarisplanning/planning/verbinden": {
      "post": {
        "tags": [
          "Salaris en planning"
        ],
        "operationId": "postBeheerSalarisplanningPlanningVerbinden",
        "summary": "Live planningssysteem (Dyflexis, Shiftbase): verbinden/controleren",
        "description": "Live planningssysteem (Dyflexis, Shiftbase): verbinden/controleren.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "melding": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "melding"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/salarisplanning/planning/versturen": {
      "post": {
        "tags": [
          "Salaris en planning"
        ],
        "operationId": "postBeheerSalarisplanningPlanningVersturen",
        "summary": "Nu de omzet versturen (anders elk uur vanzelf)",
        "description": "Nu de omzet versturen (anders elk uur vanzelf).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "dagen": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "dagen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kies eerst Deputy, Dyflexis of Shiftbase als planningssysteem.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies eerst Deputy, Dyflexis of Shiftbase als planningssysteem."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/scanner": {
      "get": {
        "tags": [
          "scanner"
        ],
        "operationId": "getBeheerScanner",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "product": {
                      "type": "boolean"
                    },
                    "kortingscode": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "cadeaubon": {
                      "type": "boolean"
                    },
                    "migratie117": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "product",
                    "kortingscode",
                    "klantenkaart",
                    "cadeaubon",
                    "migratie117"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "scanner"
        ],
        "operationId": "postBeheerScanner",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "product": {
                      "type": "boolean"
                    },
                    "kortingscode": {
                      "type": "boolean"
                    },
                    "klantenkaart": {
                      "type": "boolean"
                    },
                    "cadeaubon": {
                      "type": "boolean"
                    },
                    "migratie117": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "product",
                    "kortingscode",
                    "klantenkaart",
                    "cadeaubon",
                    "migratie117"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/scanner/test": {
      "post": {
        "tags": [
          "scanner"
        ],
        "operationId": "postBeheerScannerTest",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "product"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "artikelId": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "artikelId",
                        "naam"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "kortingscode"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "omschrijving": {
                          "type": "string",
                          "nullable": true
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "omschrijving"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "klant"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "klantId": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "klantId",
                        "naam"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "cadeaubon"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "saldo": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "saldo"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "onbekend"
                          ]
                        },
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Lege scan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Lege scan."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "429": {
            "description": "Te veel scans achter elkaar. Wacht een minuut.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Te veel scans achter elkaar. Wacht een minuut."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/signalering": {
      "get": {
        "tags": [
          "Signalering"
        ],
        "operationId": "getBeheerSignalering",
        "description": "**Toegang:** Controleert daarnaast: `signalering_instellen` (Signalering instellen (fraude en afwijkingen: drempels en meldingen)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignaleringBeheer"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Signalering"
        ],
        "operationId": "postBeheerSignalering",
        "description": "**Toegang:** Controleert daarnaast: `signalering_instellen` (Signalering instellen (fraude en afwijkingen: drempels en meldingen)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignaleringBeheer"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/signalering/controleer": {
      "post": {
        "tags": [
          "Signalering"
        ],
        "operationId": "postBeheerSignaleringControleer",
        "summary": "Nu controleren (anders elke 5 minuten)",
        "description": "Nu controleren (anders elke 5 minuten).\n\n**Toegang:** Controleert daarnaast: `signalering_instellen` (Signalering instellen (fraude en afwijkingen: drempels en meldingen)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nieuw": {
                      "type": "number"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "nieuw",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/signalering/test": {
      "post": {
        "tags": [
          "Signalering"
        ],
        "operationId": "postBeheerSignaleringTest",
        "summary": "Testbericht via een kanaal (mail, sms, ntfy, pushover, telegram, webhook)",
        "description": "Testbericht via een kanaal (mail, sms, ntfy, pushover, telegram, webhook).\n\n**Toegang:** Controleert daarnaast: `signalering_instellen` (Signalering instellen (fraude en afwijkingen: drempels en meldingen)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kanaal": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/sparen-reviews": {
      "get": {
        "tags": [
          "spaarreview"
        ],
        "operationId": "getBeheerSparenReviews",
        "summary": "Instellingen (zonder geheimen) en welke spaarprogramma's in het land van de zaak werken",
        "description": "Instellingen (zonder geheimen) en welke spaarprogramma's in het land van de zaak werken.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "beschikbaar": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpaarPlatformDef"
                      }
                    },
                    "alle": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpaarPlatformDef"
                      }
                    },
                    "spaarpartner": {
                      "type": "boolean"
                    },
                    "reviews": {
                      "type": "boolean"
                    },
                    "land": {
                      "type": "string"
                    },
                    "spaar": {
                      "type": "object",
                      "properties": {
                        "platform": {
                          "type": "string",
                          "enum": [
                            "piggy",
                            "joyn"
                          ],
                          "nullable": true
                        },
                        "manier": {
                          "type": "string",
                          "enum": [
                            "api",
                            "qr"
                          ]
                        },
                        "instellingen": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "geheimIngevuld": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        },
                        "opBon": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "platform",
                        "manier",
                        "instellingen",
                        "geheimIngevuld",
                        "opBon"
                      ],
                      "description": "het eerste spaarprogramma (zoals voor migratie 107)"
                    },
                    "platformen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "string",
                            "enum": [
                              "piggy",
                              "joyn"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "manier": {
                            "type": "string",
                            "enum": [
                              "api",
                              "qr"
                            ]
                          },
                          "instellingen": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "geheimIngevuld": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "boolean"
                            }
                          }
                        },
                        "required": [
                          "platform",
                          "naam",
                          "manier",
                          "instellingen",
                          "geheimIngevuld"
                        ]
                      },
                      "description": "migratie 107: alle spaarprogramma's (meer tegelijk)"
                    },
                    "meerTegelijk": {
                      "type": "boolean",
                      "description": "kan de kassa meer spaarprogramma's tegelijk (migratie 107)"
                    },
                    "review": {
                      "type": "object",
                      "properties": {
                        "google": {
                          "type": "string"
                        },
                        "trustpilot": {
                          "type": "string"
                        },
                        "trustpilotBcc": {
                          "type": "string"
                        },
                        "naUur": {
                          "type": "number"
                        },
                        "dagen": {
                          "type": "number"
                        },
                        "opBon": {
                          "type": "boolean"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReviewLink"
                          }
                        }
                      },
                      "required": [
                        "google",
                        "trustpilot",
                        "trustpilotBcc",
                        "naUur",
                        "dagen",
                        "opBon",
                        "links"
                      ]
                    },
                    "mailIngesteld": {
                      "type": "boolean"
                    },
                    "wachtend": {
                      "type": "number",
                      "description": "reviewmails die nog wachten en die de afgelopen 30 dagen verstuurd zijn"
                    },
                    "verstuurd30": {
                      "type": "number"
                    },
                    "laatsteFout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "beschikbaar",
                    "alle",
                    "spaarpartner",
                    "reviews",
                    "land",
                    "spaar",
                    "platformen",
                    "meerTegelijk",
                    "review",
                    "mailIngesteld",
                    "wachtend",
                    "verstuurd30",
                    "laatsteFout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "spaarreview"
        ],
        "operationId": "postBeheerSparenReviews",
        "summary": "{ spaar: { platform: 'piggy'|'joyn'|null, manier: 'qr'|'api', instellingen, geheimen, opBon }, review: { go…",
        "description": "{ spaar: { platform: 'piggy'|'joyn'|null, manier: 'qr'|'api', instellingen, geheimen, opBon },\n  review: { google, trustpilot, trustpilotBcc, naUur, dagen, opBon } }; geheimen leeg = houden, null = wissen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "beschikbaar": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpaarPlatformDef"
                      }
                    },
                    "alle": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpaarPlatformDef"
                      }
                    },
                    "spaarpartner": {
                      "type": "boolean"
                    },
                    "reviews": {
                      "type": "boolean"
                    },
                    "land": {
                      "type": "string"
                    },
                    "spaar": {
                      "type": "object",
                      "properties": {
                        "platform": {
                          "type": "string",
                          "enum": [
                            "piggy",
                            "joyn"
                          ],
                          "nullable": true
                        },
                        "manier": {
                          "type": "string",
                          "enum": [
                            "api",
                            "qr"
                          ]
                        },
                        "instellingen": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "geheimIngevuld": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "boolean"
                          }
                        },
                        "opBon": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "platform",
                        "manier",
                        "instellingen",
                        "geheimIngevuld",
                        "opBon"
                      ],
                      "description": "het eerste spaarprogramma (zoals voor migratie 107)"
                    },
                    "platformen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "string",
                            "enum": [
                              "piggy",
                              "joyn"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "manier": {
                            "type": "string",
                            "enum": [
                              "api",
                              "qr"
                            ]
                          },
                          "instellingen": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string"
                            }
                          },
                          "geheimIngevuld": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "boolean"
                            }
                          }
                        },
                        "required": [
                          "platform",
                          "naam",
                          "manier",
                          "instellingen",
                          "geheimIngevuld"
                        ]
                      },
                      "description": "migratie 107: alle spaarprogramma's (meer tegelijk)"
                    },
                    "meerTegelijk": {
                      "type": "boolean",
                      "description": "kan de kassa meer spaarprogramma's tegelijk (migratie 107)"
                    },
                    "review": {
                      "type": "object",
                      "properties": {
                        "google": {
                          "type": "string"
                        },
                        "trustpilot": {
                          "type": "string"
                        },
                        "trustpilotBcc": {
                          "type": "string"
                        },
                        "naUur": {
                          "type": "number"
                        },
                        "dagen": {
                          "type": "number"
                        },
                        "opBon": {
                          "type": "boolean"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReviewLink"
                          }
                        }
                      },
                      "required": [
                        "google",
                        "trustpilot",
                        "trustpilotBcc",
                        "naUur",
                        "dagen",
                        "opBon",
                        "links"
                      ]
                    },
                    "mailIngesteld": {
                      "type": "boolean"
                    },
                    "wachtend": {
                      "type": "number",
                      "description": "reviewmails die nog wachten en die de afgelopen 30 dagen verstuurd zijn"
                    },
                    "verstuurd30": {
                      "type": "number"
                    },
                    "laatsteFout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "beschikbaar",
                    "alle",
                    "spaarpartner",
                    "reviews",
                    "land",
                    "spaar",
                    "platformen",
                    "meerTegelijk",
                    "review",
                    "mailIngesteld",
                    "wachtend",
                    "verstuurd30",
                    "laatsteFout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/sparen-reviews/test-sparen": {
      "post": {
        "tags": [
          "spaarreview"
        ],
        "operationId": "postBeheerSparenReviewsTestSparen",
        "summary": "Voorbeeld-spaarlink (€ 10) om te controleren of de gegevens kloppen",
        "description": "Voorbeeld-spaarlink (€ 10) om te controleren of de gegevens kloppen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "platform": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "nullable": true
                    },
                    "melding": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "url",
                    "melding",
                    "platform"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/sparen-reviews/voorbeeld": {
      "get": {
        "tags": [
          "spaarreview"
        ],
        "operationId": "getBeheerSparenReviewsVoorbeeld",
        "summary": "Voorbeeld van de reviewmail (onderwerp en tekst) in de taal van de bon",
        "description": "Voorbeeld van de reviewmail (onderwerp en tekst) in de taal van de bon.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "onderwerp": {
                      "type": "string"
                    },
                    "tekst": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "onderwerp",
                    "tekst"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/sparen-reviews/wachtende-wissen": {
      "post": {
        "tags": [
          "spaarreview"
        ],
        "operationId": "postBeheerSparenReviewsWachtendeWissen",
        "summary": "Wachtende reviewmails niet meer versturen (de e-mailadressen gaan meteen weg)",
        "description": "Wachtende reviewmails niet meer versturen (de e-mailadressen gaan meteen weg).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gewist": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "gewist"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/stempelkaarten": {
      "get": {
        "tags": [
          "Klanten"
        ],
        "operationId": "getBeheerStempelkaarten",
        "summary": "Stempelkaarten: welk product, na hoeveel stuks één gratis",
        "description": "Stempelkaarten: welk product, na hoeveel stuks één gratis.\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Klanten"
        ],
        "operationId": "postBeheerStempelkaarten",
        "summary": "Stempelkaart instellen (nodig 2..100) of weghalen (nodig 0)",
        "description": "Stempelkaart instellen (nodig 2..100) of weghalen (nodig 0).\n\n**Toegang:** Vereist recht `klanten_beheren` (Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "artikelId": {
                    "type": "string"
                  },
                  "nodig": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een product.\n- Aantal stuks voor een gratis: 2 tot 100.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een product."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tablets": {
      "get": {
        "tags": [
          "Tablets"
        ],
        "operationId": "getBeheerTablets",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "tablets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TabletRij"
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "tablets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Tablets"
        ],
        "operationId": "postBeheerTablets",
        "summary": "{ aan: true/false }",
        "description": "{ aan: true/false }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "tablets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TabletRij"
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "tablets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tablets/{id}": {
      "put": {
        "tags": [
          "Tablets"
        ],
        "operationId": "putBeheerTabletsId",
        "summary": "Andere naam: { naam }",
        "description": "Andere naam: { naam }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "tablets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TabletRij"
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "tablets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Tablets"
        ],
        "operationId": "deleteBeheerTabletsId",
        "summary": "Weghalen (de tablet moet dan opnieuw gekoppeld worden)",
        "description": "Weghalen (de tablet moet dan opnieuw gekoppeld worden).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "tablets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TabletRij"
                      }
                    }
                  },
                  "required": [
                    "migratie",
                    "aan",
                    "tablets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap": {
      "get": {
        "tags": [
          "tap"
        ],
        "operationId": "getBeheerTap",
        "summary": "Bronnen (zonder sleutels), kranen en de lijst met merken en voorinstellingen",
        "description": "Bronnen (zonder sleutels), kranen en de lijst met merken en voorinstellingen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapBron"
                      }
                    },
                    "kranen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapKraan"
                      }
                    },
                    "merken": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapMerk"
                      }
                    }
                  },
                  "required": [
                    "bronnen",
                    "kranen",
                    "merken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/bronnen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapBronnen",
        "summary": "{ naam, merk, koppeling: webhook|tcp|serieel|map, instellingen, actief }; de sleutel komt alleen nu terug",
        "description": "{ naam, merk, koppeling: webhook|tcp|serieel|map, instellingen, actief }; de sleutel komt alleen nu terug.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bron": {
                      "$ref": "#/components/schemas/TapBron"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "bron"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/bronnen/{id}": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapBronnenId",
        "summary": "Idem wijzigen; { nieuweSleutel: true } maakt een nieuwe sleutel (de oude werkt dan niet meer)",
        "description": "Idem wijzigen; { nieuweSleutel: true } maakt een nieuwe sleutel (de oude werkt dan niet meer).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bron": {
                      "$ref": "#/components/schemas/TapBron"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "bron"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/bronnen/{id}/koppelen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapBronnenIdKoppelen",
        "summary": "Kegboard: { besluit: toestaan|weigeren|verbreken } voor het bord dat zich bij deze bron meldde",
        "description": "Kegboard: { besluit: toestaan|weigeren|verbreken } voor het bord dat zich bij deze bron meldde.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bron": {
                      "$ref": "#/components/schemas/TapBron"
                    }
                  },
                  "required": [
                    "bron"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/bronnen/{id}/map-lezen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapBronnenIdMapLezen",
        "summary": "Map nu lezen (bij koppeling map)",
        "description": "Map nu lezen (bij koppeling map).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gelezen": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "gelezen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Bron niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bron niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/bronnen/{id}/test": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapBronnenIdTest",
        "summary": "Test-tap (zoals de tapcomputer hem zou sturen): { kraan, ml?, porties?, tafel?",
        "description": "Test-tap (zoals de tapcomputer hem zou sturen): { kraan, ml?, porties?, tafel? }.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ontvangen"
                }
              }
            }
          },
          "400": {
            "description": "Vul een kraan (of PLU) en eventueel ml in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een kraan (of PLU) en eventueel ml in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Bron niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bron niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/bronnen/{id}/verwijderen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapBronnenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapBron"
                      }
                    },
                    "kranen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapKraan"
                      }
                    }
                  },
                  "required": [
                    "bronnen",
                    "kranen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Bron niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bron niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/kranen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapKranen",
        "summary": "{ bronId, code, naam, artikelId, modus: portie|liter, portieMl, drempel }",
        "description": "{ bronId, code, naam, artikelId, modus: portie|liter, portieMl, drempel }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kranen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapKraan"
                      }
                    },
                    "kraan": {
                      "$ref": "#/components/schemas/TapKraan"
                    }
                  },
                  "required": [
                    "kranen",
                    "kraan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/kranen/{id}": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapKranenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kranen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapKraan"
                      }
                    },
                    "kraan": {
                      "$ref": "#/components/schemas/TapKraan"
                    }
                  },
                  "required": [
                    "kranen",
                    "kraan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/kranen/{id}/test-vrijgave": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapKranenIdTestVrijgave",
        "summary": "Gedoseerd tappen testen: één glas vrijgeven zonder bon (in het logboek)",
        "description": "Gedoseerd tappen testen: één glas vrijgeven zonder bon (in het logboek).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/kranen/{id}/verwijderen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postBeheerTapKranenIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kranen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapKraan"
                      }
                    }
                  },
                  "required": [
                    "kranen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Kraan niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kraan niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tap/overzicht": {
      "get": {
        "tags": [
          "tap"
        ],
        "operationId": "getBeheerTapOverzicht",
        "summary": "Getapt, op de bon, afgekeurd, geannuleerd en nog open per kraan: ?van&tot (JJJJ-MM-DD); met CSV",
        "description": "Getapt, op de bon, afgekeurd, geannuleerd en nog open per kraan: ?van&tot (JJJJ-MM-DD); met CSV.\n\n**Toegang:** Vereist recht `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kranen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapOverzichtRij"
                      }
                    },
                    "totaal": {
                      "type": "object",
                      "properties": {
                        "taps": {
                          "type": "number"
                        },
                        "getaptMl": {
                          "type": "number"
                        },
                        "geboektMl": {
                          "type": "number"
                        },
                        "afgekeurdMl": {
                          "type": "number"
                        },
                        "openMl": {
                          "type": "number"
                        },
                        "geannuleerdMl": {
                          "type": "number",
                          "description": "op een bon gezet maar daarna geannuleerd (storno): wel getapt, niet verkocht"
                        },
                        "afgekeurdPerReden": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "number"
                          }
                        }
                      },
                      "required": [
                        "taps",
                        "getaptMl",
                        "geboektMl",
                        "afgekeurdMl",
                        "openMl",
                        "geannuleerdMl",
                        "afgekeurdPerReden"
                      ]
                    },
                    "csv": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kranen",
                    "totaal",
                    "csv"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige periode (van en tot, hooguit een jaar).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van en tot, hooguit een jaar)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: omzet per periode. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/tegoed": {
      "get": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "getBeheerTegoed",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie116": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "terugbetalen": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "number"
                    },
                    "cadeaubonSaldo": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "migratie116",
                    "aan",
                    "terugbetalen",
                    "max",
                    "cadeaubonSaldo"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "postBeheerTegoed",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "terugbetalen": {
                      "type": "boolean",
                      "description": "restant contant terugbetalen aan de kassa"
                    },
                    "max": {
                      "type": "number",
                      "description": "hoogste saldo per bon of pas, in centen"
                    },
                    "cadeaubonSaldo": {
                      "type": "boolean"
                    },
                    "migratie116": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "terugbetalen",
                    "max",
                    "cadeaubonSaldo",
                    "migratie116"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/telaat": {
      "get": {
        "tags": [
          "Te laat"
        ],
        "operationId": "getBeheerTelaat",
        "summary": "De instelling, en wat er ingesteld is om een excuus te kunnen sturen (sms, e-mail, kortingscodes)",
        "description": "De instelling, en wat er ingesteld is om een excuus te kunnen sturen (sms, e-mail, kortingscodes).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "instelling": {
                      "$ref": "#/components/schemas/TeLaatInstelling"
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "sms": {
                      "type": "boolean"
                    },
                    "mail": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "instelling",
                    "migratie",
                    "sms",
                    "mail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Te laat"
        ],
        "operationId": "postBeheerTelaat",
        "summary": "{ aan, minuten, bericht: uit|vragen|automatisch, tegoed: { soort, waarde, dagen } | null, tekst }",
        "description": "{ aan, minuten, bericht: uit|vragen|automatisch, tegoed: { soort, waarde, dagen } | null, tekst }\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "instelling": {
                      "$ref": "#/components/schemas/TeLaatInstelling"
                    }
                  },
                  "required": [
                    "instelling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/telefonie": {
      "get": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "getBeheerTelefonie",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelefonieBeheer"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "postBeheerTelefonie",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelefonieBeheer"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/telefonie/test": {
      "post": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "postBeheerTelefonieTest",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nummer": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "oproep": {
                      "$ref": "#/components/schemas/Oproep"
                    }
                  },
                  "required": [
                    "oproep"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/terminals": {
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postBeheerTerminals",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {},
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/terminals/{id}": {
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postBeheerTerminalsId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Terminal niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Terminal niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/terminals/{id}/test": {
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postBeheerTerminalsIdTest",
        "summary": "Verbinding testen met de opgeslagen sleutel (of met testmodus)",
        "description": "Verbinding testen met de opgeslagen sleutel (of met testmodus).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "melding": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "melding"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "fout"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Terminal niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Terminal niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/terminals/{id}/verwijderen": {
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postBeheerTerminalsIdVerwijderen",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Terminal niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Terminal niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/aanmelden": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdAanmelden",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jetRestaurant": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Koppeling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/afmelden": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdAfmelden",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Koppeling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/instellingen": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdInstellingen",
        "summary": "beheer",
        "description": "beheer",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {},
                  "menuAuto": {},
                  "werkbon": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThuisbezorgdInstelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/menu": {
      "get": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "getBeheerThuisbezorgdMenu",
        "summary": "Voorbeeld van het menu zoals het naar Thuisbezorgd gaat",
        "description": "Voorbeeld van het menu zoals het naar Thuisbezorgd gaat.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menus": {
                      "type": "array",
                      "items": {}
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "uitverkocht": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "menus",
                    "aantal",
                    "uitverkocht"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdMenu",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "aantal",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/open": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdOpen",
        "summary": "Zaak open of tijdelijk dicht voor Thuisbezorgd (dicht = tot weerOpenOp, in NL/BE hooguit tot 07:00 de volge…",
        "description": "Zaak open of tijdelijk dicht voor Thuisbezorgd (dicht = tot weerOpenOp, in NL/BE hooguit tot 07:00 de volgende dag).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "open": {},
                  "weerOpenOp": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "open": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "open"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/producten": {
      "get": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "getBeheerThuisbezorgdProducten",
        "summary": "Welke producten bestelbaar zijn via Thuisbezorgd (alle actieve producten, per groep)",
        "description": "Welke producten bestelbaar zijn via Thuisbezorgd (alle actieve producten, per groep).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdProducten",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "artikelIds": {},
                  "aan": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "aantal"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies producten en aan of uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies producten en aan of uit."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/producten/{id}/omschrijving": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdProductenIdOmschrijving",
        "summary": "Omschrijving van een product op Thuisbezorgd (hooguit 500 tekens; leeg = geen)",
        "description": "Omschrijving van een product op Thuisbezorgd (hooguit 500 tekens; leeg = geen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "omschrijving": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "omschrijving": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "omschrijving"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Omschrijving is tekst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Omschrijving is tekst."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/tijden": {
      "get": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "getBeheerThuisbezorgdTijden",
        "summary": "Openingstijden voor Thuisbezorgd (bezorgen en afhalen apart); null = niet van de kassa uit beheren",
        "description": "Openingstijden voor Thuisbezorgd (bezorgen en afhalen apart); null = niet van de kassa uit beheren.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tijden": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Tijden"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "tijden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdTijden",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tijden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "verstuurd": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "tijden": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Tijden"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "verstuurd",
                    "fout",
                    "ok",
                    "tijden"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/thuisbezorgd/vernieuwen": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postBeheerThuisbezorgdVernieuwen",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Koppeling"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/valuta": {
      "get": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "getBeheerValuta",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie116": {
                      "type": "boolean"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "valuta": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "koers": {
                            "type": "number"
                          },
                          "live": {
                            "type": "boolean"
                          },
                          "bijgewerkt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "code",
                          "koers"
                        ]
                      }
                    },
                    "opslag": {
                      "type": "number"
                    },
                    "munten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "migratie116",
                    "aan",
                    "valuta",
                    "opslag",
                    "munten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "postBeheerValuta",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "munten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "valuta": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "koers": {
                            "type": "number"
                          },
                          "live": {
                            "type": "boolean"
                          },
                          "bijgewerkt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "code",
                          "koers"
                        ]
                      },
                      "description": "koers = euro voor 1 eenheid van die munt; live = koers van de ECB (bijgewerkt = wanneer opgehaald)"
                    },
                    "opslag": {
                      "type": "number",
                      "description": "opslag in procent op live koersen (0-20): de koers wordt zoveel procent lager"
                    },
                    "migratie116": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "munten",
                    "aan",
                    "valuta",
                    "opslag",
                    "migratie116"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/valuta/bijwerken": {
      "post": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "postBeheerValutaBijwerken",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "munten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "valuta": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "koers": {
                            "type": "number"
                          },
                          "live": {
                            "type": "boolean"
                          },
                          "bijgewerkt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "code",
                          "koers"
                        ]
                      },
                      "description": "koers = euro voor 1 eenheid van die munt; live = koers van de ECB (bijgewerkt = wanneer opgehaald)"
                    },
                    "opslag": {
                      "type": "number",
                      "description": "opslag in procent op live koersen (0-20): de koers wordt zoveel procent lager"
                    },
                    "migratie116": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "munten",
                    "aan",
                    "valuta",
                    "opslag",
                    "migratie116"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Er staat geen munt op een live koers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Er staat geen munt op een live koers."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Koersen ophalen lukte niet: … De laatste koersen blijven staan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Koersen ophalen lukte niet: … De laatste koersen blijven staan."
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/vestiging": {
      "get": {
        "tags": [
          "Zaak"
        ],
        "operationId": "getBeheerVestiging",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gksMaaltijdOmzet": {
                      "type": "number",
                      "description": "Alleen in Instellingen → Zaak (België): maaltijden ter plaatse (btw 12%) in de laatste 12 maanden, excl. btw, in centen."
                    },
                    "vestigingsnummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "juridischeNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "btwNummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "gksPlichtig": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "België (migratie 135): GKS-plichtig? null = nog niet gekozen (dan kan de zaak niet afrekenen), true = alleen\r\nafrekenen met een werkende zwarte doos (GKS 2.0), false = niet GKS-plichtig (verklaring van de beheerder)."
                    },
                    "gksVerklaringOp": {
                      "type": "string",
                      "nullable": true,
                      "description": "Wanneer de keuze (bij \"nee\": de verklaring) is gedaan (ISO); elk jaar opnieuw te bevestigen."
                    },
                    "fiscaalDemo": {
                      "type": "boolean",
                      "description": "Demo- of testzaak: de nagebootste zwarte doos (FISCAL_MODE=mock) mag. Nooit bij een echte zaak."
                    },
                    "adres": {
                      "type": "string",
                      "nullable": true
                    },
                    "postcode": {
                      "type": "string",
                      "nullable": true
                    },
                    "plaats": {
                      "type": "string",
                      "nullable": true
                    },
                    "telefoon": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "nullable": true,
                      "description": "E-mailadres van de zaak (niet op de bon; o.a. voor het beheerportaal van Pin Voordeel)."
                    },
                    "gksProductienummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "bonVoettekst": {
                      "type": "string",
                      "nullable": true,
                      "description": "Tekst onderaan de kassabon (meerdere regels mogen).\r\nnull/undefined = STANDAARD_BONVOETTEKST, '' = geen tekst."
                    },
                    "bonTaal": {
                      "type": "string",
                      "nullable": true,
                      "description": "Taal van de vaste teksten op de kassabon (migratie 052; alleen Latijns schrift,\r\nzie packages/printing/src/bontaal.ts). null/undefined = Nederlands.\r\nLos van de taal van de schermen."
                    },
                    "contantAfronden": {
                      "type": "boolean",
                      "description": "Contante betalingen afronden op 5 cent (standaard uit)."
                    },
                    "fooi": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/FooiInstelling"
                        }
                      ],
                      "description": "Fooiknoppen bij afrekenen (ontbreekt = STANDAARD_FOOI)."
                    },
                    "klokken": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aan",
                        "verplicht"
                      ],
                      "description": "In- en uitklokken van personeel (ontbreekt = 'uit')."
                    },
                    "allergenen": {
                      "type": "boolean",
                      "description": "Allergenen per product tonen en invullen (standaard uit)."
                    },
                    "happyhour": {
                      "type": "boolean",
                      "description": "Happy hour gebruiken (standaard uit)."
                    },
                    "menus": {
                      "type": "boolean",
                      "description": "Menu's gebruiken (standaard uit)."
                    },
                    "dagdelen": {
                      "type": "boolean",
                      "description": "Assortiment per dagdeel en seizoen (migratie 084, standaard uit)."
                    },
                    "leverwijze": {
                      "type": "boolean",
                      "description": "Assortiment en prijzen per leverwijze: ter plaatse, afhalen, bezorgen (migratie 084, standaard uit)."
                    },
                    "cadeaubonBetalen": {
                      "type": "boolean",
                      "description": "\"Cadeaubon\" als betaalwijze bij afrekenen (ontbreekt = aan, zoals altijd)."
                    },
                    "cadeaubonSaldo": {
                      "type": "boolean",
                      "description": "Cadeaubonnen verkopen met code en saldo (standaard uit)."
                    },
                    "voorraad": {
                      "type": "boolean",
                      "description": "Voorraad bijhouden (per product of via ingrediënten; standaard uit)."
                    },
                    "thema": {
                      "type": "string",
                      "enum": [
                        "donker",
                        "licht"
                      ],
                      "description": "Thema van de schermen (ontbreekt = donker, zoals altijd)."
                    },
                    "afrekenknop": {
                      "type": "string",
                      "enum": [
                        "groot",
                        "klein"
                      ],
                      "description": "Knop \"Afrekenen\" op het bestelscherm: groot onder de bestelde producten of klein onderin (migratie 054; ontbreekt = groot)."
                    },
                    "bonMailen": {
                      "type": "boolean",
                      "description": "Bon per e-mail bij afrekenen (standaard uit)."
                    },
                    "keukenGeluid": {
                      "type": "boolean",
                      "description": "Piep op de kassa van de bediening als het keukenscherm iets klaar meldt (standaard uit)."
                    },
                    "zRapportMail": {
                      "type": "string",
                      "description": "E-mail van de beheerder: Z-rapport na dag afsluiten automatisch mailen (leeg = niet mailen)."
                    },
                    "fooiVerdelen": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "eigen",
                        "uren",
                        "gelijk"
                      ],
                      "description": "Fooi per medewerker op X/Z/periode-rapport (ontbreekt = uit)."
                    },
                    "klantenkaart": {
                      "type": "boolean",
                      "description": "Klantenkaart / spaarpunten (migratie 038; standaard uit)."
                    },
                    "gastprofiel": {
                      "type": "boolean",
                      "description": "Gastprofiel (migratie 115; standaard uit, alleen met de klantenkaart): VIP, dieetwensen en voorkeuren van de klant."
                    },
                    "spaarPuntenPerEuro": {
                      "type": "number",
                      "description": "punten per besteedde euro (0 = alleen stempelkaarten)"
                    },
                    "spaarPuntenNodig": {
                      "type": "number",
                      "description": "zoveel punten = één beloning"
                    },
                    "spaarBeloning": {
                      "type": "number",
                      "description": "beloning in centen korting"
                    },
                    "marketingSms": {
                      "type": "boolean",
                      "description": "Sms-marketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met CM_TOKEN)."
                    },
                    "marketingEmail": {
                      "type": "boolean",
                      "description": "E-mailmarketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met SMTP_HOST)."
                    },
                    "adresZoeken": {
                      "type": "boolean",
                      "description": "Snel adres invoeren met postcode en huisnummer, Nederland (migratie 057; standaard uit)."
                    },
                    "importeren": {
                      "type": "boolean",
                      "description": "Importeren uit een andere kassa: producten en klanten uit CSV/Excel (migratie 058; standaard uit)."
                    },
                    "exact": {
                      "type": "boolean",
                      "description": "Koppeling met Exact Online: dagomzet boeken (migratie 059; standaard uit)."
                    },
                    "exactIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: staat de Exact-app in .env (EXACT_CLIENT_ID en EXACT_CLIENT_SECRET)?"
                    },
                    "boekhoudpakket": {
                      "type": "string",
                      "enum": [
                        "",
                        "acumulus",
                        "afas",
                        "businesscentral",
                        "horus",
                        "moneybird",
                        "odoo",
                        "quickbooks",
                        "sapb1",
                        "silvasoft",
                        "snelstart",
                        "twinfield",
                        "xero",
                        "yuki",
                        "zoho"
                      ],
                      "description": "Koppeling met een ander boekhoudpakket: dagomzet zelf boeken in het gekozen pakket ('' = uit; migraties 062/063; standaard uit). Zie boekhoudcatalogus.ts."
                    },
                    "boekhoudpakketInEnv": {
                      "type": "boolean",
                      "description": "Alleen-lezen: ligt het pakket vast in .env (BOEKHOUDPAKKET)? Dan geen keuze bij Instellingen → Boekhouding."
                    },
                    "boekhoudpakketten": {
                      "type": "object",
                      "properties": {
                        "acumulus": {
                          "type": "boolean"
                        },
                        "afas": {
                          "type": "boolean"
                        },
                        "businesscentral": {
                          "type": "boolean"
                        },
                        "horus": {
                          "type": "boolean"
                        },
                        "moneybird": {
                          "type": "boolean"
                        },
                        "odoo": {
                          "type": "boolean"
                        },
                        "quickbooks": {
                          "type": "boolean"
                        },
                        "sapb1": {
                          "type": "boolean"
                        },
                        "silvasoft": {
                          "type": "boolean"
                        },
                        "snelstart": {
                          "type": "boolean"
                        },
                        "twinfield": {
                          "type": "boolean"
                        },
                        "xero": {
                          "type": "boolean"
                        },
                        "yuki": {
                          "type": "boolean"
                        },
                        "zoho": {
                          "type": "boolean"
                        }
                      },
                      "description": "Alleen-lezen: welke koppelingen kunnen verbinden (pakketten met inloggen alleen met hun app, in .env of bij Instellingen → Boekhouding)."
                    },
                    "reserveringen": {
                      "type": "boolean",
                      "description": "Reserveringen (migratie 039; standaard uit)."
                    },
                    "reserveringVooraf": {
                      "type": "number",
                      "description": "zoveel minuten vóór de tijd staat de tafel als gereserveerd op de plattegrond"
                    },
                    "reserveringDuurMin": {
                      "type": "number",
                      "description": "standaard duur van een reservering in minuten"
                    },
                    "wachtlijst": {
                      "type": "boolean",
                      "description": "Wachtlijst voor walk-ins (migratie 051; standaard uit)."
                    },
                    "wachtlijstSmsTekst": {
                      "type": "string",
                      "description": "tekst van de sms \"uw tafel is klaar\" ({naam}, {zaak}, {personen}); leeg = standaardtekst"
                    },
                    "smsIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: is sms ingesteld in .env (CM_TOKEN, CM.com)?"
                    },
                    "updatemelding": {
                      "type": "boolean",
                      "description": "Updatemelding in de kassa (migratie 040; standaard uit)."
                    },
                    "snelleVerkoop": {
                      "type": "boolean",
                      "description": "Knop \"Snelle verkoop\" (balie, zonder tafel) op het tafelscherm (migratie 041; ontbreekt = aan)."
                    },
                    "afhalen": {
                      "type": "boolean",
                      "description": "Knop \"Afhalen\" op het tafelscherm (migratie 041; ontbreekt = aan)."
                    },
                    "bezorgen": {
                      "type": "boolean",
                      "description": "Bezorgen en tijdvakken in de kassa (migratie 060): knop \"Bezorgen\" op het tafelscherm (ontbreekt = uit)."
                    },
                    "bezorgZones": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BezorgZone"
                      },
                      "description": "Bezorggebieden, de eerste die past geldt; leeg = overal, zonder kosten of minimum. Bedragen in centen."
                    },
                    "bezorgTijdMin": {
                      "type": "number",
                      "description": "Minuten tot bezorgd / klaar voor afhalen als het zo snel mogelijk moet."
                    },
                    "afhaalTijdMin": {
                      "type": "number"
                    },
                    "tijdvakMin": {
                      "type": "number",
                      "description": "Lengte van een tijdvak (minuten) en het maximum aantal bestellingen erin (afhalen + bezorgen; 0 = geen maximum)."
                    },
                    "perTijdvak": {
                      "type": "number"
                    },
                    "webshopVolgt": {
                      "type": "boolean",
                      "description": "Kassa en webshop gelijk (migratie 061; alles standaard uit = zoals voorheen).\r\nwebshopVolgt: de webshop gebruikt de bezorggebieden, tijden, het tijdvak, het\r\nmaximum, de openingstijden en gesloten dagen van de kassa en telt de\r\nbestellingen van de kassa mee (de kassa is leidend)."
                    },
                    "openTijden": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OpenTijden"
                        }
                      ],
                      "nullable": true,
                      "description": "Eigen openingstijden voor afhalen en bezorgen (1 = maandag ... 7 = zondag); null = zoals voorheen."
                    },
                    "geslotenDagen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Gesloten datums (JJJJ-MM-DD) voor afhalen en bezorgen."
                    },
                    "vooruitDagen": {
                      "type": "number",
                      "description": "Zoveel dagen vooruit een tijd kiezen (0 = alleen vandaag)."
                    },
                    "drukteMin": {
                      "type": "number",
                      "description": "Druk: zoveel minuten extra bij \"zo snel mogelijk\" (kassa en webshop)."
                    },
                    "bezorgBerichten": {
                      "type": "boolean",
                      "description": "De klant een sms/e-mail sturen bij aannemen, klaar en onderweg."
                    },
                    "webshopPauze": {
                      "type": "boolean",
                      "description": "Webshop vanuit de kassa even dicht (pauze), met een tekst voor de gast."
                    },
                    "webshopPauzeTekst": {
                      "type": "string",
                      "nullable": true
                    },
                    "reserverenOnline": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ReserverenOnline"
                        }
                      ],
                      "nullable": true,
                      "description": "Online reserveren in de webshop met de regels van de kassa; null = die van de webshop zelf."
                    },
                    "cadeaubonOnline": {
                      "type": "boolean",
                      "description": "Cadeaubonnen verkopen in de webshop (online betaald)."
                    },
                    "kortingscodes": {
                      "type": "boolean",
                      "description": "Kortingscodes aan de kassa en in de webshop."
                    },
                    "mailIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: is er een mailserver ingesteld in .env (SMTP_HOST)?"
                    },
                    "favorieten": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "auto",
                        "zelf"
                      ],
                      "description": "Favorieten/snelknoppen op het bestelscherm (ontbreekt = uit)."
                    },
                    "tafelStilMinuten": {
                      "type": "number",
                      "description": "Tafeltijd: oranje rand na zoveel minuten zonder bestelling (0 = uit; ontbreekt = 20)."
                    },
                    "ayce": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AyceInstelling"
                        }
                      ],
                      "description": "All-you-can-eat (migratie 042; ontbreekt = uit)."
                    },
                    "klantscherm": {
                      "type": "boolean",
                      "description": "Klantscherm: scherm naar de klant toe met bestelling en bedrag (migratie 044; ontbreekt = uit)."
                    },
                    "klantschermWelkom": {
                      "type": "string",
                      "nullable": true,
                      "description": "Welkomsttekst op het klantscherm als er niemand afrekent (leeg = \"Welkom\")."
                    },
                    "productfotoKnoppen": {
                      "type": "boolean",
                      "description": "Productfoto op de productknoppen van het bestelscherm (migratie 045; ontbreekt = uit)."
                    },
                    "productfotoKlantscherm": {
                      "type": "boolean",
                      "description": "Productfoto bij de regels op het klantscherm (migratie 045; ontbreekt = uit)."
                    },
                    "weegschaal": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WeegschaalInstelling"
                        }
                      ],
                      "description": "Weegschaal (migratie 047; ontbreekt of aan = false = uit): producten met een prijs per\r\nkilo, wegen op een Aclas OS6X en etiketten van een Aclas TS6X scannen."
                    },
                    "leeftijdscheck": {
                      "type": "boolean",
                      "description": "Leeftijdscheck alcohol (migratie 072; ontbreekt = uit): 18+ in de webshop en op werkbon/bezorgbon."
                    },
                    "wegwerp": {
                      "type": "boolean",
                      "description": "Wegwerptoeslag per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "statiegeld": {
                      "type": "boolean",
                      "description": "Statiegeld per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "contantLimiet": {
                      "type": "boolean",
                      "description": "Waarschuwing bij contant € 3.000 of meer voor goederen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "facturen": {
                      "type": "boolean",
                      "description": "Facturen (UBL/Peppol) voor zakelijke klanten (migratie 072; ontbreekt = uit)."
                    },
                    "haccp": {
                      "type": "boolean",
                      "description": "Digitale HACCP-registratie: temperaturen en schoonmaak (migratie 073; ontbreekt = uit)."
                    },
                    "tap": {
                      "type": "boolean",
                      "description": "Tapsysteem / flowmeters (migratie 076): taps op de bon"
                    },
                    "resplatform": {
                      "type": "boolean",
                      "description": "Reserveringsplatforms (migratie 078): TheFork, Formitable, Zenchef, Resengo, OpenTable"
                    },
                    "bi": {
                      "type": "boolean",
                      "description": "BI en data-export (migratie 079): Power BI, Looker Studio, Excel, datawarehouse"
                    },
                    "biKeten": {
                      "type": "boolean",
                      "description": "BI voor ketens: het klantportaal mag de gegevens ophalen (migratie 080)"
                    },
                    "spaarpartner": {
                      "type": "boolean",
                      "description": "Spaarprogramma van een ander platform: Piggy of Joyn (migratie 081)"
                    },
                    "reviews": {
                      "type": "boolean",
                      "description": "Reviews vragen na het bezoek: Google en/of Trustpilot (migratie 081)"
                    },
                    "reviewbeheer": {
                      "type": "boolean",
                      "description": "Reviewbeheer: Google en Trustpilot in de kassa lezen en beantwoorden (migratie 082)"
                    },
                    "opRekening": {
                      "type": "boolean",
                      "description": "Betalen op rekening voor zakelijke klanten, met een factuur (migratie 085; alleen met facturen aan)"
                    },
                    "opRekeningWebshop": {
                      "type": "boolean",
                      "description": "Op rekening ook in de webshop: zakelijke klanten bestellen online met een eigen klantcode (migratie 108)"
                    },
                    "ayceWebshop": {
                      "type": "boolean",
                      "description": "All-you-can-eat ook bij bestellen aan tafel via de QR-code van de webshop (migratie 108)"
                    },
                    "wachtlijstOnline": {
                      "type": "boolean",
                      "description": "Gasten zetten zichzelf op de wachtlijst via de webshop (migratie 108; alleen met de wachtlijst aan)"
                    },
                    "teLaat": {
                      "type": "boolean",
                      "description": "Melding bij te lange doorlooptijd van afhalen en bezorgen (migratie 088; ontbreekt = uit)"
                    },
                    "mailingKoppeling": {
                      "type": "boolean",
                      "description": "Koppeling met Mailchimp of Klaviyo met een gekozen lijst (migratie 089): toestemming voor e-mail vragen"
                    },
                    "webshopPush": {
                      "type": "boolean",
                      "description": "Pushberichten met aanbiedingen in de webshop: een actie kan als pushbericht (migratie 095; tabblad Marketing)"
                    },
                    "muziek": {
                      "type": "boolean",
                      "description": "Muziek bedienen vanaf de kassa: knop Muziek in de bovenbalk (migratie 091; ontbreekt = uit)"
                    },
                    "camera": {
                      "type": "boolean",
                      "description": "Camerabeelden in de kassa: knop Camera's (migratie 092; ontbreekt = uit; bekijken met het recht camera_bekijken)"
                    },
                    "tablet": {
                      "type": "boolean",
                      "description": "Tablets als tweede scherm: muziek en camera's met één knop naar een gekoppelde tablet (migratie 094; ontbreekt = uit)"
                    },
                    "oproep": {
                      "type": "boolean",
                      "description": "Oproepscherm \"wordt bereid / klaar\" voor afhalers (migratie 096): knop Oproepen in de kassa, ophaalnummer op de kassabon."
                    },
                    "bezorgers": {
                      "type": "boolean",
                      "description": "Eigen bezorgers (migratie 097): knop Ritten (rit maken, bezorgerspagina op het portaal, kasafdracht, track & trace)."
                    },
                    "ritplanning": {
                      "type": "boolean",
                      "description": "Ritplanning (migratie 098; alleen met eigen bezorgers): ritten voorstellen per gebied, met afstand en reistijd."
                    },
                    "bezorgersapp": {
                      "type": "boolean",
                      "description": "Bezorgersapp (migratie 099; alleen met eigen bezorgers): telefoons koppelen, zelf oppakken, live kaart met alle bezorgers."
                    }
                  },
                  "required": [
                    "vestigingsnummer",
                    "juridischeNaam",
                    "id",
                    "naam",
                    "land",
                    "btwNummer",
                    "adres",
                    "postcode",
                    "plaats",
                    "telefoon",
                    "gksProductienummer"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Zaak"
        ],
        "operationId": "postBeheerVestiging",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VestigingInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gksMaaltijdOmzet": {
                      "type": "number",
                      "description": "Alleen in Instellingen → Zaak (België): maaltijden ter plaatse (btw 12%) in de laatste 12 maanden, excl. btw, in centen."
                    },
                    "vestigingsnummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "juridischeNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "btwNummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "gksPlichtig": {
                      "type": "boolean",
                      "nullable": true,
                      "description": "België (migratie 135): GKS-plichtig? null = nog niet gekozen (dan kan de zaak niet afrekenen), true = alleen\r\nafrekenen met een werkende zwarte doos (GKS 2.0), false = niet GKS-plichtig (verklaring van de beheerder)."
                    },
                    "gksVerklaringOp": {
                      "type": "string",
                      "nullable": true,
                      "description": "Wanneer de keuze (bij \"nee\": de verklaring) is gedaan (ISO); elk jaar opnieuw te bevestigen."
                    },
                    "fiscaalDemo": {
                      "type": "boolean",
                      "description": "Demo- of testzaak: de nagebootste zwarte doos (FISCAL_MODE=mock) mag. Nooit bij een echte zaak."
                    },
                    "adres": {
                      "type": "string",
                      "nullable": true
                    },
                    "postcode": {
                      "type": "string",
                      "nullable": true
                    },
                    "plaats": {
                      "type": "string",
                      "nullable": true
                    },
                    "telefoon": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "nullable": true,
                      "description": "E-mailadres van de zaak (niet op de bon; o.a. voor het beheerportaal van Pin Voordeel)."
                    },
                    "gksProductienummer": {
                      "type": "string",
                      "nullable": true
                    },
                    "bonVoettekst": {
                      "type": "string",
                      "nullable": true,
                      "description": "Tekst onderaan de kassabon (meerdere regels mogen).\r\nnull/undefined = STANDAARD_BONVOETTEKST, '' = geen tekst."
                    },
                    "bonTaal": {
                      "type": "string",
                      "nullable": true,
                      "description": "Taal van de vaste teksten op de kassabon (migratie 052; alleen Latijns schrift,\r\nzie packages/printing/src/bontaal.ts). null/undefined = Nederlands.\r\nLos van de taal van de schermen."
                    },
                    "contantAfronden": {
                      "type": "boolean",
                      "description": "Contante betalingen afronden op 5 cent (standaard uit)."
                    },
                    "fooi": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/FooiInstelling"
                        }
                      ],
                      "description": "Fooiknoppen bij afrekenen (ontbreekt = STANDAARD_FOOI)."
                    },
                    "klokken": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aan",
                        "verplicht"
                      ],
                      "description": "In- en uitklokken van personeel (ontbreekt = 'uit')."
                    },
                    "allergenen": {
                      "type": "boolean",
                      "description": "Allergenen per product tonen en invullen (standaard uit)."
                    },
                    "happyhour": {
                      "type": "boolean",
                      "description": "Happy hour gebruiken (standaard uit)."
                    },
                    "menus": {
                      "type": "boolean",
                      "description": "Menu's gebruiken (standaard uit)."
                    },
                    "dagdelen": {
                      "type": "boolean",
                      "description": "Assortiment per dagdeel en seizoen (migratie 084, standaard uit)."
                    },
                    "leverwijze": {
                      "type": "boolean",
                      "description": "Assortiment en prijzen per leverwijze: ter plaatse, afhalen, bezorgen (migratie 084, standaard uit)."
                    },
                    "cadeaubonBetalen": {
                      "type": "boolean",
                      "description": "\"Cadeaubon\" als betaalwijze bij afrekenen (ontbreekt = aan, zoals altijd)."
                    },
                    "cadeaubonSaldo": {
                      "type": "boolean",
                      "description": "Cadeaubonnen verkopen met code en saldo (standaard uit)."
                    },
                    "voorraad": {
                      "type": "boolean",
                      "description": "Voorraad bijhouden (per product of via ingrediënten; standaard uit)."
                    },
                    "thema": {
                      "type": "string",
                      "enum": [
                        "donker",
                        "licht"
                      ],
                      "description": "Thema van de schermen (ontbreekt = donker, zoals altijd)."
                    },
                    "afrekenknop": {
                      "type": "string",
                      "enum": [
                        "groot",
                        "klein"
                      ],
                      "description": "Knop \"Afrekenen\" op het bestelscherm: groot onder de bestelde producten of klein onderin (migratie 054; ontbreekt = groot)."
                    },
                    "bonMailen": {
                      "type": "boolean",
                      "description": "Bon per e-mail bij afrekenen (standaard uit)."
                    },
                    "keukenGeluid": {
                      "type": "boolean",
                      "description": "Piep op de kassa van de bediening als het keukenscherm iets klaar meldt (standaard uit)."
                    },
                    "zRapportMail": {
                      "type": "string",
                      "description": "E-mail van de beheerder: Z-rapport na dag afsluiten automatisch mailen (leeg = niet mailen)."
                    },
                    "fooiVerdelen": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "eigen",
                        "uren",
                        "gelijk"
                      ],
                      "description": "Fooi per medewerker op X/Z/periode-rapport (ontbreekt = uit)."
                    },
                    "klantenkaart": {
                      "type": "boolean",
                      "description": "Klantenkaart / spaarpunten (migratie 038; standaard uit)."
                    },
                    "gastprofiel": {
                      "type": "boolean",
                      "description": "Gastprofiel (migratie 115; standaard uit, alleen met de klantenkaart): VIP, dieetwensen en voorkeuren van de klant."
                    },
                    "spaarPuntenPerEuro": {
                      "type": "number",
                      "description": "punten per besteedde euro (0 = alleen stempelkaarten)"
                    },
                    "spaarPuntenNodig": {
                      "type": "number",
                      "description": "zoveel punten = één beloning"
                    },
                    "spaarBeloning": {
                      "type": "number",
                      "description": "beloning in centen korting"
                    },
                    "marketingSms": {
                      "type": "boolean",
                      "description": "Sms-marketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met CM_TOKEN)."
                    },
                    "marketingEmail": {
                      "type": "boolean",
                      "description": "E-mailmarketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met SMTP_HOST)."
                    },
                    "adresZoeken": {
                      "type": "boolean",
                      "description": "Snel adres invoeren met postcode en huisnummer, Nederland (migratie 057; standaard uit)."
                    },
                    "importeren": {
                      "type": "boolean",
                      "description": "Importeren uit een andere kassa: producten en klanten uit CSV/Excel (migratie 058; standaard uit)."
                    },
                    "exact": {
                      "type": "boolean",
                      "description": "Koppeling met Exact Online: dagomzet boeken (migratie 059; standaard uit)."
                    },
                    "exactIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: staat de Exact-app in .env (EXACT_CLIENT_ID en EXACT_CLIENT_SECRET)?"
                    },
                    "boekhoudpakket": {
                      "type": "string",
                      "enum": [
                        "",
                        "acumulus",
                        "afas",
                        "businesscentral",
                        "horus",
                        "moneybird",
                        "odoo",
                        "quickbooks",
                        "sapb1",
                        "silvasoft",
                        "snelstart",
                        "twinfield",
                        "xero",
                        "yuki",
                        "zoho"
                      ],
                      "description": "Koppeling met een ander boekhoudpakket: dagomzet zelf boeken in het gekozen pakket ('' = uit; migraties 062/063; standaard uit). Zie boekhoudcatalogus.ts."
                    },
                    "boekhoudpakketInEnv": {
                      "type": "boolean",
                      "description": "Alleen-lezen: ligt het pakket vast in .env (BOEKHOUDPAKKET)? Dan geen keuze bij Instellingen → Boekhouding."
                    },
                    "boekhoudpakketten": {
                      "type": "object",
                      "properties": {
                        "acumulus": {
                          "type": "boolean"
                        },
                        "afas": {
                          "type": "boolean"
                        },
                        "businesscentral": {
                          "type": "boolean"
                        },
                        "horus": {
                          "type": "boolean"
                        },
                        "moneybird": {
                          "type": "boolean"
                        },
                        "odoo": {
                          "type": "boolean"
                        },
                        "quickbooks": {
                          "type": "boolean"
                        },
                        "sapb1": {
                          "type": "boolean"
                        },
                        "silvasoft": {
                          "type": "boolean"
                        },
                        "snelstart": {
                          "type": "boolean"
                        },
                        "twinfield": {
                          "type": "boolean"
                        },
                        "xero": {
                          "type": "boolean"
                        },
                        "yuki": {
                          "type": "boolean"
                        },
                        "zoho": {
                          "type": "boolean"
                        }
                      },
                      "description": "Alleen-lezen: welke koppelingen kunnen verbinden (pakketten met inloggen alleen met hun app, in .env of bij Instellingen → Boekhouding)."
                    },
                    "reserveringen": {
                      "type": "boolean",
                      "description": "Reserveringen (migratie 039; standaard uit)."
                    },
                    "reserveringVooraf": {
                      "type": "number",
                      "description": "zoveel minuten vóór de tijd staat de tafel als gereserveerd op de plattegrond"
                    },
                    "reserveringDuurMin": {
                      "type": "number",
                      "description": "standaard duur van een reservering in minuten"
                    },
                    "wachtlijst": {
                      "type": "boolean",
                      "description": "Wachtlijst voor walk-ins (migratie 051; standaard uit)."
                    },
                    "wachtlijstSmsTekst": {
                      "type": "string",
                      "description": "tekst van de sms \"uw tafel is klaar\" ({naam}, {zaak}, {personen}); leeg = standaardtekst"
                    },
                    "smsIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: is sms ingesteld in .env (CM_TOKEN, CM.com)?"
                    },
                    "updatemelding": {
                      "type": "boolean",
                      "description": "Updatemelding in de kassa (migratie 040; standaard uit)."
                    },
                    "snelleVerkoop": {
                      "type": "boolean",
                      "description": "Knop \"Snelle verkoop\" (balie, zonder tafel) op het tafelscherm (migratie 041; ontbreekt = aan)."
                    },
                    "afhalen": {
                      "type": "boolean",
                      "description": "Knop \"Afhalen\" op het tafelscherm (migratie 041; ontbreekt = aan)."
                    },
                    "bezorgen": {
                      "type": "boolean",
                      "description": "Bezorgen en tijdvakken in de kassa (migratie 060): knop \"Bezorgen\" op het tafelscherm (ontbreekt = uit)."
                    },
                    "bezorgZones": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BezorgZone"
                      },
                      "description": "Bezorggebieden, de eerste die past geldt; leeg = overal, zonder kosten of minimum. Bedragen in centen."
                    },
                    "bezorgTijdMin": {
                      "type": "number",
                      "description": "Minuten tot bezorgd / klaar voor afhalen als het zo snel mogelijk moet."
                    },
                    "afhaalTijdMin": {
                      "type": "number"
                    },
                    "tijdvakMin": {
                      "type": "number",
                      "description": "Lengte van een tijdvak (minuten) en het maximum aantal bestellingen erin (afhalen + bezorgen; 0 = geen maximum)."
                    },
                    "perTijdvak": {
                      "type": "number"
                    },
                    "webshopVolgt": {
                      "type": "boolean",
                      "description": "Kassa en webshop gelijk (migratie 061; alles standaard uit = zoals voorheen).\r\nwebshopVolgt: de webshop gebruikt de bezorggebieden, tijden, het tijdvak, het\r\nmaximum, de openingstijden en gesloten dagen van de kassa en telt de\r\nbestellingen van de kassa mee (de kassa is leidend)."
                    },
                    "openTijden": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OpenTijden"
                        }
                      ],
                      "nullable": true,
                      "description": "Eigen openingstijden voor afhalen en bezorgen (1 = maandag ... 7 = zondag); null = zoals voorheen."
                    },
                    "geslotenDagen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Gesloten datums (JJJJ-MM-DD) voor afhalen en bezorgen."
                    },
                    "vooruitDagen": {
                      "type": "number",
                      "description": "Zoveel dagen vooruit een tijd kiezen (0 = alleen vandaag)."
                    },
                    "drukteMin": {
                      "type": "number",
                      "description": "Druk: zoveel minuten extra bij \"zo snel mogelijk\" (kassa en webshop)."
                    },
                    "bezorgBerichten": {
                      "type": "boolean",
                      "description": "De klant een sms/e-mail sturen bij aannemen, klaar en onderweg."
                    },
                    "webshopPauze": {
                      "type": "boolean",
                      "description": "Webshop vanuit de kassa even dicht (pauze), met een tekst voor de gast."
                    },
                    "webshopPauzeTekst": {
                      "type": "string",
                      "nullable": true
                    },
                    "reserverenOnline": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/ReserverenOnline"
                        }
                      ],
                      "nullable": true,
                      "description": "Online reserveren in de webshop met de regels van de kassa; null = die van de webshop zelf."
                    },
                    "cadeaubonOnline": {
                      "type": "boolean",
                      "description": "Cadeaubonnen verkopen in de webshop (online betaald)."
                    },
                    "kortingscodes": {
                      "type": "boolean",
                      "description": "Kortingscodes aan de kassa en in de webshop."
                    },
                    "mailIngesteld": {
                      "type": "boolean",
                      "description": "Alleen-lezen: is er een mailserver ingesteld in .env (SMTP_HOST)?"
                    },
                    "favorieten": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "auto",
                        "zelf"
                      ],
                      "description": "Favorieten/snelknoppen op het bestelscherm (ontbreekt = uit)."
                    },
                    "tafelStilMinuten": {
                      "type": "number",
                      "description": "Tafeltijd: oranje rand na zoveel minuten zonder bestelling (0 = uit; ontbreekt = 20)."
                    },
                    "ayce": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AyceInstelling"
                        }
                      ],
                      "description": "All-you-can-eat (migratie 042; ontbreekt = uit)."
                    },
                    "klantscherm": {
                      "type": "boolean",
                      "description": "Klantscherm: scherm naar de klant toe met bestelling en bedrag (migratie 044; ontbreekt = uit)."
                    },
                    "klantschermWelkom": {
                      "type": "string",
                      "nullable": true,
                      "description": "Welkomsttekst op het klantscherm als er niemand afrekent (leeg = \"Welkom\")."
                    },
                    "productfotoKnoppen": {
                      "type": "boolean",
                      "description": "Productfoto op de productknoppen van het bestelscherm (migratie 045; ontbreekt = uit)."
                    },
                    "productfotoKlantscherm": {
                      "type": "boolean",
                      "description": "Productfoto bij de regels op het klantscherm (migratie 045; ontbreekt = uit)."
                    },
                    "weegschaal": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/WeegschaalInstelling"
                        }
                      ],
                      "description": "Weegschaal (migratie 047; ontbreekt of aan = false = uit): producten met een prijs per\r\nkilo, wegen op een Aclas OS6X en etiketten van een Aclas TS6X scannen."
                    },
                    "leeftijdscheck": {
                      "type": "boolean",
                      "description": "Leeftijdscheck alcohol (migratie 072; ontbreekt = uit): 18+ in de webshop en op werkbon/bezorgbon."
                    },
                    "wegwerp": {
                      "type": "boolean",
                      "description": "Wegwerptoeslag per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "statiegeld": {
                      "type": "boolean",
                      "description": "Statiegeld per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "contantLimiet": {
                      "type": "boolean",
                      "description": "Waarschuwing bij contant € 3.000 of meer voor goederen (NL, migratie 072; ontbreekt = uit)."
                    },
                    "facturen": {
                      "type": "boolean",
                      "description": "Facturen (UBL/Peppol) voor zakelijke klanten (migratie 072; ontbreekt = uit)."
                    },
                    "haccp": {
                      "type": "boolean",
                      "description": "Digitale HACCP-registratie: temperaturen en schoonmaak (migratie 073; ontbreekt = uit)."
                    },
                    "tap": {
                      "type": "boolean",
                      "description": "Tapsysteem / flowmeters (migratie 076): taps op de bon"
                    },
                    "resplatform": {
                      "type": "boolean",
                      "description": "Reserveringsplatforms (migratie 078): TheFork, Formitable, Zenchef, Resengo, OpenTable"
                    },
                    "bi": {
                      "type": "boolean",
                      "description": "BI en data-export (migratie 079): Power BI, Looker Studio, Excel, datawarehouse"
                    },
                    "biKeten": {
                      "type": "boolean",
                      "description": "BI voor ketens: het klantportaal mag de gegevens ophalen (migratie 080)"
                    },
                    "spaarpartner": {
                      "type": "boolean",
                      "description": "Spaarprogramma van een ander platform: Piggy of Joyn (migratie 081)"
                    },
                    "reviews": {
                      "type": "boolean",
                      "description": "Reviews vragen na het bezoek: Google en/of Trustpilot (migratie 081)"
                    },
                    "reviewbeheer": {
                      "type": "boolean",
                      "description": "Reviewbeheer: Google en Trustpilot in de kassa lezen en beantwoorden (migratie 082)"
                    },
                    "opRekening": {
                      "type": "boolean",
                      "description": "Betalen op rekening voor zakelijke klanten, met een factuur (migratie 085; alleen met facturen aan)"
                    },
                    "opRekeningWebshop": {
                      "type": "boolean",
                      "description": "Op rekening ook in de webshop: zakelijke klanten bestellen online met een eigen klantcode (migratie 108)"
                    },
                    "ayceWebshop": {
                      "type": "boolean",
                      "description": "All-you-can-eat ook bij bestellen aan tafel via de QR-code van de webshop (migratie 108)"
                    },
                    "wachtlijstOnline": {
                      "type": "boolean",
                      "description": "Gasten zetten zichzelf op de wachtlijst via de webshop (migratie 108; alleen met de wachtlijst aan)"
                    },
                    "teLaat": {
                      "type": "boolean",
                      "description": "Melding bij te lange doorlooptijd van afhalen en bezorgen (migratie 088; ontbreekt = uit)"
                    },
                    "mailingKoppeling": {
                      "type": "boolean",
                      "description": "Koppeling met Mailchimp of Klaviyo met een gekozen lijst (migratie 089): toestemming voor e-mail vragen"
                    },
                    "webshopPush": {
                      "type": "boolean",
                      "description": "Pushberichten met aanbiedingen in de webshop: een actie kan als pushbericht (migratie 095; tabblad Marketing)"
                    },
                    "muziek": {
                      "type": "boolean",
                      "description": "Muziek bedienen vanaf de kassa: knop Muziek in de bovenbalk (migratie 091; ontbreekt = uit)"
                    },
                    "camera": {
                      "type": "boolean",
                      "description": "Camerabeelden in de kassa: knop Camera's (migratie 092; ontbreekt = uit; bekijken met het recht camera_bekijken)"
                    },
                    "tablet": {
                      "type": "boolean",
                      "description": "Tablets als tweede scherm: muziek en camera's met één knop naar een gekoppelde tablet (migratie 094; ontbreekt = uit)"
                    },
                    "oproep": {
                      "type": "boolean",
                      "description": "Oproepscherm \"wordt bereid / klaar\" voor afhalers (migratie 096): knop Oproepen in de kassa, ophaalnummer op de kassabon."
                    },
                    "bezorgers": {
                      "type": "boolean",
                      "description": "Eigen bezorgers (migratie 097): knop Ritten (rit maken, bezorgerspagina op het portaal, kasafdracht, track & trace)."
                    },
                    "ritplanning": {
                      "type": "boolean",
                      "description": "Ritplanning (migratie 098; alleen met eigen bezorgers): ritten voorstellen per gebied, met afstand en reistijd."
                    },
                    "bezorgersapp": {
                      "type": "boolean",
                      "description": "Bezorgersapp (migratie 099; alleen met eigen bezorgers): telefoons koppelen, zelf oppakken, live kaart met alle bezorgers."
                    }
                  },
                  "required": [
                    "vestigingsnummer",
                    "juridischeNaam",
                    "id",
                    "naam",
                    "land",
                    "btwNummer",
                    "adres",
                    "postcode",
                    "plaats",
                    "telefoon",
                    "gksProductienummer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- De naam van de zaak mag niet leeg zijn.\n- Tafeltijd: vul 0 (uit) tot 240 minuten in.\n- Punten per euro: 0 tot 100.\n- Punten voor een beloning: 1 tot 100.000.\n- Beloning: € 0,01 tot € 1.000.\n- Reserveringen: minuten vooraf 0 tot 720.\n- Reserveringen: duur 15 tot 720 minuten.\n- Sms-tekst wachtlijst: hooguit 300 tekens.\n- Z-rapport mailen: hooguit 3 e-mailadressen.\n- Z-rapport mailen: \"…\" is geen geldig e-mailadres.\n- Welkomsttekst klantscherm: hooguit … tekens.\n- \"…\" is geen geldig e-mailadres.\n- Vestigingseenheidsnummer: 10 cijfers, beginnend met 2 tot 8 (zie de KBO).\n- Wachtlijst: kan alleen aan als de sms is ingesteld (CM_TOKEN in .env).\n- Marketing: zet eerst de klantenkaart aan (daar komen de klanten vandaan).\n- Sms-marketing: kan alleen aan als de sms is ingesteld (CM_TOKEN in .env).\n- Exact Online: kan alleen aan als de app is ingesteld (Instellingen → Boekhouding, of EXACT_CLIENT_ID en EXACT_CLIENT_SECRET in .env).\n- Boekhoudpakket: ligt vast in de .env van de kassa (BOEKHOUDPAKKET).\n- Boekhoudpakket: kies een pakket uit de lijst, of uit.\n- … werkt niet in ….\n- E-mailmarketing: kan alleen aan als de mailserver is ingesteld (SMTP_HOST in .env).\n- Ongeldig btw-nummer. Voorbeelden: NL123456789B01 of BE0123456789.\n- In België is het btw-nummer verplicht op het kasticket.\n- De tekst onderaan de bon is te lang (maximaal … regels en … tekens).\n- Deze taal kan niet op de kassabon (een bonprinter kent alleen Latijns schrift).\n- In- en uitklokken: kies uit, aan of verplicht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De naam van de zaak mag niet leeg zijn."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 043).\n- De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 052).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 043)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/vinify": {
      "get": {
        "tags": [
          "Vinify"
        ],
        "operationId": "getBeheerVinify",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "portaalAdres": {
                      "type": "string",
                      "nullable": true
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "$ref": "#/components/schemas/VinifyInstelling"
                    },
                    "sleutelIngevuld": {
                      "type": "boolean"
                    },
                    "secretIngevuld": {
                      "type": "boolean"
                    },
                    "wachtwoordIngevuld": {
                      "type": "boolean"
                    },
                    "pushTokenIngevuld": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "laatstContact": {
                      "type": "string",
                      "nullable": true
                    },
                    "pushOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "pushAantal": {
                      "type": "number"
                    },
                    "wijnen": {
                      "type": "number"
                    },
                    "groepenLijst": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    }
                  },
                  "required": [
                    "portaalAdres",
                    "migratie",
                    "instelling",
                    "sleutelIngevuld",
                    "secretIngevuld",
                    "wachtwoordIngevuld",
                    "pushTokenIngevuld",
                    "status",
                    "melding",
                    "laatstContact",
                    "pushOp",
                    "pushAantal",
                    "wijnen",
                    "groepenLijst"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Vinify"
        ],
        "operationId": "postBeheerVinify",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sleutel": {
                      "type": "string"
                    },
                    "secret": {
                      "type": "string"
                    },
                    "portaalAdres": {
                      "type": "string",
                      "nullable": true
                    },
                    "migratie": {
                      "type": "boolean"
                    },
                    "instelling": {
                      "$ref": "#/components/schemas/VinifyInstelling"
                    },
                    "sleutelIngevuld": {
                      "type": "boolean"
                    },
                    "secretIngevuld": {
                      "type": "boolean"
                    },
                    "wachtwoordIngevuld": {
                      "type": "boolean"
                    },
                    "pushTokenIngevuld": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "laatstContact": {
                      "type": "string",
                      "nullable": true
                    },
                    "pushOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "pushAantal": {
                      "type": "number"
                    },
                    "wijnen": {
                      "type": "number"
                    },
                    "groepenLijst": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    }
                  },
                  "required": [
                    "portaalAdres",
                    "migratie",
                    "instelling",
                    "sleutelIngevuld",
                    "secretIngevuld",
                    "wachtwoordIngevuld",
                    "pushTokenIngevuld",
                    "status",
                    "melding",
                    "laatstContact",
                    "pushOp",
                    "pushAantal",
                    "wijnen",
                    "groepenLijst"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/vinify/push": {
      "post": {
        "tags": [
          "Vinify"
        ],
        "operationId": "postBeheerVinifyPush",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "verstuurd": {
                      "type": "number"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "verstuurd",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/volgorde/artikelen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerVolgordeArtikelen",
        "summary": "Nieuwe volgorde van de producten in één groep (na slepen)",
        "description": "Nieuwe volgorde van de producten in één groep (na slepen). Een product\ndat uit een andere groep hierheen gesleept is, verhuist mee.\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groepId": {
                    "type": "string"
                  },
                  "ids": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige volgorde.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige volgorde."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Productgroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Productgroep niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/volgorde/groepen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerVolgordeGroepen",
        "summary": "Nieuwe volgorde van de groepen (na slepen)",
        "description": "Nieuwe volgorde van de groepen (na slepen).\n\n**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige volgorde.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige volgorde."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/volgorde/optiegroepen": {
      "post": {
        "tags": [
          "Productbeheer"
        ],
        "operationId": "postBeheerVolgordeOptiegroepen",
        "description": "**Toegang:** Vereist recht `producten_beheren` (Producten, groepen en keuzeopties beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige volgorde.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige volgorde."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: producten, groepen en keuzeopties beheren. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Keuzegroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Keuzegroep niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/volgorde/ruimtes": {
      "post": {
        "tags": [
          "Plattegronden"
        ],
        "operationId": "postBeheerVolgordeRuimtes",
        "description": "**Toegang:** Vereist recht `plattegronden_beheren` (Plattegronden en tafels beheren).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige volgorde.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige volgorde."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: plattegronden en tafels beheren. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad": {
      "get": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "getBeheerVoorraad",
        "summary": "Alle producten die voorraad bijhouden, en alle ingrediënten",
        "description": "Alle producten die voorraad bijhouden, en alle ingrediënten.\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "producten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "groep": {
                            "type": "string",
                            "nullable": true
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "product",
                              "ingredienten"
                            ]
                          },
                          "voorraad": {
                            "type": "number"
                          },
                          "minimum": {
                            "type": "number",
                            "nullable": true
                          },
                          "beschikbaar": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "groep",
                          "soort",
                          "voorraad",
                          "minimum",
                          "beschikbaar"
                        ]
                      }
                    },
                    "ingredienten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "eenheid": {
                            "type": "string"
                          },
                          "voorraad": {
                            "type": "number"
                          },
                          "minimum": {
                            "type": "number",
                            "nullable": true
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "gebruikt": {
                            "type": "number"
                          },
                          "aanvullenTot": {
                            "type": "number",
                            "nullable": true
                          },
                          "leverancier": {
                            "type": "string",
                            "nullable": true
                          },
                          "leverancierId": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelcode": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelEan": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelPer": {
                            "type": "number"
                          },
                          "bestelEenheid": {
                            "type": "string",
                            "nullable": true
                          },
                          "inkoopprijs": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "eenheid",
                          "voorraad",
                          "minimum",
                          "actief",
                          "gebruikt",
                          "aanvullenTot",
                          "leverancier",
                          "leverancierId",
                          "bestelcode",
                          "bestelEan",
                          "bestelPer",
                          "bestelEenheid",
                          "inkoopprijs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "producten",
                    "ingredienten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad/artikel/{id}": {
      "get": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "getBeheerVoorraadArtikelId",
        "description": "**Toegang:** Vereist één van de rechten: `producten_beheren` (Producten, groepen en keuzeopties beheren), `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "soort": {
                      "type": "string"
                    },
                    "voorraad": {
                      "type": "number"
                    },
                    "minimum": {
                      "type": "number",
                      "nullable": true
                    },
                    "aanvullenTot": {
                      "type": "number",
                      "nullable": true
                    },
                    "leverancier": {
                      "type": "string",
                      "nullable": true
                    },
                    "leverancierId": {
                      "type": "string",
                      "nullable": true
                    },
                    "bestelcode": {
                      "type": "string",
                      "nullable": true
                    },
                    "bestelEan": {
                      "type": "string",
                      "nullable": true
                    },
                    "bestelPer": {
                      "type": "number"
                    },
                    "bestelEenheid": {
                      "type": "string",
                      "nullable": true
                    },
                    "inkoopprijs": {
                      "type": "number",
                      "nullable": true
                    },
                    "recept": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ingredientId": {
                            "type": "string"
                          },
                          "hoeveelheid": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "ingredientId",
                          "hoeveelheid"
                        ]
                      }
                    },
                    "ingredienten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "eenheid": {
                            "type": "string"
                          },
                          "voorraad": {
                            "type": "number"
                          },
                          "minimum": {
                            "type": "number",
                            "nullable": true
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "gebruikt": {
                            "type": "number"
                          },
                          "aanvullenTot": {
                            "type": "number",
                            "nullable": true
                          },
                          "leverancier": {
                            "type": "string",
                            "nullable": true
                          },
                          "leverancierId": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelcode": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelEan": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelPer": {
                            "type": "number"
                          },
                          "bestelEenheid": {
                            "type": "string",
                            "nullable": true
                          },
                          "inkoopprijs": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "eenheid",
                          "voorraad",
                          "minimum",
                          "actief",
                          "gebruikt",
                          "aanvullenTot",
                          "leverancier",
                          "leverancierId",
                          "bestelcode",
                          "bestelEan",
                          "bestelPer",
                          "bestelEenheid",
                          "inkoopprijs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "soort",
                    "voorraad",
                    "minimum",
                    "aanvullenTot",
                    "leverancier",
                    "leverancierId",
                    "bestelcode",
                    "bestelEan",
                    "bestelPer",
                    "bestelEenheid",
                    "inkoopprijs",
                    "recept",
                    "ingredienten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "postBeheerVoorraadArtikelId",
        "description": "**Toegang:** Vereist één van de rechten: `producten_beheren` (Producten, groepen en keuzeopties beheren), `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {},
                  "minimum": {},
                  "recept": {},
                  "aanvullenTot": {},
                  "leverancier": {},
                  "leverancierId": {},
                  "bestelcode": {},
                  "bestelEan": {},
                  "bestelPer": {},
                  "bestelEenheid": {},
                  "inkoopprijs": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldig meldniveau.\n- Vul bij elk ingrediënt een hoeveelheid groter dan 0 in.\n- Een ingrediënt staat er twee keer in.\n- Kies minstens één ingrediënt voor het recept.\n- Een ingrediënt bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldig meldniveau."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad/bestellijst": {
      "get": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "getBeheerVoorraadBestellijst",
        "summary": "Wat moet er besteld worden?",
        "description": "Wat moet er besteld worden? Producten (per product) en ingrediënten die\nop of onder hun meldniveau zitten (zonder meldniveau: op 0 of minder).\nVoorstel = aanvullen tot - stand (leeg als \"aanvullen tot\" niet is ingesteld).\nMet ?alles=1 alles wat voorraad bijhoudt (om ook iets extra te bestellen).\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "alles",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "regels": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "soort": {
                                "type": "string",
                                "enum": [
                                  "artikel"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              },
                              "groep": {
                                "type": "string",
                                "nullable": true
                              },
                              "eenheid": {
                                "type": "string"
                              },
                              "voorraad": {
                                "type": "number"
                              },
                              "minimum": {
                                "type": "number",
                                "nullable": true
                              },
                              "aanvullenTot": {
                                "type": "number",
                                "nullable": true
                              },
                              "leverancier": {
                                "type": "string",
                                "nullable": true
                              },
                              "voorstel": {
                                "type": "number",
                                "nullable": true
                              }
                            },
                            "required": [
                              "soort",
                              "id",
                              "naam",
                              "groep",
                              "eenheid",
                              "voorraad",
                              "minimum",
                              "aanvullenTot",
                              "leverancier",
                              "voorstel"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "soort": {
                                "type": "string",
                                "enum": [
                                  "ingredient"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              },
                              "groep": {
                                "nullable": true
                              },
                              "eenheid": {
                                "type": "string"
                              },
                              "voorraad": {
                                "type": "number"
                              },
                              "minimum": {
                                "type": "number",
                                "nullable": true
                              },
                              "aanvullenTot": {
                                "type": "number",
                                "nullable": true
                              },
                              "leverancier": {
                                "type": "string",
                                "nullable": true
                              },
                              "voorstel": {
                                "type": "number",
                                "nullable": true
                              }
                            },
                            "required": [
                              "soort",
                              "id",
                              "naam",
                              "groep",
                              "eenheid",
                              "voorraad",
                              "minimum",
                              "aanvullenTot",
                              "leverancier",
                              "voorstel"
                            ]
                          }
                        ]
                      }
                    },
                    "bijgehouden": {
                      "type": "object",
                      "properties": {
                        "producten": {
                          "type": "number"
                        },
                        "viaIngredienten": {
                          "type": "number"
                        },
                        "ingredienten": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "producten",
                        "viaIngredienten",
                        "ingredienten"
                      ]
                    }
                  },
                  "required": [
                    "regels",
                    "bijgehouden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad/bestellijst/print": {
      "post": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "postBeheerVoorraadBestellijstPrint",
        "summary": "Bestellijst printen op de bonprinter (per leverancier)",
        "description": "Bestellijst printen op de bonprinter (per leverancier).\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regels": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Er staat niets met een aantal op de bestellijst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Er staat niets met een aantal op de bestellijst."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Printen lukte niet: …",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Printen lukte niet: …"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad/geschiedenis": {
      "get": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "getBeheerVoorraadGeschiedenis",
        "summary": "Geschiedenis (laatste 300), eventueel van één product of ingrediënt",
        "description": "Geschiedenis (laatste 300), eventueel van één product of ingrediënt.\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "artikelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ingredientId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mutaties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tijd": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string"
                          },
                          "hoeveelheid": {
                            "type": "number"
                          },
                          "voorraadNa": {
                            "type": "number"
                          },
                          "reden": {
                            "type": "string",
                            "nullable": true
                          },
                          "wat": {
                            "type": "string"
                          },
                          "eenheid": {
                            "type": "string",
                            "nullable": true
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelnummer": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "tijd",
                          "soort",
                          "hoeveelheid",
                          "voorraadNa",
                          "reden",
                          "wat",
                          "eenheid",
                          "door",
                          "bestelnummer"
                        ]
                      }
                    }
                  },
                  "required": [
                    "mutaties"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad/mutatie": {
      "post": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "postBeheerVoorraadMutatie",
        "summary": "Ontvangst (+), telling (nieuwe stand) of afboeken (-, bv",
        "description": "Ontvangst (+), telling (nieuwe stand) of afboeken (-, bv. breuk of\nderving) voor een product of een ingrediënt.\n\n**Toegang:** Vereist één van de rechten: `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "artikelId": {},
                  "ingredientId": {},
                  "soort": {},
                  "hoeveelheid": {},
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "voorraad": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "voorraad"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een product of een ingrediënt.\n- Kies ontvangst, telling of afboeken.\n- Vul een geldige hoeveelheid in.\n- Geef een reden op (bv. breuk, over datum).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een product of een ingrediënt."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Voorraad bijhouden staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/voorraad/optiegroep/{groepId}": {
      "get": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "getBeheerVoorraadOptiegroepGroepId",
        "summary": "Ingrediënten per keuze van een keuzegroep (bv",
        "description": "Ingrediënten per keuze van een keuzegroep (bv. Extra: kaas = 1 plak kaas). Migratie 028.\n\n**Toegang:** Vereist één van de rechten: `producten_beheren` (Producten, groepen en keuzeopties beheren), `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "groepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "opties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "recept": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "ingredientId": {
                                  "type": "string"
                                },
                                "hoeveelheid": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "ingredientId",
                                "hoeveelheid"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "recept"
                        ]
                      }
                    },
                    "ingredienten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "eenheid": {
                            "type": "string"
                          },
                          "voorraad": {
                            "type": "number"
                          },
                          "minimum": {
                            "type": "number",
                            "nullable": true
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "gebruikt": {
                            "type": "number"
                          },
                          "aanvullenTot": {
                            "type": "number",
                            "nullable": true
                          },
                          "leverancier": {
                            "type": "string",
                            "nullable": true
                          },
                          "leverancierId": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelcode": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelEan": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestelPer": {
                            "type": "number"
                          },
                          "bestelEenheid": {
                            "type": "string",
                            "nullable": true
                          },
                          "inkoopprijs": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "eenheid",
                          "voorraad",
                          "minimum",
                          "actief",
                          "gebruikt",
                          "aanvullenTot",
                          "leverancier",
                          "leverancierId",
                          "bestelcode",
                          "bestelEan",
                          "bestelPer",
                          "bestelEenheid",
                          "inkoopprijs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "opties",
                    "ingredienten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Keuzegroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Keuzegroep niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Draai eerst \"npm run db:migrate\" (migratie 028).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Voorraad"
        ],
        "operationId": "postBeheerVoorraadOptiegroepGroepId",
        "summary": "Alle keuzes van een keuzegroep in één keer opslaan: { opties: [{ id, recept }] }",
        "description": "Alle keuzes van een keuzegroep in één keer opslaan: { opties: [{ id, recept }] }.\n\n**Toegang:** Vereist één van de rechten: `producten_beheren` (Producten, groepen en keuzeopties beheren), `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "parameters": [
          {
            "name": "groepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "opties": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul bij \"…\" een hoeveelheid groter dan 0 in.\n- Bij \"…\" staat een ingrediënt twee keer.\n- Een ingrediënt bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul bij \"…\" een hoeveelheid groter dan 0 in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Keuzegroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Keuzegroep niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Voorraad bijhouden staat uit (Instellingen → Zaak).\n- Draai eerst \"npm run db:migrate\" (migratie 028).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Voorraad bijhouden staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/webshop-upsell": {
      "get": {
        "tags": [
          "webshopupsell"
        ],
        "operationId": "getBeheerWebshopUpsell",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "migratie114": {
                      "type": "boolean"
                    },
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "max": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "migratie114",
                    "groepen",
                    "max"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "webshopupsell"
        ],
        "operationId": "postBeheerWebshopUpsell",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "productgroepen waaruit de suggesties komen, in deze volgorde; leeg = uit"
                    },
                    "max": {
                      "type": "number",
                      "description": "hoeveel suggesties hooguit (1-8)"
                    },
                    "migratie114": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "groepen",
                    "max",
                    "migratie114"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/webshop/instellingen": {
      "post": {
        "tags": [
          "webshop"
        ],
        "operationId": "postBeheerWebshopInstellingen",
        "summary": "beheer",
        "description": "beheer",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "werkbon": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebshopInstelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/webshop/menu": {
      "post": {
        "tags": [
          "webshop"
        ],
        "operationId": "postBeheerWebshopMenu",
        "summary": "Menu nu naar de webshop sturen (gebeurt ook vanzelf na een wijziging in de producten)",
        "description": "Menu nu naar de webshop sturen (gebeurt ook vanzelf na een wijziging in de producten).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "aantal"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/weegschaal": {
      "get": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "getBeheerWeegschaal",
        "summary": "Instellingen van de weegschaal plus wat er op deze kassaserver kan",
        "description": "Instellingen van de weegschaal plus wat er op deze kassaserver kan.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "database": {
                      "type": "boolean"
                    },
                    "platform": {
                      "type": "string",
                      "enum": [
                        "android",
                        "linux",
                        "aix",
                        "darwin",
                        "freebsd",
                        "haiku",
                        "openbsd",
                        "sunos",
                        "win32",
                        "cygwin",
                        "netbsd"
                      ]
                    },
                    "ts6xRechtstreeks": {
                      "type": "boolean"
                    },
                    "ts6xUitleg": {
                      "type": "string"
                    },
                    "opTs6x": {
                      "type": "boolean"
                    },
                    "apparaatModel": {
                      "type": "string",
                      "nullable": true
                    },
                    "sdkMap": {
                      "type": "string"
                    },
                    "moduleMap": {
                      "type": "string"
                    },
                    "pluProducten": {
                      "type": "number"
                    },
                    "aan": {
                      "type": "boolean",
                      "description": "Producten met een prijs per kilo en wegen (Instellingen → Weegschaal)."
                    },
                    "handmatig": {
                      "type": "boolean",
                      "description": "Gewicht met de hand intikken mag (altijd mogelijk als er geen OS6X is)."
                    },
                    "os6x": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Os6xInstelling"
                      },
                      "description": "Aclas OS6X-weegschalen (meerdere kan: elk aan een eigen COM-/USB-poort van de\r\nkassaserver of via een eigen netwerkomzetter). Leeg = geen."
                    },
                    "ts6x": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Ts6xInstelling"
                        }
                      ],
                      "nullable": true,
                      "description": "Aclas TS6X etiketweegschaal; null = geen."
                    }
                  },
                  "required": [
                    "database",
                    "platform",
                    "ts6xRechtstreeks",
                    "ts6xUitleg",
                    "opTs6x",
                    "apparaatModel",
                    "sdkMap",
                    "moduleMap",
                    "pluProducten",
                    "aan",
                    "handmatig",
                    "os6x",
                    "ts6x"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "postBeheerWeegschaal",
        "summary": "Opslaan. Body (alles optioneel, niet meegestuurd = niet wijzigen): `{ aan, handmatig, os6x: [{ naam, model,…",
        "description": "Opslaan. Body (alles optioneel, niet meegestuurd = niet wijzigen):\n`{ aan, handmatig, os6x: [{ naam, model, verbinding, poort, btAdres, baud, host, tcpPoort, protocol, lijn }], ts6x: { model, host, poort, etiketPrefix, etiketInhoud, pluCijfers } | null }`.\n`model` = model uit ACLAS_MODELLEN (alle merken uit MERK_NAAM; bv. \"PS1CX\", \"TS6X\",\n\"Ariva-S\", \"CS 300\", \"DS-781\"); `verbinding` = serieel, netwerk, bluetooth of module (\"op dit\napparaat\": de kassa draait op de weegschaal, hooguit één); `protocol` = opvragen (Toledo 8217),\ncontinu, dialog06 of digi (DIGI Type B); `lijn` = 8N1 (standaard) of 7E1 (Mettler Toledo).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {},
                  "handmatig": {},
                  "os6x": {},
                  "ts6x": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "weegschaal": {
                      "$ref": "#/components/schemas/WeegschaalInstelling"
                    },
                    "vestiging": {
                      "$ref": "#/components/schemas/Vestiging"
                    }
                  },
                  "required": [
                    "ok",
                    "weegschaal",
                    "vestiging"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/weegschaal/plu-bestand": {
      "get": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "getBeheerWeegschaalPluBestand",
        "summary": "PLU-bestand voor de etiketweegschaal (tab-gescheiden tekst, UTF-8 met BOM, voor Aclas Link of de Aclas Sync…",
        "description": "PLU-bestand voor de etiketweegschaal (tab-gescheiden tekst, UTF-8 met BOM, voor Aclas Link of de Aclas Sync SDK).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 047).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 047)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/weegschaal/test": {
      "post": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "postBeheerWeegschaalTest",
        "summary": "Testen: één keer wegen op de gekozen OS6X (leeg = de eerste)",
        "description": "Testen: één keer wegen op de gekozen OS6X (leeg = de eerste).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "weegschaal": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "weegschaal": {
                      "type": "string"
                    },
                    "gewichtKg": {
                      "type": "number"
                    },
                    "brutoKg": {
                      "type": "number"
                    },
                    "tarraGram": {
                      "type": "number"
                    },
                    "stabiel": {
                      "type": "boolean"
                    },
                    "bedrag": {
                      "type": "number",
                      "description": "Dialog 06: bedrag en kiloprijs zoals de (geijkte) weegschaal ze rekende"
                    },
                    "weegschaalPrijs": {
                      "type": "number"
                    },
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "weegschaal",
                    "gewichtKg",
                    "brutoKg",
                    "tarraGram",
                    "stabiel",
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/weegschaal/ts6x/versturen": {
      "post": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "postBeheerWeegschaalTs6xVersturen",
        "summary": "De producten per kilo met een PLU-nummer rechtstreeks naar de etiketweegschaal (ook een TS- of AI-weegschaa…",
        "description": "De producten per kilo met een PLU-nummer rechtstreeks naar de etiketweegschaal (ook een\nTS- of AI-weegschaal of de AI Recognition Plugin van Aclas), met de Aclas Sync SDK\n(Windows of Linux-pc). Een aanraakweegschaal krijgt ook de afdeling en de productgroepen.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "groepen": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "aantal",
                    "groepen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/weegschaal/zoeken": {
      "post": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "postBeheerWeegschaalZoeken",
        "summary": "Vanzelf zoeken: draait de kassa op een Aclas pc-/AI-weegschaal (TS6X, TS5EX, iS6X ...) en antwoordt de Acla…",
        "description": "Vanzelf zoeken: draait de kassa op een Aclas pc-/AI-weegschaal (TS6X, TS5EX,\niS6X ...) en antwoordt de Aclas Scale Module, en welke weegschalen zitten\naan een COM-/USB-poort (alle poorten en snelheden proberen)? Geeft een\nvoorstel voor de instelling; de beheerder hoeft daarna alleen nog aan te\nzetten (opslaan met POST /api/beheer/weegschaal). `opnieuw: true` = niet het\nantwoord van de laatste minuut, echt opnieuw zoeken.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "opnieuw": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoekResultaat"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/werktijden": {
      "get": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "getBeheerWerktijden",
        "description": "**Toegang:** Alleen voor de rol **beheerder**.",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "stand": {
                          "type": "string",
                          "enum": [
                            "uit",
                            "aan",
                            "verplicht"
                          ]
                        },
                        "van": {
                          "type": "string"
                        },
                        "tot": {
                          "type": "string"
                        },
                        "aanwezig": {
                          "type": "array",
                          "items": {}
                        },
                        "diensten": {
                          "type": "array",
                          "items": {}
                        },
                        "perMedewerker": {
                          "type": "array",
                          "items": {}
                        },
                        "medewerkers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ]
                          }
                        }
                      },
                      "required": [
                        "stand",
                        "van",
                        "tot",
                        "aanwezig",
                        "diensten",
                        "perMedewerker",
                        "medewerkers"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "stand": {
                          "type": "string",
                          "enum": [
                            "uit",
                            "aan",
                            "verplicht"
                          ]
                        },
                        "van": {
                          "type": "string"
                        },
                        "tot": {
                          "type": "string"
                        },
                        "aanwezig": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "gebruikerId": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              },
                              "sinds": {
                                "type": "string",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "id",
                              "gebruikerId",
                              "naam",
                              "sinds"
                            ]
                          }
                        },
                        "diensten": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "gebruikerId": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              },
                              "in": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "uit": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true
                              },
                              "minuten": {
                                "type": "number"
                              },
                              "opmerking": {
                                "type": "string",
                                "nullable": true
                              },
                              "gewijzigd": {
                                "type": "boolean"
                              },
                              "gewijzigdDoor": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "id",
                              "gebruikerId",
                              "naam",
                              "in",
                              "uit",
                              "minuten",
                              "opmerking",
                              "gewijzigd",
                              "gewijzigdDoor"
                            ]
                          }
                        },
                        "perMedewerker": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "gebruikerId": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              },
                              "diensten": {
                                "type": "number"
                              },
                              "minuten": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "gebruikerId",
                              "naam",
                              "diensten",
                              "minuten"
                            ]
                          }
                        },
                        "medewerkers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "naam": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "naam"
                            ]
                          }
                        }
                      },
                      "required": [
                        "stand",
                        "van",
                        "tot",
                        "aanwezig",
                        "diensten",
                        "perMedewerker",
                        "medewerkers"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige periode (van tot en met tot).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van tot en met tot)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postBeheerWerktijden",
        "summary": "Dienst achteraf toevoegen (bv",
        "description": "Dienst achteraf toevoegen (bv. vergeten in te klokken).\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gebruikerId": {
                    "type": "string"
                  },
                  "in": {
                    "type": "string"
                  },
                  "uit": {
                    "type": "string"
                  },
                  "opmerking": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een medewerker.\n- Vul een begin- en eindtijd in.\n- Deze dienst overlapt met een andere dienst van deze medewerker.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een medewerker."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/werktijden/instelling": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postBeheerWerktijdenInstelling",
        "summary": "Klokken aan/uit/verplicht voor deze zaak",
        "description": "Klokken aan/uit/verplicht voor deze zaak.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "klokken": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vestiging"
                }
              }
            }
          },
          "400": {
            "description": "Kies uit, aan of verplicht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies uit, aan of verplicht."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/werktijden/{id}": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postBeheerWerktijdenId",
        "summary": "Begin- en eindtijd van een dienst corrigeren",
        "description": "Begin- en eindtijd van een dienst corrigeren. uit leeg = nog ingeklokt.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "in": {
                    "type": "string"
                  },
                  "uit": {
                    "type": "string",
                    "nullable": true
                  },
                  "opmerking": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul een begintijd in.\n- Ongeldige eindtijd.\n- Vul een eindtijd in; een afgesloten dienst kan niet weer open.\n- Deze dienst overlapt met een andere dienst van deze medewerker.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een begintijd in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Deze dienst bestaat niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze dienst bestaat niet."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/beheer/werktijden/{id}/uitklokken": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postBeheerWerktijdenIdUitklokken",
        "summary": "Iemand die nog ingeklokt staat (vergeten) nu uitklokken",
        "description": "Iemand die nog ingeklokt staat (vergeten) nu uitklokken.\n\n**Toegang:** Alleen voor de rol **beheerder**.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlokUitkomst"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Mogelijke meldingen:\n- Deze dienst bestaat niet.\n- Deze medewerker is niet (meer) ingeklokt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze dienst bestaat niet."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingen",
        "summary": "Opent een nieuwe bestelling, of geeft de lopende bestelling van de tafel terug",
        "description": "Opent een nieuwe bestelling, of geeft de lopende bestelling van de tafel\nterug. Met nieuweGroep: altijd een nieuwe groep aan de tafel erbij.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tafelId": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "ter_plaatse",
                      "afhalen",
                      "bezorgen"
                    ]
                  },
                  "gasten": {
                    "type": "number"
                  },
                  "nieuweGroep": {
                    "type": "boolean"
                  },
                  "groepNaam": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "description": "Offline aangemaakt op de tablet: de id die de tablet al gebruikte."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Onbekende soort bestelling.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende soort bestelling."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Tafel niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Tafel niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze bestelling bestaat al bij een andere zaak.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling bestaat al bij een andere zaak."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen-zonder-tafel": {
      "get": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "getBestellingenZonderTafel",
        "summary": "Open bestellingen zonder tafel (snelle verkoop aan de balie, afhalen), zodat ze op het tafelscherm terug te…",
        "description": "Open bestellingen zonder tafel (snelle verkoop aan de balie, afhalen),\nzodat ze op het tafelscherm terug te vinden zijn. Retouren niet.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}": {
      "get": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "getBestellingenId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/afrekenen": {
      "post": {
        "tags": [
          "Afrekenen"
        ],
        "operationId": "postBestellingenIdAfrekenen",
        "description": "**Toegang:** Controleert daarnaast: `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)), `onbetaald` (Afsluiten zonder betaling (gast vertrokken zonder te betalen)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "betalingen": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "methode": {
                          "type": "string",
                          "enum": [
                            "contant",
                            "pin",
                            "bon",
                            "online",
                            "overig",
                            "rekening",
                            "maaltijdcheque",
                            "valuta",
                            "kamer",
                            "onbetaald"
                          ]
                        },
                        "bedrag": {
                          "type": "number"
                        },
                        "fooi": {
                          "type": "number"
                        },
                        "terminalRef": {
                          "type": "string"
                        },
                        "handmatig": {
                          "type": "boolean",
                          "description": "Pin zonder de kassa: al op de terminal zelf gepind (bv. geen internet)."
                        },
                        "cadeaubonCode": {
                          "type": "string",
                          "description": "Cadeaubon met saldo: de code (migratie 026)."
                        },
                        "uitgever": {
                          "type": "string",
                          "description": "Maaltijdcheque (migratie 114): pluxee, edenred of monizze."
                        }
                      },
                      "required": [
                        "methode",
                        "bedrag"
                      ]
                    }
                  },
                  "email": {
                    "type": "string",
                    "description": "Bon per e-mail (als aan bij Instellingen → Zaak); leeg = niet mailen."
                  },
                  "contantBevestigd": {
                    "type": "boolean",
                    "description": "Contant € 3.000 of meer bij afhalen/bezorgen (NL, migratie 072): de medewerker bevestigde dat het mag."
                  },
                  "rekeningKlantId": {
                    "type": "string",
                    "description": "Op rekening (migratie 085): de zakelijke klant bij de betaling met methode \"rekening\"."
                  },
                  "print": {
                    "type": "boolean",
                    "description": "false = geen kassabon printen (kiosk: de bon komt op de printer van de kiosk; opnieuw printen kan via Bonnen)."
                  },
                  "bonTekst": {
                    "type": "number",
                    "description": "kiosk: de kassabon ook als tekst terug, op deze breedte (tekens)"
                  },
                  "kamer": {
                    "type": "object",
                    "properties": {
                      "gastId": {
                        "type": "string"
                      },
                      "reserveringId": {
                        "type": "string"
                      },
                      "kamer": {
                        "type": "string"
                      },
                      "naam": {
                        "type": "string"
                      }
                    },
                    "description": "Op de kamer (hotelkoppeling, migratie 129): de gast bij de betaling met methode \"kamer\"."
                  },
                  "reden": {
                    "type": "string",
                    "description": "Gast vertrokken zonder te betalen (methode \"onbetaald\", migratie 131): de reden (komt in het logboek)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "opRekening": {
                              "type": "object",
                              "properties": {
                                "fout": {
                                  "type": "string"
                                },
                                "verstuurd": {
                                  "type": "boolean"
                                },
                                "post": {
                                  "$ref": "#/components/schemas/RekeningPost"
                                },
                                "factuur": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "nummer": {
                                      "type": "string"
                                    },
                                    "openstaand": {
                                      "type": "number"
                                    },
                                    "vervaldatum": {
                                      "type": "string",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "nummer",
                                    "openstaand",
                                    "vervaldatum"
                                  ]
                                }
                              },
                              "required": [
                                "verstuurd"
                              ]
                            },
                            "opKamer": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "handmatig": {
                                      "type": "boolean"
                                    },
                                    "kamer": {
                                      "type": "string"
                                    },
                                    "naam": {
                                      "type": "string"
                                    },
                                    "geboekt": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "handmatig",
                                    "kamer",
                                    "naam",
                                    "geboekt"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kamer": {
                                      "type": "string"
                                    },
                                    "naam": {
                                      "type": "string"
                                    },
                                    "geboekt": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "kamer",
                                    "naam",
                                    "geboekt"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "fout": {
                                      "type": "string"
                                    },
                                    "kamer": {
                                      "type": "string"
                                    },
                                    "naam": {
                                      "type": "string"
                                    },
                                    "geboekt": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "fout",
                                    "kamer",
                                    "naam",
                                    "geboekt"
                                  ]
                                }
                              ]
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "fout": {
                              "type": "string"
                            },
                            "bestelling": {
                              "$ref": "#/components/schemas/Bestelling"
                            },
                            "ticketNummer": {
                              "type": "number"
                            },
                            "bonRegels": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "bonTekst": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
                            },
                            "printFout": {
                              "type": "string"
                            },
                            "cadeaubonnen": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "waarde": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "code",
                                  "waarde"
                                ]
                              },
                              "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
                            },
                            "mail": {
                              "type": "object",
                              "properties": {
                                "verstuurd": {
                                  "type": "boolean"
                                },
                                "fout": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "verstuurd"
                              ],
                              "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
                            }
                          },
                          "required": [
                            "opRekening",
                            "opKamer",
                            "ok"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "opRekening": {
                              "type": "object",
                              "properties": {
                                "fout": {
                                  "type": "string"
                                },
                                "verstuurd": {
                                  "type": "boolean"
                                },
                                "post": {
                                  "$ref": "#/components/schemas/RekeningPost"
                                },
                                "factuur": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "nummer": {
                                      "type": "string"
                                    },
                                    "openstaand": {
                                      "type": "number"
                                    },
                                    "vervaldatum": {
                                      "type": "string",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "nummer",
                                    "openstaand",
                                    "vervaldatum"
                                  ]
                                }
                              },
                              "required": [
                                "verstuurd"
                              ]
                            },
                            "opKamer": {},
                            "ok": {
                              "type": "boolean"
                            },
                            "fout": {
                              "type": "string"
                            },
                            "bestelling": {
                              "$ref": "#/components/schemas/Bestelling"
                            },
                            "ticketNummer": {
                              "type": "number"
                            },
                            "bonRegels": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "bonTekst": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
                            },
                            "printFout": {
                              "type": "string"
                            },
                            "cadeaubonnen": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "waarde": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "code",
                                  "waarde"
                                ]
                              },
                              "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
                            },
                            "mail": {
                              "type": "object",
                              "properties": {
                                "verstuurd": {
                                  "type": "boolean"
                                },
                                "fout": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "verstuurd"
                              ],
                              "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
                            }
                          },
                          "required": [
                            "opRekening",
                            "ok"
                          ]
                        }
                      ]
                    },
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "opKamer": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "handmatig": {
                                      "type": "boolean"
                                    },
                                    "kamer": {
                                      "type": "string"
                                    },
                                    "naam": {
                                      "type": "string"
                                    },
                                    "geboekt": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "handmatig",
                                    "kamer",
                                    "naam",
                                    "geboekt"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "kamer": {
                                      "type": "string"
                                    },
                                    "naam": {
                                      "type": "string"
                                    },
                                    "geboekt": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "kamer",
                                    "naam",
                                    "geboekt"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "fout": {
                                      "type": "string"
                                    },
                                    "kamer": {
                                      "type": "string"
                                    },
                                    "naam": {
                                      "type": "string"
                                    },
                                    "geboekt": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "fout",
                                    "kamer",
                                    "naam",
                                    "geboekt"
                                  ]
                                }
                              ]
                            },
                            "ok": {
                              "type": "boolean"
                            },
                            "fout": {
                              "type": "string"
                            },
                            "bestelling": {
                              "$ref": "#/components/schemas/Bestelling"
                            },
                            "ticketNummer": {
                              "type": "number"
                            },
                            "bonRegels": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "bonTekst": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
                            },
                            "printFout": {
                              "type": "string"
                            },
                            "cadeaubonnen": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "waarde": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "code",
                                  "waarde"
                                ]
                              },
                              "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
                            },
                            "mail": {
                              "type": "object",
                              "properties": {
                                "verstuurd": {
                                  "type": "boolean"
                                },
                                "fout": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "verstuurd"
                              ],
                              "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
                            }
                          },
                          "required": [
                            "opKamer",
                            "ok"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "opKamer": {},
                            "ok": {
                              "type": "boolean"
                            },
                            "fout": {
                              "type": "string"
                            },
                            "bestelling": {
                              "$ref": "#/components/schemas/Bestelling"
                            },
                            "ticketNummer": {
                              "type": "number"
                            },
                            "bonRegels": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "bonTekst": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
                            },
                            "printFout": {
                              "type": "string"
                            },
                            "cadeaubonnen": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "waarde": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "code",
                                  "waarde"
                                ]
                              },
                              "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
                            },
                            "mail": {
                              "type": "object",
                              "properties": {
                                "verstuurd": {
                                  "type": "boolean"
                                },
                                "fout": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "verstuurd"
                              ],
                              "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige betalingen.\n- Dit e-mailadres klopt niet.\n- Geef minstens één betaling op.\n- Betaalbedragen moeten hele centen zijn.\n- Een negatief bedrag kan alleen bij een negatieve bon (statiegeld terug): één terugbetaling, contant of pin.\n- Het terug te betalen bedrag klopt niet met de bon.\n- Ongeldige fooi (hele centen, hooguit € 500).\n- Op rekening: één bedrag, zonder fooi.\n- Zonder betaling afsluiten: geen andere betaling en geen fooi.\n- Geef een reden (bv. gast vertrokken zonder te betalen).\n- Zonder betaling afsluiten kan alleen voor het hele bedrag dat nog open staat.\n- Op de kamer: één bedrag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige betalingen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je hebt geen recht om op rekening af te rekenen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je hebt geen recht om op rekening af te rekenen."
                }
              }
            }
          },
          "404": {
            "description": "Deze bestelling bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling bestaat niet (meer)."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/afroepen": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdAfroepen",
        "summary": "Volgende gang afroepen: de keuken krijgt een bon \"AFROEP GANG 2\" met wat er nu gemaakt moet worden",
        "description": "Volgende gang afroepen: de keuken krijgt een bon \"AFROEP GANG 2\" met\nwat er nu gemaakt moet worden. Met gang: die gang (en eerdere wachtende).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gang": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gang": {
                      "type": "number"
                    },
                    "afgeroepen": {
                      "type": "number"
                    },
                    "printFouten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "werkbonnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "printer": {
                            "type": "string"
                          },
                          "regels": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "printer",
                          "regels"
                        ]
                      }
                    },
                    "zonderPrinter": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "nummer": {
                      "type": "number"
                    },
                    "tafelId": {
                      "type": "string",
                      "nullable": true
                    },
                    "tafelNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "ter_plaatse",
                        "afhalen",
                        "bezorgen"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "betaald",
                        "geannuleerd"
                      ]
                    },
                    "gasten": {
                      "type": "number"
                    },
                    "opmerking": {
                      "type": "string",
                      "nullable": true
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Bestelregel"
                      }
                    },
                    "betalingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Betaling"
                      }
                    },
                    "totaal": {
                      "type": "number"
                    },
                    "betaald": {
                      "type": "number"
                    },
                    "openstaand": {
                      "type": "number"
                    },
                    "btw": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BtwRegel"
                      }
                    },
                    "geopendOp": {
                      "type": "string"
                    },
                    "groepNummer": {
                      "type": "number",
                      "description": "Groep aan de tafel: 1, 2, 3 ... (meerdere rekeningen aan één tafel)."
                    },
                    "groepNaam": {
                      "type": "string",
                      "nullable": true,
                      "description": "Eigen naam van de groep, bv. \"Jansen\"."
                    },
                    "aantalGroepen": {
                      "type": "number",
                      "description": "Hoeveel open groepen er nu aan deze tafel zitten (inclusief deze)."
                    },
                    "apartVan": {
                      "type": "string",
                      "description": "Apart afrekenen (migratie 131): dit deel komt uit deze rekening (zonder splitsen)."
                    },
                    "klant": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        },
                        "punten": {
                          "type": "number"
                        },
                        "gastprofiel": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/GastProfiel"
                            }
                          ],
                          "description": "Gastprofiel (migratie 115; alleen als het aan staat): VIP, dieetwensen/allergieën (codes) en voorkeuren."
                        }
                      },
                      "required": [
                        "id",
                        "naam",
                        "punten"
                      ],
                      "nullable": true,
                      "description": "Klantenkaart: gekoppelde klant (migratie 038)."
                    },
                    "ayce": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AyceBestelling"
                        }
                      ],
                      "nullable": true,
                      "description": "All-you-can-eat voor deze groep (migratie 042); ontbreekt = gewone bestelling."
                    },
                    "gewenstOp": {
                      "type": "string",
                      "nullable": true,
                      "description": "Gewenste tijd (afhalen/bezorgen met een tijdvak, of webshop; migratie 060)."
                    },
                    "bezorging": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/BezorgGegevens"
                        }
                      ],
                      "nullable": true,
                      "description": "Bezorg- of afhaalgegevens van een bestelling uit de kassa (migratie 060)."
                    },
                    "leeftijd18": {
                      "type": "boolean",
                      "description": "Leeftijdscheck (migratie 072): afhalen/bezorgen met alcohol en de leeftijdscheck aan: \"18+\" op de bonnen."
                    },
                    "leeftijdBevestigd": {
                      "type": "boolean",
                      "description": "De klant bevestigde in de webshop 18 jaar of ouder te zijn (migratie 072)."
                    }
                  },
                  "required": [
                    "gang",
                    "afgeroepen",
                    "printFouten",
                    "werkbonnen",
                    "zonderPrinter",
                    "id",
                    "nummer",
                    "tafelId",
                    "tafelNaam",
                    "type",
                    "status",
                    "gasten",
                    "opmerking",
                    "regels",
                    "betalingen",
                    "totaal",
                    "betaald",
                    "openstaand",
                    "btw",
                    "geopendOp"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Gang … wacht niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Gang … wacht niet."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- De database is niet bijgewerkt. Draai npm run db:migrate (migratie 016).\n- Er wacht geen gang meer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai npm run db:migrate (migratie 016)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/apart/terug": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdApartTerug",
        "summary": "Apart afrekenen annuleren (migratie 131): de regels gaan terug naar de rekening waar ze uit kwamen (zonder …",
        "description": "Apart afrekenen annuleren (migratie 131): de regels gaan terug naar de rekening waar ze uit kwamen (zonder event bij\nde zwarte doos, want er werd ook niets verplaatst). Alleen zolang er op het aparte deel nog niets betaald is.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/ayce": {
      "post": {
        "tags": [
          "All-you-can-eat"
        ],
        "operationId": "postBestellingenIdAyce",
        "summary": "Starten, aantallen wijzigen of stoppen",
        "description": "Starten, aantallen wijzigen of stoppen.\nBody: { arrangementen: [{ arrangementId, volwassenen, kinderen }] }: de hele\nstand van deze groep; een arrangement dat er niet bij staat (of 0 + 0) stopt.\nKort (zaak met één arrangement): { volwassenen, kinderen }.\n\n**Toegang:** Controleert daarnaast: `storno` (Regels schrappen na bestellen (storno)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "arrangementen": {},
                  "volwassenen": {},
                  "kinderen": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige keuze van arrangementen.\n- Per arrangement: aantal volwassenen en kinderen 0 tot 99.\n- Elk arrangement mag maar één keer in de keuze staan.\n- Aantal volwassenen en kinderen: 0 tot 99.\n- Kies per arrangement hoeveel volwassenen en kinderen.\n- Dit arrangement bestaat niet (meer). Vernieuw het scherm.\n- Vul in voor hoeveel personen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige keuze van arrangementen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- All-you-can-eat staat uit (Instellingen → Zaak).\n- De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 043).\n- Deze bestelling is al afgerekend.\n- Arrangement \"…\" bestaat niet meer; meer personen kan niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "All-you-can-eat staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/ayce/toeslag": {
      "post": {
        "tags": [
          "All-you-can-eat"
        ],
        "operationId": "postBestellingenIdAyceToeslag",
        "summary": "Verspillingstoeslag: { aantal, arrangementId?",
        "description": "Verspillingstoeslag: { aantal, arrangementId? } × de toeslag van dat arrangement.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aantal": {},
                  "arrangementId": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Aantal: 1 tot 99.\n- Kies bij welk arrangement de toeslag hoort.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Aantal: 1 tot 99."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Er is geen verspillingstoeslag ingesteld (Instellingen → Zaak → All-you-can-eat).\n- De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 043).\n- Deze bestelling is al afgerekend.\n- Bij deze groep loopt geen all-you-can-eat met een verspillingstoeslag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Er is geen verspillingstoeslag ingesteld (Instellingen → Zaak → All-you-can-eat)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/bestellen": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdBestellen",
        "summary": "\"Bestellen\": nieuwe regels gaan naar de keuken/bar en krijgen de status besteld",
        "description": "\"Bestellen\": nieuwe regels gaan naar de keuken/bar en krijgen de status\nbesteld. Daarna kunnen ze niet meer zomaar weg - een annulering wordt dan\neen storno, en die blijft zichtbaar in het journaal.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "negeerRegels": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "gebonnen": {
                          "type": "number"
                        },
                        "id": {
                          "type": "string"
                        },
                        "nummer": {
                          "type": "number"
                        },
                        "tafelId": {
                          "type": "string",
                          "nullable": true
                        },
                        "tafelNaam": {
                          "type": "string",
                          "nullable": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "ter_plaatse",
                            "afhalen",
                            "bezorgen"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "betaald",
                            "geannuleerd"
                          ]
                        },
                        "gasten": {
                          "type": "number"
                        },
                        "opmerking": {
                          "type": "string",
                          "nullable": true
                        },
                        "regels": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Bestelregel"
                          }
                        },
                        "betalingen": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Betaling"
                          }
                        },
                        "totaal": {
                          "type": "number"
                        },
                        "betaald": {
                          "type": "number"
                        },
                        "openstaand": {
                          "type": "number"
                        },
                        "btw": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BtwRegel"
                          }
                        },
                        "geopendOp": {
                          "type": "string"
                        },
                        "groepNummer": {
                          "type": "number",
                          "description": "Groep aan de tafel: 1, 2, 3 ... (meerdere rekeningen aan één tafel)."
                        },
                        "groepNaam": {
                          "type": "string",
                          "nullable": true,
                          "description": "Eigen naam van de groep, bv. \"Jansen\"."
                        },
                        "aantalGroepen": {
                          "type": "number",
                          "description": "Hoeveel open groepen er nu aan deze tafel zitten (inclusief deze)."
                        },
                        "apartVan": {
                          "type": "string",
                          "description": "Apart afrekenen (migratie 131): dit deel komt uit deze rekening (zonder splitsen)."
                        },
                        "klant": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "naam": {
                              "type": "string"
                            },
                            "punten": {
                              "type": "number"
                            },
                            "gastprofiel": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/GastProfiel"
                                }
                              ],
                              "description": "Gastprofiel (migratie 115; alleen als het aan staat): VIP, dieetwensen/allergieën (codes) en voorkeuren."
                            }
                          },
                          "required": [
                            "id",
                            "naam",
                            "punten"
                          ],
                          "nullable": true,
                          "description": "Klantenkaart: gekoppelde klant (migratie 038)."
                        },
                        "ayce": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/AyceBestelling"
                            }
                          ],
                          "nullable": true,
                          "description": "All-you-can-eat voor deze groep (migratie 042); ontbreekt = gewone bestelling."
                        },
                        "gewenstOp": {
                          "type": "string",
                          "nullable": true,
                          "description": "Gewenste tijd (afhalen/bezorgen met een tijdvak, of webshop; migratie 060)."
                        },
                        "bezorging": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BezorgGegevens"
                            }
                          ],
                          "nullable": true,
                          "description": "Bezorg- of afhaalgegevens van een bestelling uit de kassa (migratie 060)."
                        },
                        "leeftijd18": {
                          "type": "boolean",
                          "description": "Leeftijdscheck (migratie 072): afhalen/bezorgen met alcohol en de leeftijdscheck aan: \"18+\" op de bonnen."
                        },
                        "leeftijdBevestigd": {
                          "type": "boolean",
                          "description": "De klant bevestigde in de webshop 18 jaar of ouder te zijn (migratie 072)."
                        }
                      },
                      "required": [
                        "gebonnen",
                        "id",
                        "nummer",
                        "tafelId",
                        "tafelNaam",
                        "type",
                        "status",
                        "gasten",
                        "opmerking",
                        "regels",
                        "betalingen",
                        "totaal",
                        "betaald",
                        "openstaand",
                        "btw",
                        "geopendOp"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "gebonnen": {
                          "type": "number"
                        },
                        "printFouten": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "werkbonnen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "printer": {
                                "type": "string"
                              },
                              "regels": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "printer",
                              "regels"
                            ]
                          }
                        },
                        "zonderPrinter": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "wachtGangen": {
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        },
                        "id": {
                          "type": "string"
                        },
                        "nummer": {
                          "type": "number"
                        },
                        "tafelId": {
                          "type": "string",
                          "nullable": true
                        },
                        "tafelNaam": {
                          "type": "string",
                          "nullable": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "ter_plaatse",
                            "afhalen",
                            "bezorgen"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "betaald",
                            "geannuleerd"
                          ]
                        },
                        "gasten": {
                          "type": "number"
                        },
                        "opmerking": {
                          "type": "string",
                          "nullable": true
                        },
                        "regels": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Bestelregel"
                          }
                        },
                        "betalingen": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Betaling"
                          }
                        },
                        "totaal": {
                          "type": "number"
                        },
                        "betaald": {
                          "type": "number"
                        },
                        "openstaand": {
                          "type": "number"
                        },
                        "btw": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BtwRegel"
                          }
                        },
                        "geopendOp": {
                          "type": "string"
                        },
                        "groepNummer": {
                          "type": "number",
                          "description": "Groep aan de tafel: 1, 2, 3 ... (meerdere rekeningen aan één tafel)."
                        },
                        "groepNaam": {
                          "type": "string",
                          "nullable": true,
                          "description": "Eigen naam van de groep, bv. \"Jansen\"."
                        },
                        "aantalGroepen": {
                          "type": "number",
                          "description": "Hoeveel open groepen er nu aan deze tafel zitten (inclusief deze)."
                        },
                        "apartVan": {
                          "type": "string",
                          "description": "Apart afrekenen (migratie 131): dit deel komt uit deze rekening (zonder splitsen)."
                        },
                        "klant": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "naam": {
                              "type": "string"
                            },
                            "punten": {
                              "type": "number"
                            },
                            "gastprofiel": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/GastProfiel"
                                }
                              ],
                              "description": "Gastprofiel (migratie 115; alleen als het aan staat): VIP, dieetwensen/allergieën (codes) en voorkeuren."
                            }
                          },
                          "required": [
                            "id",
                            "naam",
                            "punten"
                          ],
                          "nullable": true,
                          "description": "Klantenkaart: gekoppelde klant (migratie 038)."
                        },
                        "ayce": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/AyceBestelling"
                            }
                          ],
                          "nullable": true,
                          "description": "All-you-can-eat voor deze groep (migratie 042); ontbreekt = gewone bestelling."
                        },
                        "gewenstOp": {
                          "type": "string",
                          "nullable": true,
                          "description": "Gewenste tijd (afhalen/bezorgen met een tijdvak, of webshop; migratie 060)."
                        },
                        "bezorging": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BezorgGegevens"
                            }
                          ],
                          "nullable": true,
                          "description": "Bezorg- of afhaalgegevens van een bestelling uit de kassa (migratie 060)."
                        },
                        "leeftijd18": {
                          "type": "boolean",
                          "description": "Leeftijdscheck (migratie 072): afhalen/bezorgen met alcohol en de leeftijdscheck aan: \"18+\" op de bonnen."
                        },
                        "leeftijdBevestigd": {
                          "type": "boolean",
                          "description": "De klant bevestigde in de webshop 18 jaar of ouder te zijn (migratie 072)."
                        }
                      },
                      "required": [
                        "gebonnen",
                        "printFouten",
                        "werkbonnen",
                        "zonderPrinter",
                        "wachtGangen",
                        "id",
                        "nummer",
                        "tafelId",
                        "tafelNaam",
                        "type",
                        "status",
                        "gasten",
                        "opmerking",
                        "regels",
                        "betalingen",
                        "totaal",
                        "betaald",
                        "openstaand",
                        "btw",
                        "geopendOp"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/cadeaubon": {
      "post": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "postBestellingenIdCadeaubon",
        "summary": "Cadeaubon verkopen: komt als regel op de bestelling (btw-code BON, geen omzet, gaat niet naar de keuken). A…",
        "description": "Cadeaubon verkopen: komt als regel op de bestelling (btw-code BON, geen\nomzet, gaat niet naar de keuken). Actief na het afrekenen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bedrag": {},
                  "code": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een bedrag van € 1 tot € 1.000.\n- Een code heeft 4 tot 32 letters of cijfers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een bedrag van € 1 tot € 1.000."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is al afgerekend.\n- Op een retour kan geen cadeaubon.\n- Deze code is al in gebruik.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/deelbetaling": {
      "post": {
        "tags": [
          "Afrekenen"
        ],
        "operationId": "postBestellingenIdDeelbetaling",
        "summary": "Deelbetaling (rekening splitsen): een deel van het openstaande bedrag betalen, bv",
        "description": "Deelbetaling (rekening splitsen): een deel van het openstaande bedrag\nbetalen, bv. per persoon. De bestelling blijft open; de bon (met alle\nbetalingen erop) komt bij de laatste betaling via het gewone afrekenen.\nZonder deelbetalingen verandert er niets aan het afrekenen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "betaling": {
                    "$ref": "#/components/schemas/Betaalregel"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bestelling": {
                      "$ref": "#/components/schemas/Bestelling"
                    }
                  },
                  "required": [
                    "ok",
                    "bestelling"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een betaalwijze.\n- Vul een bedrag groter dan 0 in.\n- Ongeldige fooi (hele centen, hooguit € 500).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een betaalwijze."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is al afgerekend.\n- Een retour kan niet in delen.\n- Dit is het hele openstaande bedrag: reken gewoon af.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/gasten": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdGasten",
        "summary": "Aantal personen van een groep (bestelling) wijzigen",
        "description": "Aantal personen van een groep (bestelling) wijzigen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gasten": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Aantal personen moet tussen 1 en 99 liggen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Aantal personen moet tussen 1 en 99 liggen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Open bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Open bestelling niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/geld": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getBestellingenIdGeld",
        "summary": "Lopende of geslaagde (nog niet verwerkte) betaling bij de automaat van een bestelling",
        "description": "Lopende of geslaagde (nog niet verwerkte) betaling bij de automaat van een bestelling.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "nullable": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "bestellingId": {
                          "type": "string",
                          "nullable": true
                        },
                        "soort": {
                          "type": "string",
                          "enum": [
                            "betaling",
                            "uitbetaling",
                            "bijvullen",
                            "legen"
                          ]
                        },
                        "bedrag": {
                          "type": "number"
                        },
                        "ingeworpen": {
                          "type": "number"
                        },
                        "uitbetaald": {
                          "type": "number"
                        },
                        "nietUitbetaald": {
                          "type": "number"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "geannuleerd",
                            "starten",
                            "mislukt",
                            "bezig",
                            "geslaagd"
                          ]
                        },
                        "fout": {
                          "type": "string",
                          "nullable": true
                        },
                        "verwerkt": {
                          "type": "boolean"
                        },
                        "aangemaaktOp": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "bestellingId",
                        "soort",
                        "bedrag",
                        "ingeworpen",
                        "uitbetaald",
                        "nietUitbetaald",
                        "status",
                        "fout",
                        "verwerkt",
                        "aangemaaktOp"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/geld/start": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postBestellingenIdGeldStart",
        "summary": "Betalen bij de automaat: het openstaande bedrag (contant afgerond als dat aan staat) of een deel, plus fooi",
        "description": "Betalen bij de automaat: het openstaande bedrag (contant afgerond als dat aan staat) of een deel, plus fooi.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fooi": {},
                  "bedrag": {},
                  "contantBevestigd": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "betaling",
                        "uitbetaling",
                        "bijvullen",
                        "legen"
                      ]
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ingeworpen": {
                      "type": "number"
                    },
                    "uitbetaald": {
                      "type": "number"
                    },
                    "nietUitbetaald": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "geannuleerd",
                        "starten",
                        "mislukt",
                        "bezig",
                        "geslaagd"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "soort",
                    "bedrag",
                    "ingeworpen",
                    "uitbetaald",
                    "nietUitbetaald",
                    "status",
                    "fout",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige fooi (hele centen, hooguit € 500).\n- Ongeldig deelbedrag: groter dan 0 en hooguit het openstaande bedrag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige fooi (hele centen, hooguit € 500)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is al afgerekend.\n- Er staat niets meer open.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/groepnaam": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdGroepnaam",
        "summary": "Naam van een groep aan de tafel wijzigen ('' = weer automatisch \"groep 2\")",
        "description": "Naam van een groep aan de tafel wijzigen ('' = weer automatisch \"groep 2\").",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Open bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Open bestelling niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/klant": {
      "post": {
        "tags": [
          "Klanten"
        ],
        "operationId": "postBestellingenIdKlant",
        "summary": "Klant aan een (open) bestelling koppelen of loskoppelen (klantId null)",
        "description": "Klant aan een (open) bestelling koppelen of loskoppelen (klantId null).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "klantId": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Mogelijke meldingen:\n- Bestelling niet gevonden.\n- Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze bestelling is al afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/korting": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdKorting",
        "summary": "Korting geven (manager/beheerder): op één regel of op de hele bon, als percentage of vast bedrag, met een r…",
        "description": "Korting geven (manager/beheerder): op één regel of op de hele bon, als\npercentage of vast bedrag, met een reden. De korting wordt een eigen regel\nmet negatieve prijs per btw-tarief, zodat totaal en btw altijd kloppen.\n\n**Toegang:** Controleert daarnaast: `korting` (Korting geven).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regelId": {
                    "type": "string"
                  },
                  "procent": {
                    "type": "number"
                  },
                  "bedrag": {
                    "type": "number"
                  },
                  "reden": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Geef een reden voor de korting.\n- Kies een percentage óf een bedrag.\n- Het percentage moet tussen 0 en 100 liggen.\n- Vul een geldig kortingsbedrag in.\n- De korting is hoger dan het bedrag.\n- De korting is te klein.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef een reden voor de korting."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Mogelijke meldingen:\n- Bestelling niet gevonden.\n- Regel niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- De database is niet bijgewerkt. Draai npm run db:migrate (migratie 017).\n- Deze bestelling is al afgerekend.\n- Er is al (deels) betaald; korting kan dan niet meer.\n- Op wegwerptoeslag of statiegeld kan geen korting.\n- Op een cadeaubon kan geen korting.\n- Op deze regel staat al korting. Haal die eerst weg.\n- Er is niets om korting op te geven.\n- Er staat al zoveel korting op de bon dat deze korting niet meer past.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai npm run db:migrate (migratie 017)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/kortingscode": {
      "post": {
        "tags": [
          "Kortingscodes"
        ],
        "operationId": "postBestellingenIdKortingscode",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Vul een kortingscode in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een kortingscode in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- De database is niet bijgewerkt. Draai npm run db:migrate.\n- Deze bestelling is al afgerekend.\n- Er is al (deels) betaald; een kortingscode kan dan niet meer.\n- Er staat al een kortingscode op deze bon. Haal die eerst weg.\n- Er staat nog niets op de bon om korting op te geven.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai npm run db:migrate."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/leeg-sluiten": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdLeegSluiten",
        "summary": "Een lege bestelling zonder tafel weggooien (snelle verkoop geopend en toch niets verkocht)",
        "description": "Een lege bestelling zonder tafel weggooien (snelle verkoop geopend en\ntoch niets verkocht). Alleen als er niets op staat en niets betaald is.\nMet ookTafel ook aan een tafel (\"Tafel vrijgeven\": gasten weg zonder bestellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ookTafel": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Deze bestelling is niet leeg en blijft open.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is niet leeg en blijft open."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/opwaarderen": {
      "post": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "postBestellingenIdOpwaarderen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {},
                  "bedrag": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/pin": {
      "get": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "getBestellingenIdPin",
        "summary": "Lopende of geslaagde-maar-niet-verwerkte pinbetaling van een bestelling",
        "description": "Lopende of geslaagde-maar-niet-verwerkte pinbetaling van een bestelling.\nZo raakt een betaling nooit zoek als de tablet halverwege uitvalt.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string"
                    },
                    "terminalNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "starten",
                        "started",
                        "pending",
                        "success",
                        "failed"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "testmodus": {
                      "type": "boolean"
                    },
                    "terugbetaling": {
                      "type": "boolean"
                    },
                    "fooi": {
                      "type": "number"
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "terminalNaam",
                    "bedrag",
                    "status",
                    "fout",
                    "testmodus",
                    "terugbetaling",
                    "fooi",
                    "verwerkt",
                    "aangemaaktOp"
                  ],
                  "nullable": true
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/pin/start": {
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postBestellingenIdPinStart",
        "summary": "Betaling starten op de terminal, voor het openstaande bedrag plus eventuele fooi",
        "description": "Betaling starten op de terminal, voor het openstaande bedrag plus eventuele fooi.\nMet `bedrag` (rekening splitsen): alleen dat deel, hooguit het openstaande bedrag.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "terminal": {
                    "type": "string"
                  },
                  "fooi": {
                    "type": "number"
                  },
                  "bedrag": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string"
                    },
                    "terminalNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "starten",
                        "started",
                        "pending",
                        "success",
                        "failed"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "testmodus": {
                      "type": "boolean"
                    },
                    "terugbetaling": {
                      "type": "boolean"
                    },
                    "fooi": {
                      "type": "number"
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "terminalNaam",
                    "bedrag",
                    "status",
                    "fout",
                    "testmodus",
                    "terugbetaling",
                    "fooi",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige fooi (hele centen, hooguit € 500).\n- Ongeldig deelbedrag: groter dan 0 en hooguit het openstaande bedrag.\n- Kies een terminal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige fooi (hele centen, hooguit € 500)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- De pinkoppeling is niet ingesteld (Instellingen → Betalen).\n- Deze bestelling is al afgerekend.\n- Er staat niets meer open.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De pinkoppeling is niet ingesteld (Instellingen → Betalen)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/proforma": {
      "post": {
        "tags": [
          "Afrekenen"
        ],
        "operationId": "postBestellingenIdProforma",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AfrekenResultaat"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/regels": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdRegels",
        "summary": "Regels toevoegen",
        "description": "Regels toevoegen. De prijs wordt op de server bepaald, nooit door de client.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regels": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/NieuweRegel"
                    }
                  },
                  "sleutel": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige regels.\n- Geen regels ontvangen.\n- Ongeldig aantal (meer dan 0, hooguit …).\n- Kies een stoel van 1 tot 99.\n- Vul een geldige prijs in.\n- \"…\" is op (voorraad 0). Kies iets anders.\n- Etiketten scannen staat uit (Instellingen → Weegschaal).\n- Dit etiket hoort bij \"…\", niet bij dit product.\n- Dit product bestaat niet meer. Vernieuw het scherm en kies opnieuw.\n- De database is niet bijgewerkt. Draai \"npm run db:migrate\" (migratie 025).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige regels."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is al afgerekend.\n- Deze bestelling is net afgerekend. Open de tafel opnieuw.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/regels/verdeel": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdRegelsVerdeel",
        "summary": "Rekening in één keer over meerdere groepen of tafels verdelen (UC242, UC4119bis): elk deel naar een bestaan…",
        "description": "Rekening in één keer over meerdere groepen of tafels verdelen (UC242, UC4119bis): elk deel naar een bestaande groep,\neen nieuwe groep aan deze tafel of een nieuwe groep aan een andere tafel. Bij de zwarte doos één tafelwissel voor alles.\n  POST /api/bestellingen/:id/regels/verdeel  { delen: [{ regels: [{ id, aantal }], naar? | nieuweGroep? | naarTafel?, groepNaam? }] }",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delen": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/VerplaatsBody"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aantal": {
                      "type": "number"
                    },
                    "van": {
                      "$ref": "#/components/schemas/Bestelling"
                    },
                    "naar": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Bestelling"
                      }
                    },
                    "gks2Fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "aantal",
                    "van",
                    "naar"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Geef 1 tot 10 delen op.\n- Apart afrekenen gaat per deel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef 1 tot 10 delen op."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/regels/verplaats": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdRegelsVerplaats",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerplaatsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aantal": {
                      "type": "number"
                    },
                    "van": {
                      "$ref": "#/components/schemas/Bestelling"
                    },
                    "naar": {
                      "$ref": "#/components/schemas/Bestelling"
                    },
                    "gks2Fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "aantal",
                    "van",
                    "naar"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/regels/{regelId}": {
      "delete": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "deleteBestellingenIdRegelsRegelId",
        "summary": "Regel verwijderen (nog niet besteld) of storneren (al naar de keuken)",
        "description": "Regel verwijderen (nog niet besteld) of storneren (al naar de keuken).\n\n**Toegang:** Controleert daarnaast: `korting_weghalen` (Korting weghalen), `storno` (Regels schrappen na bestellen (storno)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reden": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Bestelling"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "gks2Fout": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "nummer": {
                          "type": "number"
                        },
                        "tafelId": {
                          "type": "string",
                          "nullable": true
                        },
                        "tafelNaam": {
                          "type": "string",
                          "nullable": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "ter_plaatse",
                            "afhalen",
                            "bezorgen"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "betaald",
                            "geannuleerd"
                          ]
                        },
                        "gasten": {
                          "type": "number"
                        },
                        "opmerking": {
                          "type": "string",
                          "nullable": true
                        },
                        "regels": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Bestelregel"
                          }
                        },
                        "betalingen": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Betaling"
                          }
                        },
                        "totaal": {
                          "type": "number"
                        },
                        "betaald": {
                          "type": "number"
                        },
                        "openstaand": {
                          "type": "number"
                        },
                        "btw": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BtwRegel"
                          }
                        },
                        "geopendOp": {
                          "type": "string"
                        },
                        "groepNummer": {
                          "type": "number",
                          "description": "Groep aan de tafel: 1, 2, 3 ... (meerdere rekeningen aan één tafel)."
                        },
                        "groepNaam": {
                          "type": "string",
                          "nullable": true,
                          "description": "Eigen naam van de groep, bv. \"Jansen\"."
                        },
                        "aantalGroepen": {
                          "type": "number",
                          "description": "Hoeveel open groepen er nu aan deze tafel zitten (inclusief deze)."
                        },
                        "apartVan": {
                          "type": "string",
                          "description": "Apart afrekenen (migratie 131): dit deel komt uit deze rekening (zonder splitsen)."
                        },
                        "klant": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "naam": {
                              "type": "string"
                            },
                            "punten": {
                              "type": "number"
                            },
                            "gastprofiel": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/GastProfiel"
                                }
                              ],
                              "description": "Gastprofiel (migratie 115; alleen als het aan staat): VIP, dieetwensen/allergieën (codes) en voorkeuren."
                            }
                          },
                          "required": [
                            "id",
                            "naam",
                            "punten"
                          ],
                          "nullable": true,
                          "description": "Klantenkaart: gekoppelde klant (migratie 038)."
                        },
                        "ayce": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/AyceBestelling"
                            }
                          ],
                          "nullable": true,
                          "description": "All-you-can-eat voor deze groep (migratie 042); ontbreekt = gewone bestelling."
                        },
                        "gewenstOp": {
                          "type": "string",
                          "nullable": true,
                          "description": "Gewenste tijd (afhalen/bezorgen met een tijdvak, of webshop; migratie 060)."
                        },
                        "bezorging": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/BezorgGegevens"
                            }
                          ],
                          "nullable": true,
                          "description": "Bezorg- of afhaalgegevens van een bestelling uit de kassa (migratie 060)."
                        },
                        "leeftijd18": {
                          "type": "boolean",
                          "description": "Leeftijdscheck (migratie 072): afhalen/bezorgen met alcohol en de leeftijdscheck aan: \"18+\" op de bonnen."
                        },
                        "leeftijdBevestigd": {
                          "type": "boolean",
                          "description": "De klant bevestigde in de webshop 18 jaar of ouder te zijn (migratie 072)."
                        }
                      },
                      "required": [
                        "id",
                        "nummer",
                        "tafelId",
                        "tafelNaam",
                        "type",
                        "status",
                        "gasten",
                        "opmerking",
                        "regels",
                        "betalingen",
                        "totaal",
                        "betaald",
                        "openstaand",
                        "btw",
                        "geopendOp"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Regel niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Regel niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Wegwerptoeslag en statiegeld gaan vanzelf mee met de producten. Haal het product weg, of zet de bon op ter plaatse.\n- Dit hoort bij een menu. Tik op de menuregel om het hele menu weg te halen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Wegwerptoeslag en statiegeld gaan vanzelf mee met de producten. Haal het product weg, of zet de bon op ter plaatse."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/regels/{regelId}/spv": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdRegelsRegelIdSpv",
        "summary": "SPV inwisselen (migratie 131; UC271): de gast betaalt (een deel) met een single purpose voucher voor een be…",
        "description": "SPV inwisselen (migratie 131; UC271): de gast betaalt (een deel) met een single purpose voucher voor een bepaald\nproduct of menu. De kassa zet dat product met een negatief aantal op de rekening (zelfde prijs en btw, bij een menu\nmet de onderdelen); in België gaat die regel bij de verkoop mee als VOUCHER. Niet naar de keuken.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "regelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aantal": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Hoeveel vouchers? Een heel aantal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Hoeveel vouchers? Een heel aantal."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/samenvoegen": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdSamenvoegen",
        "summary": "Rekeningen samenvoegen (UC251, UC252): alles van een of meer andere open rekeningen (ook aan andere tafels)…",
        "description": "Rekeningen samenvoegen (UC251, UC252): alles van een of meer andere open rekeningen (ook aan andere tafels) naar\ndeze rekening. Bij de zwarte doos één tafelwissel voor alles.\n  POST /api/bestellingen/:id/samenvoegen  { van: [bestelling-id, ...] }",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "van": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aantal": {
                      "type": "number"
                    },
                    "bestelling": {
                      "$ref": "#/components/schemas/Bestelling"
                    },
                    "gks2Fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "aantal",
                    "bestelling"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies 1 tot 20 rekeningen om samen te voegen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies 1 tot 20 rekeningen om samen te voegen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze rekening is niet (meer) open.\n- Op de gekozen rekeningen staat niets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze rekening is niet (meer) open."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/spaar": {
      "post": {
        "tags": [
          "Klanten"
        ],
        "operationId": "postBestellingenIdSpaar",
        "summary": "Inwisselen: punten → korting (soort 'punten'), of een volle stempelkaart → dat product gratis (soort 'stemp…",
        "description": "Inwisselen: punten → korting (soort 'punten'), of een volle stempelkaart →\ndat product gratis (soort 'stempel', het product moet op de bon staan).\nEr gaat pas iets van het saldo af bij het afrekenen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {
                    "type": "string"
                  },
                  "artikelId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Kies punten of een stempelkaart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies punten of een stempelkaart."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Mogelijke meldingen:\n- Bestelling niet gevonden.\n- Klant niet gevonden.\n- Geen stempelkaart voor dit product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is al afgerekend.\n- Er is al (deels) betaald; inwisselen kan dan niet meer.\n- Koppel eerst een klant.\n- Niet genoeg punten: … van de ….\n- Er staat nog niets op de bon om korting op te geven.\n- De stempelkaart … is nog niet vol (…/…).\n- Zet eerst … op de bon; die wordt dan gratis.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/verplaats": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postBestellingenIdVerplaats",
        "summary": "Tafel verplaatsen of samenvoegen",
        "description": "Tafel verplaatsen of samenvoegen. Op de nieuwe tafel wordt het de volgende groep.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tafelId": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "tafelId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Mogelijke meldingen:\n- Bestelling niet gevonden.\n- Die tafel bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze bestelling is al afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bestellingen/{id}/voorschot": {
      "post": {
        "tags": [
          "voorschot"
        ],
        "operationId": "postBestellingenIdVoorschot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bon": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze bestelling is al afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is al afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgen/bestelling": {
      "post": {
        "tags": [
          "Bezorgen"
        ],
        "operationId": "postBezorgenBestelling",
        "summary": "Nieuwe bezorg- of afhaalbestelling met tijd",
        "description": "Nieuwe bezorg- of afhaalbestelling met tijd. Bezorgen: naam, telefoon en adres\nverplicht, adres moet in een bezorggebied vallen. gewenstOp leeg = zo snel mogelijk.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {
                    "type": "string"
                  },
                  "naam": {},
                  "telefoon": {},
                  "postcode": {},
                  "huisnummer": {},
                  "straat": {},
                  "plaats": {},
                  "gewenstOp": {},
                  "opmerking": {},
                  "email": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies bezorgen of afhalen.\n- Dit telefoonnummer klopt niet.\n- Dit e-mailadres klopt niet.\n- Vul de naam van de klant in.\n- Vul een telefoonnummer in (voor de bezorger).\n- Vul een geldige postcode in, bv. 1234 AB.\n- Vul een huisnummer in, bv. 12 of 12A.\n- Vul de straat en de plaats in.\n- Ongeldige tijd.\n- Op deze dag zijn we gesloten.\n- Deze tijd is te vroeg. Kies een later tijdvak.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies bezorgen of afhalen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Vandaag zit elk tijdvak vol. Kies een andere oplossing of verhoog het maximum per tijdvak.\n- Dit tijdvak is net vol geraakt. Kies een ander tijdvak.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vandaag zit elk tijdvak vol. Kies een andere oplossing of verhoog het maximum per tijdvak."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgen/kaart": {
      "get": {
        "tags": [
          "Bezorgen"
        ],
        "operationId": "getBezorgenKaart",
        "summary": "Voor de kaart bij Instellingen → Zaak (bezorggebieden): de ligging van de zaak, of null",
        "description": "Voor de kaart bij Instellingen → Zaak (bezorggebieden): de ligging van de zaak, of null.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "zaak": {
                      "type": "object",
                      "properties": {
                        "lat": {
                          "type": "number"
                        },
                        "lon": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "lat",
                        "lon"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "zaak"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgen/opties": {
      "get": {
        "tags": [
          "Bezorgen"
        ],
        "operationId": "getBezorgenOpties",
        "summary": "Wat kan er: bij bezorgen de zone van het adres (of buiten het bezorggebied), en de tijdvakken van vandaag m…",
        "description": "Wat kan er: bij bezorgen de zone van het adres (of buiten het bezorggebied),\nen de tijdvakken van vandaag met hoe vol ze zijn. soort = bezorgen | afhalen.",
        "parameters": [
          {
            "name": "soort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "huisnummer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "straat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "plaats",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datum",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string"
                        },
                        "buiten": {
                          "type": "boolean"
                        },
                        "adresOnbekend": {
                          "type": "boolean"
                        },
                        "zone": {
                          "nullable": true
                        },
                        "tijdvakMin": {
                          "type": "number"
                        },
                        "perTijdvak": {
                          "type": "number"
                        },
                        "zsmOp": {
                          "nullable": true
                        },
                        "tijdvakken": {
                          "type": "array",
                          "items": {}
                        },
                        "datum": {
                          "type": "string"
                        },
                        "dagen": {
                          "type": "array",
                          "items": {}
                        },
                        "drukteMin": {
                          "type": "number"
                        },
                        "berichten": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "soort",
                        "buiten",
                        "adresOnbekend",
                        "zone",
                        "tijdvakMin",
                        "perTijdvak",
                        "zsmOp",
                        "tijdvakken",
                        "datum",
                        "dagen",
                        "drukteMin",
                        "berichten"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string"
                        },
                        "buiten": {
                          "type": "boolean"
                        },
                        "zone": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "naam": {
                              "type": "string"
                            },
                            "minimum": {
                              "type": "number"
                            },
                            "kosten": {
                              "type": "number"
                            },
                            "gratisVanaf": {
                              "type": "number",
                              "nullable": true
                            },
                            "extraMin": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id",
                            "naam",
                            "minimum",
                            "kosten",
                            "gratisVanaf",
                            "extraMin"
                          ],
                          "nullable": true
                        },
                        "tijdvakMin": {
                          "type": "number"
                        },
                        "perTijdvak": {
                          "type": "number"
                        },
                        "zsmOp": {
                          "type": "string",
                          "nullable": true
                        },
                        "tijdvakken": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Tijdvak"
                          }
                        },
                        "datum": {
                          "type": "string"
                        },
                        "dagen": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "drukteMin": {
                          "type": "number"
                        },
                        "berichten": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "soort",
                        "buiten",
                        "zone",
                        "tijdvakMin",
                        "perTijdvak",
                        "zsmOp",
                        "tijdvakken",
                        "datum",
                        "dagen",
                        "drukteMin",
                        "berichten"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Vul een geldige postcode in, bv. 1234 AB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een geldige postcode in, bv. 1234 AB."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgen/{id}/afhalen": {
      "post": {
        "tags": [
          "Bezorgen"
        ],
        "operationId": "postBezorgenIdAfhalen",
        "summary": "Toch afhalen (bv",
        "description": "Toch afhalen (bv. onder het minimum van de zone, of de klant komt zelf): de bezorgkosten vervallen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze bestelling kan niet (meer) op afhalen: geen bezorgbestelling, al (deels) betaald of afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling kan niet (meer) op afhalen: geen bezorgbestelling, al (deels) betaald of afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgen/{id}/bericht": {
      "post": {
        "tags": [
          "Bezorgen"
        ],
        "operationId": "postBezorgenIdBericht",
        "summary": "Bericht naar de klant: klaar of onderweg (migratie 061; sms en/of e-mail)",
        "description": "Bericht naar de klant: klaar of onderweg (migratie 061; sms en/of e-mail).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "via": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "sms",
                          "email"
                        ]
                      }
                    },
                    "bestelling": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Bestelling"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "via",
                    "bestelling"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies klaar of onderweg.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies klaar of onderweg."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Berichten aan de klant staan uit (Instellingen → Zaak → Bezorgen en tijdvakken).\n- Er is niets verstuurd: geen telefoonnummer of e-mailadres, of sms/e-mail is niet ingesteld (CM_TOKEN of SMTP_HOST in .env).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Berichten aan de klant staan uit (Instellingen → Zaak → Bezorgen en tijdvakken)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgen/{id}/kosten": {
      "post": {
        "tags": [
          "Bezorgen"
        ],
        "operationId": "postBezorgenIdKosten",
        "summary": "Bezorgkosten nu opnieuw berekenen (het bestelscherm doet dit na elke wijziging vanzelf)",
        "description": "Bezorgkosten nu opnieuw berekenen (het bestelscherm doet dit na elke wijziging vanzelf).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bestelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgplatforms/bestellingen": {
      "get": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "getBezorgplatformsBestellingen",
        "parameters": [
          {
            "name": "dagen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "thefork": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TfOrder"
                      }
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "bestellingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/POverzicht"
                      }
                    }
                  },
                  "required": [
                    "thefork",
                    "aan",
                    "bestellingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgplatforms/bestellingen/{id}/actie": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postBezorgplatformsBestellingenIdActie",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actie": {},
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgplatforms/bestellingen/{id}/afronden": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postBezorgplatformsBestellingenIdAfronden",
        "summary": "Online betaald bij het platform: afrekenen als \"online\" voor het openstaande bedrag (bon in het journaal)",
        "description": "Online betaald bij het platform: afrekenen als \"online\" voor het openstaande bedrag (bon in het journaal).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AfrekenResultaat"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is geannuleerd of geweigerd.\n- Deze bestelling wordt bij de deur betaald: reken af via de bestelling (contant of pin).\n- Deze bestelling is al afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is geannuleerd of geweigerd."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bezorgplatforms/status": {
      "get": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "getBezorgplatformsStatus",
        "summary": "Voor de knop in de bovenbalk: welke platforms aan staan en hoeveel bestellingen lopen",
        "description": "Voor de knop in de bovenbalk: welke platforms aan staan en hoeveel bestellingen lopen.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "migratie": {
                          "type": "boolean"
                        },
                        "platforms": {
                          "type": "array",
                          "items": {}
                        },
                        "lopend": {
                          "type": "number"
                        },
                        "nieuw": {
                          "type": "number"
                        },
                        "thefork": {
                          "type": "object",
                          "properties": {
                            "aan": {
                              "type": "boolean"
                            },
                            "zonderTafel": {
                              "type": "number"
                            },
                            "rekeningFout": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "aan",
                            "zonderTafel",
                            "rekeningFout"
                          ]
                        }
                      },
                      "required": [
                        "aan",
                        "migratie",
                        "platforms",
                        "lopend",
                        "nieuw",
                        "thefork"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "migratie": {
                          "type": "boolean"
                        },
                        "platforms": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "ubereats",
                                  "deliveroo",
                                  "hubrise"
                                ]
                              },
                              "naam": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "fout",
                                  "uit",
                                  "wacht",
                                  "actief"
                                ]
                              },
                              "verbonden": {
                                "type": "boolean"
                              },
                              "melding": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "platform",
                              "naam",
                              "status",
                              "verbonden",
                              "melding"
                            ]
                          }
                        },
                        "lopend": {
                          "type": "number"
                        },
                        "nieuw": {
                          "type": "number"
                        },
                        "thefork": {
                          "type": "object",
                          "properties": {
                            "aan": {
                              "type": "boolean"
                            },
                            "status": {
                              "type": "string"
                            },
                            "zonderTafel": {
                              "type": "number"
                            },
                            "rekeningFout": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "aan",
                            "status",
                            "zonderTafel",
                            "rekeningFout"
                          ]
                        }
                      },
                      "required": [
                        "aan",
                        "migratie",
                        "platforms",
                        "lopend",
                        "nieuw",
                        "thefork"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bi": {
      "get": {
        "tags": [
          "bi"
        ],
        "operationId": "getBi",
        "summary": "Welke gegevens er zijn (met kolommen), en welke periodes",
        "description": "Welke gegevens er zijn (met kolommen), en welke periodes.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "datasets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "adres": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "betalingen",
                              "regels",
                              "producten",
                              "bonnen",
                              "dagomzet",
                              "uuromzet",
                              "stornos",
                              "medewerkers",
                              "werktijden"
                            ]
                          },
                          "naam": {
                            "type": "string"
                          },
                          "omschrijving": {
                            "type": "string"
                          },
                          "periode": {
                            "type": "boolean",
                            "description": "false = stamgegevens (geen periode)"
                          },
                          "kolommen": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/BiKolom"
                            }
                          }
                        },
                        "required": [
                          "adres",
                          "code",
                          "naam",
                          "omschrijving",
                          "periode",
                          "kolommen"
                        ]
                      }
                    },
                    "periodes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "vandaag"
                        ]
                      },
                      "minItems": 10,
                      "maxItems": 10
                    },
                    "voorbeeld": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "datasets",
                    "periodes",
                    "voorbeeld"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bi/{dataset}": {
      "get": {
        "tags": [
          "bi"
        ],
        "operationId": "getBiDataset",
        "summary": "Eén dataset: ?van=&tot= (JJJJ-MM-DD) of ?periode= (standaard 30d), ?formaat=json|csv, ?scheiding=;",
        "description": "Eén dataset: ?van=&tot= (JJJJ-MM-DD) of ?periode= (standaard 30d), ?formaat=json|csv, ?scheiding=;",
        "parameters": [
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "formaat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheiding",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sleutel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende gegevens. Zie GET /api/bi voor de lijst.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende gegevens. Zie GET /api/bi voor de lijst."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/boekhouding/journaal": {
      "get": {
        "tags": [
          "Boekhouding"
        ],
        "operationId": "getBoekhoudingJournaal",
        "summary": "Journaal over een periode; zelfde recht als Omzet per periode",
        "description": "Journaal over een periode; zelfde recht als Omzet per periode.\n\n**Toegang:** Controleert daarnaast: `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "dagboek": {
                      "type": "string"
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JournaalRegel"
                      }
                    },
                    "dagen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dag": {
                            "type": "string"
                          },
                          "bonnen": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          },
                          "debet": {
                            "type": "number"
                          },
                          "credit": {
                            "type": "number"
                          },
                          "sluit": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "dag",
                          "bonnen",
                          "omzet",
                          "debet",
                          "credit",
                          "sluit"
                        ]
                      }
                    },
                    "waarschuwingen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "van",
                    "tot",
                    "dagboek",
                    "regels",
                    "dagen",
                    "waarschuwingen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een geldige periode (van tot en met tot).\n- Kies een periode van hooguit ruim een jaar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van tot en met tot)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/boekhoudpakket/{pakket}/terug": {
      "get": {
        "tags": [
          "Boekhoudpakket"
        ],
        "operationId": "getBoekhoudpakketPakketTerug",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "pakket",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/bonnen": {
      "get": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "getBonnen",
        "summary": "Bonnen sinds de laatste dagafsluiting (nieuwste eerst)",
        "description": "Bonnen sinds de laatste dagafsluiting (nieuwste eerst). ?periode=week\ngeeft de laatste 7 dagen; ?zoek=123 zoekt een bonnummer, ongeacht de datum.",
        "parameters": [
          {
            "name": "zoek",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nummer": {
                        "type": "number"
                      },
                      "soort": {
                        "type": "string",
                        "enum": [
                          "verkoop",
                          "retour",
                          "proforma",
                          "dagrapport"
                        ]
                      },
                      "totaal": {
                        "type": "number"
                      },
                      "tijdstip": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "gebruiker": {
                        "type": "string",
                        "nullable": true
                      },
                      "waar": {
                        "type": "string"
                      },
                      "betaalwijzen": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "retourVan": {
                        "type": "number",
                        "nullable": true
                      },
                      "teruggegeven": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "nummer",
                      "soort",
                      "totaal",
                      "tijdstip",
                      "gebruiker",
                      "waar",
                      "betaalwijzen",
                      "retourVan",
                      "teruggegeven"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bonnen/{id}": {
      "get": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "getBonnenId",
        "summary": "Eén bon met de regels, wat er al is teruggegeven en een eventueel lopende retour",
        "description": "Eén bon met de regels, wat er al is teruggegeven en een eventueel lopende retour.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "retourReden": {
                      "type": "string",
                      "nullable": true
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "eenheid": {
                            "type": "string",
                            "enum": [
                              "kg"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "prijsIncl": {
                            "type": "number"
                          },
                          "opties": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/GekozenOptie"
                            }
                          },
                          "teruggegeven": {
                            "type": "number"
                          },
                          "korting": {
                            "type": "boolean"
                          },
                          "btw": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "aantal",
                          "prijsIncl",
                          "opties",
                          "teruggegeven",
                          "korting",
                          "btw"
                        ]
                      }
                    },
                    "betalingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string",
                            "enum": [
                              "contant",
                              "pin",
                              "bon",
                              "online",
                              "overig",
                              "rekening",
                              "maaltijdcheque",
                              "valuta",
                              "kamer",
                              "onbetaald"
                            ]
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "fooi": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "methode",
                          "bedrag",
                          "fooi"
                        ]
                      }
                    },
                    "lopendeRetour": {
                      "type": "object",
                      "properties": {
                        "bestellingId": {
                          "type": "string"
                        },
                        "totaal": {
                          "type": "number"
                        },
                        "pin": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "bestellingId": {
                              "type": "string"
                            },
                            "terminalNaam": {
                              "type": "string",
                              "nullable": true
                            },
                            "bedrag": {
                              "type": "number"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "starten",
                                "started",
                                "pending",
                                "success",
                                "failed"
                              ]
                            },
                            "fout": {
                              "type": "string",
                              "nullable": true
                            },
                            "testmodus": {
                              "type": "boolean"
                            },
                            "terugbetaling": {
                              "type": "boolean"
                            },
                            "fooi": {
                              "type": "number"
                            },
                            "verwerkt": {
                              "type": "boolean"
                            },
                            "aangemaaktOp": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "bestellingId",
                            "terminalNaam",
                            "bedrag",
                            "status",
                            "fout",
                            "testmodus",
                            "terugbetaling",
                            "fooi",
                            "verwerkt",
                            "aangemaaktOp"
                          ],
                          "nullable": true
                        }
                      },
                      "required": [
                        "bestellingId",
                        "totaal",
                        "pin"
                      ],
                      "nullable": true
                    },
                    "pinKoppeling": {
                      "type": "boolean"
                    },
                    "pinTerminal": {
                      "type": "string",
                      "nullable": true,
                      "description": "terminal waarop de bon gepind is: standaard voor de terugbetaling"
                    },
                    "contantAfronden": {
                      "type": "boolean"
                    },
                    "correcties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "van": {
                            "type": "string"
                          },
                          "naar": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "tijdstip": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "van",
                          "naar",
                          "bedrag",
                          "tijdstip"
                        ]
                      }
                    },
                    "verbeterd": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "nummer": {
                      "type": "number"
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "verkoop",
                        "retour",
                        "proforma",
                        "dagrapport"
                      ]
                    },
                    "totaal": {
                      "type": "number"
                    },
                    "tijdstip": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gebruiker": {
                      "type": "string",
                      "nullable": true
                    },
                    "waar": {
                      "type": "string"
                    },
                    "betaalwijzen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "retourVan": {
                      "type": "number",
                      "nullable": true
                    },
                    "teruggegeven": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "retourReden",
                    "regels",
                    "betalingen",
                    "lopendeRetour",
                    "pinKoppeling",
                    "pinTerminal",
                    "contantAfronden",
                    "correcties",
                    "verbeterd",
                    "id",
                    "nummer",
                    "soort",
                    "totaal",
                    "tijdstip",
                    "gebruiker",
                    "waar",
                    "betaalwijzen",
                    "retourVan",
                    "teruggegeven"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bonnen/{id}/betaalcorrectie": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postBonnenIdBetaalcorrectie",
        "summary": "België, GKS 2.0 (M132): betaalwijze van een afgerekende bon corrigeren, bv",
        "description": "België, GKS 2.0 (M132): betaalwijze van een afgerekende bon corrigeren, bv. contant\naangeslagen maar gepind. { van: 'contant'|'pin', naar: 'contant'|'pin' }; het hele bedrag\nvan die betaalwijze gaat over. De bon blijft zoals hij was; de correctie staat bij de\nzwarte doos en in het logboek. Recht: retour.\n\n**Toegang:** Controleert daarnaast: `retour` (Retour doen (creditbon)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "van": {},
                  "naar": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "van": {
                      "type": "string"
                    },
                    "naar": {
                      "type": "string"
                    },
                    "bedrag": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "van",
                    "naar",
                    "bedrag"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies de oude en de nieuwe betaalwijze.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies de oude en de nieuwe betaalwijze."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Bon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Dit kan alleen bij een verkoop.\n- Alleen een bon van na het laatste Z-rapport kan gecorrigeerd worden.\n- Op deze bon staat geen betaling met ….",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit kan alleen bij een verkoop."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bonnen/{id}/kopie": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postBonnenIdKopie",
        "summary": "Kopie printen",
        "description": "Kopie printen. De oorspronkelijke bon blijft zoals hij was; op de kopie staat KOPIE.\n\n**Toegang:** Controleert daarnaast: `bon_kopie` (Kopie van een bon printen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "ok"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Bon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bonnen/{id}/mail": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postBonnenIdMail",
        "summary": "Bon achteraf mailen (migratie 031, als \"Bon ook per e-mail\" aan staat): dezelfde bon als de kopie, met KOPI…",
        "description": "Bon achteraf mailen (migratie 031, als \"Bon ook per e-mail\" aan staat):\ndezelfde bon als de kopie, met KOPIE erop. Recht: kopie van een bon.\n\n**Toegang:** Controleert daarnaast: `bon_kopie` (Kopie van een bon printen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Dit e-mailadres klopt niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit e-mailadres klopt niet."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Bon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Bon per e-mail staat uit of er is geen mailserver ingesteld (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon per e-mail staat uit of er is geen mailserver ingesteld (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Mailen lukte niet: …",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Mailen lukte niet: …"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bonnen/{id}/retour": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postBonnenIdRetour",
        "summary": "Retour starten",
        "description": "Retour starten. Contant, cadeaubon, overig en handmatige pin worden\nmeteen afgerond; pin via de terminal start een terugbetaling die de kassa\ndaarna volgt (GET /api/pin/:id) en afrondt met /api/retouren/:id/afronden.\n\n**Toegang:** Controleert daarnaast: `retour` (Retour doen (creditbon)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "aantal": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "aantal"
                      ]
                    }
                  },
                  "methode": {
                    "type": "string",
                    "enum": [
                      "contant",
                      "pin",
                      "bon",
                      "online",
                      "overig",
                      "rekening",
                      "maaltijdcheque",
                      "valuta",
                      "kamer",
                      "onbetaald"
                    ]
                  },
                  "pinHandmatig": {
                    "type": "boolean"
                  },
                  "terminal": {
                    "type": "string"
                  },
                  "reden": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "bestellingId": {
                          "type": "string"
                        },
                        "bedrag": {
                          "type": "number"
                        },
                        "pin": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "bestellingId": {
                              "type": "string"
                            },
                            "terminalNaam": {
                              "type": "string",
                              "nullable": true
                            },
                            "bedrag": {
                              "type": "number"
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "starten",
                                "started",
                                "pending",
                                "success",
                                "failed"
                              ]
                            },
                            "fout": {
                              "type": "string",
                              "nullable": true
                            },
                            "testmodus": {
                              "type": "boolean"
                            },
                            "terugbetaling": {
                              "type": "boolean"
                            },
                            "fooi": {
                              "type": "number"
                            },
                            "verwerkt": {
                              "type": "boolean"
                            },
                            "aangemaaktOp": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "id",
                            "bestellingId",
                            "terminalNaam",
                            "bedrag",
                            "status",
                            "fout",
                            "testmodus",
                            "terugbetaling",
                            "fooi",
                            "verwerkt",
                            "aangemaaktOp"
                          ]
                        }
                      },
                      "required": [
                        "ok",
                        "bestellingId",
                        "bedrag",
                        "pin"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "creditnota": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "nummer": {
                                  "type": "string"
                                },
                                "id": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "nummer",
                                "id"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "fout": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "fout"
                              ]
                            }
                          ]
                        },
                        "ok": {
                          "type": "boolean"
                        },
                        "bestellingId": {
                          "type": "string"
                        },
                        "bedrag": {
                          "type": "number"
                        },
                        "ticketNummer": {
                          "type": "number"
                        },
                        "printFout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "bestellingId",
                        "bedrag"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies hoe het geld wordt terugbetaald.\n- Kies wat er terug komt.\n- Een regel hoort niet bij deze bon.\n- Een korting zelf kan niet retour; die gaat naar verhouding mee.\n- Kies een terminal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies hoe het geld wordt terugbetaald."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Bon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Van een creditbon kan geen retour gedaan worden.\n- Deze bon is niet geldig.\n- Voor deze bon loopt al een retour. Rond die eerst af of annuleer hem.\n- Terug naar de rekening kan alleen bij een verkoop op rekening met een factuur.\n- Van \"…\" kan nog hooguit … terug.\n- Er valt niets terug te betalen.\n- Er kan niet meer terug naar de rekening dan er van deze bon op rekening stond. Betaal de rest contant of met de pin terug.\n- Op factuur … staat nog € … open; meer kan niet terug naar de rekening. Betaal de rest contant of met de pin terug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Van een creditbon kan geen retour gedaan worden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "… Lukt terugbetalen via de terminal niet (bv. bij CCV), doe het dan op de terminal zelf en kies \"Pin, al terugbetaald op de terminal\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "… Lukt terugbetalen via de terminal niet (bv. bij CCV), doe het dan op de terminal zelf en kies \"Pin, al terugbetaald op de terminal\"."
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/bonnen/{id}/verbeteren": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postBonnenIdVerbeteren",
        "summary": "Bon verbeteren (migratie 131; UC4116): de prijs van een afgerekende bon klopte niet (bv",
        "description": "Bon verbeteren (migratie 131; UC4116): de prijs van een afgerekende bon klopte niet (bv. 50% korting in plaats\nvan 5%). De kassa maakt een nieuwe bon zonder tafel met de oude regels terug (negatief, tegen de prijs die toen\nbetaald is) en dezelfde producten opnieuw tegen de gewone prijs. Daarna de juiste korting geven en het verschil\nafrekenen (of terugbetalen). De oude bon blijft zoals hij was. Eén keer per bon. Recht: bon verbeteren.\n\n**Toegang:** Controleert daarnaast: `bon_verbeteren` (Prijs van een bon verbeteren (nieuwe bon met de juiste prijs)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bestelling": {
                      "$ref": "#/components/schemas/Bestelling"
                    }
                  },
                  "required": [
                    "bestelling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Bon niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bon niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Alleen een verkoop kan verbeterd worden.\n- Deze bon is niet geldig.\n- Van deze bon is al iets retour. Verbeter met een retour en een nieuwe verkoop.\n- Op deze bon staat niets om te verbeteren.\n- Deze bon is al verbeterd (zie de nieuwe bon of de open bestelling).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen een verkoop kan verbeterd worden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/cadeaubonnen/code/{code}": {
      "get": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "getCadeaubonnenCodeCode",
        "summary": "Saldo van een bon (bij afrekenen of als de klant ernaar vraagt)",
        "description": "Saldo van een bon (bij afrekenen of als de klant ernaar vraagt).",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cadeaubon": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "codeLeesbaar": {
                          "type": "string"
                        },
                        "beginwaarde": {
                          "type": "number"
                        },
                        "saldo": {
                          "type": "number"
                        },
                        "actief": {
                          "type": "boolean"
                        },
                        "geblokkeerd": {
                          "type": "boolean"
                        },
                        "aangemaaktOp": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "geactiveerdOp": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "code",
                        "codeLeesbaar",
                        "beginwaarde",
                        "saldo",
                        "actief",
                        "geblokkeerd",
                        "aangemaaktOp",
                        "geactiveerdOp"
                      ]
                    }
                  },
                  "required": [
                    "cadeaubon"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Deze cadeaubon bestaat niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze cadeaubon bestaat niet."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/cadeaubonnen/nieuwe-code": {
      "get": {
        "tags": [
          "Cadeaubonnen"
        ],
        "operationId": "getCadeaubonnenNieuweCode",
        "summary": "Voorstel voor een nieuwe code (de gebruiker mag ook een voorgedrukte kaart scannen)",
        "description": "Voorstel voor een nieuwe code (de gebruiker mag ook een voorgedrukte kaart scannen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/camera": {
      "get": {
        "tags": [
          "Camera's"
        ],
        "operationId": "getCamera",
        "summary": "Alle camera's en webpagina's, met de sleutel voor de beelden (12 uur geldig, zolang je aangemeld bent)",
        "description": "Alle camera's en webpagina's, met de sleutel voor de beelden (12 uur geldig, zolang je aangemeld bent).\n\n**Toegang:** Vereist recht `camera_bekijken`.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sleutel": {
                      "type": "string"
                    },
                    "tegels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "systeem": {
                            "type": "string"
                          },
                          "systeemNaam": {
                            "type": "string"
                          },
                          "camera": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "live": {
                            "type": "boolean"
                          },
                          "verversen": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "systeem",
                          "systeemNaam",
                          "camera",
                          "naam",
                          "live",
                          "verversen"
                        ]
                      }
                    },
                    "paginas": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "sleutel",
                    "tegels",
                    "paginas"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: dit. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: dit. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/camera/beeld/{systeem}/{camera}": {
      "get": {
        "tags": [
          "Camera's"
        ],
        "operationId": "getCameraBeeldSysteemCamera",
        "summary": "Een foto (JPEG) van de camera; niet bewaren in de browser",
        "description": "Een foto (JPEG) van de camera; niet bewaren in de browser.",
        "parameters": [
          {
            "name": "systeem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "camera",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Niet aangemeld. Open de camera's opnieuw.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Open de camera's opnieuw."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/camera/live/{systeem}/{camera}": {
      "get": {
        "tags": [
          "Camera's"
        ],
        "operationId": "getCameraLiveSysteemCamera",
        "summary": "Live beeld (MJPEG-stroom), tot de pagina sluit",
        "description": "Live beeld (MJPEG-stroom), tot de pagina sluit.",
        "parameters": [
          {
            "name": "systeem",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "camera",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Niet aangemeld. Open de camera's opnieuw.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Open de camera's opnieuw."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/catalogus": {
      "get": {
        "tags": [
          "Catalogus"
        ],
        "operationId": "getCatalogus",
        "summary": "Alles wat de kassa nodig heeft om te kunnen bestellen, in één keer",
        "description": "Alles wat de kassa nodig heeft om te kunnen bestellen, in één keer.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "artikelen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "btw": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    },
                    "happyhours": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HappyHour"
                      }
                    },
                    "favorieten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "dagdelen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Dagdeel"
                      }
                    }
                  },
                  "required": [
                    "groepen",
                    "artikelen",
                    "btw",
                    "happyhours",
                    "favorieten",
                    "dagdelen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/digitale-bon/bestelling/{id}": {
      "post": {
        "tags": [
          "klantschermextra"
        ],
        "operationId": "postDigitaleBonBestellingId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/digitale-bon/{token}": {
      "get": {
        "tags": [
          "klantschermextra"
        ],
        "operationId": "getDigitaleBonToken",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitaleBon"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Deze bon is niet (meer) te vinden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bon is niet (meer) te vinden."
                }
              }
            }
          },
          "429": {
            "description": "Te vaak. Probeer het zo opnieuw.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Te vaak. Probeer het zo opnieuw."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/docs": {
      "get": {
        "tags": [
          "Documentatie"
        ],
        "operationId": "getDocs",
        "summary": "Swagger UI: de leesbare API-documentatie",
        "description": "Swagger UI: de leesbare API-documentatie.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/docs/erd": {
      "get": {
        "tags": [
          "Documentatie"
        ],
        "operationId": "getDocsErd",
        "summary": "ERD (database-schema): diagram van alle tabellen en relaties, live uit de database",
        "description": "ERD (database-schema): diagram van alle tabellen en relaties, live uit de database.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/docs/erd.mmd": {
      "get": {
        "tags": [
          "Documentatie"
        ],
        "operationId": "getDocsErdMmd",
        "summary": "ERD als Mermaid-tekst (erDiagram), live uit de database die de kassa nu gebruikt",
        "description": "ERD als Mermaid-tekst (erDiagram), live uit de database die de kassa nu gebruikt.\n`?sleutels=1`: per tabel alleen de PK-, FK- en UK-kolommen.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "sleutels",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/docs/{bestand}": {
      "get": {
        "tags": [
          "Documentatie"
        ],
        "operationId": "getDocsBestand",
        "summary": "Bestanden van Swagger UI (css/js), uit swagger-ui-dist, en mermaid.min.js voor het ERD",
        "description": "Bestanden van Swagger UI (css/js), uit swagger-ui-dist, en mermaid.min.js voor het ERD.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "bestand",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/javascript": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Bestand niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestand niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/documentatie": {
      "get": {
        "tags": [
          "Documentatie"
        ],
        "operationId": "getDocumentatie",
        "summary": "Leesbare HTML-documentatie (huisstijl Optimum POS); hetzelfde bestand kan op de website",
        "description": "Leesbare HTML-documentatie (huisstijl Optimum POS); hetzelfde bestand kan op de website.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "api-documentatie.html ontbreekt. Draai \"npm run api:docs\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "api-documentatie.html ontbreekt. Draai \"npm run api:docs\"."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/etiketten": {
      "get": {
        "tags": [
          "etiketten"
        ],
        "operationId": "getEtiketten",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Etiketten"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/etiketten/lijst": {
      "post": {
        "tags": [
          "etiketten"
        ],
        "operationId": "postEtikettenLijst",
        "description": "**Toegang:** Controleert daarnaast: `producten_beheren` (Producten, groepen en keuzeopties beheren), `voorraad_beheren` (Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "formaat": {
                      "type": "string",
                      "enum": [
                        "38x25",
                        "57x32",
                        "62x29",
                        "100x50"
                      ]
                    },
                    "prijs": {
                      "type": "boolean"
                    },
                    "streepjescode": {
                      "type": "boolean"
                    },
                    "etiketten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Etiket"
                      }
                    }
                  },
                  "required": [
                    "formaat",
                    "prijs",
                    "streepjescode",
                    "etiketten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Etiketten printen staat uit (Instellingen → Zaak → Etiketten printen).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Etiketten printen staat uit (Instellingen → Zaak → Etiketten printen)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/exact/terug": {
      "get": {
        "tags": [
          "Exact Online"
        ],
        "operationId": "getExactTerug",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/fiscaal/status": {
      "get": {
        "tags": [
          "Afrekenen"
        ],
        "operationId": "getFiscaalStatus",
        "summary": "Staat de fiscale module klaar?",
        "description": "Staat de fiscale module klaar? De kassa toont dit als waarschuwing.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "verplicht": {
                      "type": "boolean"
                    },
                    "gereed": {
                      "type": "boolean"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "land",
                    "verplicht",
                    "gereed",
                    "melding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geld/{id}": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getGeldId",
        "summary": "Voortgang (vraagt zo nodig de automaat)",
        "description": "Voortgang (vraagt zo nodig de automaat).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "betaling",
                        "uitbetaling",
                        "bijvullen",
                        "legen"
                      ]
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ingeworpen": {
                      "type": "number"
                    },
                    "uitbetaald": {
                      "type": "number"
                    },
                    "nietUitbetaald": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "geannuleerd",
                        "starten",
                        "mislukt",
                        "bezig",
                        "geslaagd"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "soort",
                    "bedrag",
                    "ingeworpen",
                    "uitbetaald",
                    "nietUitbetaald",
                    "status",
                    "fout",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende opdracht voor de geldautomaat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende opdracht voor de geldautomaat."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geld/{id}/annuleren": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postGeldIdAnnuleren",
        "summary": "Afbreken: de automaat geeft het ingeworpen geld terug",
        "description": "Afbreken: de automaat geeft het ingeworpen geld terug.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "betaling",
                        "uitbetaling",
                        "bijvullen",
                        "legen"
                      ]
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ingeworpen": {
                      "type": "number"
                    },
                    "uitbetaald": {
                      "type": "number"
                    },
                    "nietUitbetaald": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "geannuleerd",
                        "starten",
                        "mislukt",
                        "bezig",
                        "geslaagd"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "soort",
                    "bedrag",
                    "ingeworpen",
                    "uitbetaald",
                    "nietUitbetaald",
                    "status",
                    "fout",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Onbekende opdracht voor de geldautomaat.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende opdracht voor de geldautomaat."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/bijvullen": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postGeldsysteemBijvullen",
        "summary": "Bijvullen: wisselgeld in de automaat doen (stoppen = annuleren)",
        "description": "Bijvullen: wisselgeld in de automaat doen (stoppen = annuleren).\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "betaling",
                        "uitbetaling",
                        "bijvullen",
                        "legen"
                      ]
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ingeworpen": {
                      "type": "number"
                    },
                    "uitbetaald": {
                      "type": "number"
                    },
                    "nietUitbetaald": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "geannuleerd",
                        "starten",
                        "mislukt",
                        "bezig",
                        "geslaagd"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "soort",
                    "bedrag",
                    "ingeworpen",
                    "uitbetaald",
                    "nietUitbetaald",
                    "status",
                    "fout",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/config": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getGeldsysteemConfig",
        "summary": "Wat het afrekenscherm moet weten (zonder adressen of wachtwoorden)",
        "description": "Wat het afrekenscherm moet weten (zonder adressen of wachtwoorden).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "actief": {
                      "type": "boolean"
                    },
                    "merk": {
                      "type": "string",
                      "enum": [
                        "cashdro",
                        "cashmatic",
                        "cashlogy",
                        "cashkeeper",
                        "glory",
                        "extern",
                        "proef"
                      ],
                      "nullable": true
                    },
                    "naam": {
                      "type": "string",
                      "nullable": true
                    },
                    "verplicht": {
                      "type": "boolean"
                    },
                    "functies": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/GeldFuncties"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "actief",
                    "merk",
                    "naam",
                    "verplicht",
                    "functies"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/extern/open": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getGeldsysteemExternOpen",
        "summary": "Opdrachten die de koppelsoftware moet uitvoeren; annuleren = true: afbreken en geld teruggeven",
        "description": "Opdrachten die de koppelsoftware moet uitvoeren; annuleren = true: afbreken en geld teruggeven.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "opdrachten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "geannuleerd",
                              "starten",
                              "mislukt",
                              "bezig",
                              "geslaagd"
                            ]
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "betaling",
                              "uitbetaling",
                              "bijvullen",
                              "legen"
                            ]
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "annuleren": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "soort",
                          "aangemaaktOp",
                          "bedrag",
                          "annuleren"
                        ]
                      }
                    }
                  },
                  "required": [
                    "opdrachten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekende of ontbrekende sleutel (X-Geldsysteem-Sleutel).\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende of ontbrekende sleutel (X-Geldsysteem-Sleutel)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/extern/{id}": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postGeldsysteemExternId",
        "summary": "Voortgang of resultaat melden: { status: bezig|geslaagd|geannuleerd|mislukt, ingeworpen, uitbetaald, nietUi…",
        "description": "Voortgang of resultaat melden: { status: bezig|geslaagd|geannuleerd|mislukt, ingeworpen, uitbetaald,\nnietUitbetaald, fout?, externId? } (bedragen in centen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "opdracht": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "bestellingId": {
                          "type": "string",
                          "nullable": true
                        },
                        "soort": {
                          "type": "string",
                          "enum": [
                            "betaling",
                            "uitbetaling",
                            "bijvullen",
                            "legen"
                          ]
                        },
                        "bedrag": {
                          "type": "number"
                        },
                        "ingeworpen": {
                          "type": "number"
                        },
                        "uitbetaald": {
                          "type": "number"
                        },
                        "nietUitbetaald": {
                          "type": "number"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "geannuleerd",
                            "starten",
                            "mislukt",
                            "bezig",
                            "geslaagd"
                          ]
                        },
                        "fout": {
                          "type": "string",
                          "nullable": true
                        },
                        "verwerkt": {
                          "type": "boolean"
                        },
                        "aangemaaktOp": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "bestellingId",
                        "soort",
                        "bedrag",
                        "ingeworpen",
                        "uitbetaald",
                        "nietUitbetaald",
                        "status",
                        "fout",
                        "verwerkt",
                        "aangemaaktOp"
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "opdracht"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekende of ontbrekende sleutel (X-Geldsysteem-Sleutel).\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende of ontbrekende sleutel (X-Geldsysteem-Sleutel)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/legen": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postGeldsysteemLegen",
        "summary": "Afromen: de automaat legen tot het wisselgeldniveau (het geld gaat naar de kluis of cassette)",
        "description": "Afromen: de automaat legen tot het wisselgeldniveau (het geld gaat naar de kluis of cassette).\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "betaling",
                        "uitbetaling",
                        "bijvullen",
                        "legen"
                      ]
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ingeworpen": {
                      "type": "number"
                    },
                    "uitbetaald": {
                      "type": "number"
                    },
                    "nietUitbetaald": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "geannuleerd",
                        "starten",
                        "mislukt",
                        "bezig",
                        "geslaagd"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "soort",
                    "bedrag",
                    "ingeworpen",
                    "uitbetaald",
                    "nietUitbetaald",
                    "status",
                    "fout",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/telling": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getGeldsysteemTelling",
        "summary": "Stand van de automaat (per munt en biljet als de automaat dat kan)",
        "description": "Stand van de automaat (per munt en biljet als de automaat dat kan).\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeldTelling"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/transacties": {
      "get": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "getGeldsysteemTransacties",
        "summary": "Laatste opdrachten aan de automaat (voor de kas)",
        "description": "Laatste opdrachten aan de automaat (voor de kas).\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transacties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "bestellingId": {
                            "type": "string",
                            "nullable": true
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "betaling",
                              "uitbetaling",
                              "bijvullen",
                              "legen"
                            ]
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "ingeworpen": {
                            "type": "number"
                          },
                          "uitbetaald": {
                            "type": "number"
                          },
                          "nietUitbetaald": {
                            "type": "number"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "geannuleerd",
                              "starten",
                              "mislukt",
                              "bezig",
                              "geslaagd"
                            ]
                          },
                          "fout": {
                            "type": "string",
                            "nullable": true
                          },
                          "verwerkt": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "bestellingId",
                          "soort",
                          "bedrag",
                          "ingeworpen",
                          "uitbetaald",
                          "nietUitbetaald",
                          "status",
                          "fout",
                          "verwerkt",
                          "aangemaaktOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "transacties"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/geldsysteem/uitbetalen": {
      "post": {
        "tags": [
          "Geldautomaat"
        ],
        "operationId": "postGeldsysteemUitbetalen",
        "summary": "Geld uitbetalen uit de automaat (bv",
        "description": "Geld uitbetalen uit de automaat (bv. wisselgeld voor de lade of een terugbetaling), met reden.\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bedrag": {},
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "soort": {
                      "type": "string",
                      "enum": [
                        "betaling",
                        "uitbetaling",
                        "bijvullen",
                        "legen"
                      ]
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ingeworpen": {
                      "type": "number"
                    },
                    "uitbetaald": {
                      "type": "number"
                    },
                    "nietUitbetaald": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "geannuleerd",
                        "starten",
                        "mislukt",
                        "bezig",
                        "geslaagd"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "soort",
                    "bedrag",
                    "ingeworpen",
                    "uitbetaald",
                    "nietUitbetaald",
                    "status",
                    "fout",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Vul een bedrag groter dan 0 in.\n- Vul een reden in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een bedrag groter dan 0 in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/gezondheid": {
      "get": {
        "tags": [
          "Algemeen"
        ],
        "operationId": "getGezondheid",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schaduw": {
                      "type": "object",
                      "properties": {
                        "op": {
                          "type": "string",
                          "nullable": true
                        },
                        "verkopen": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "op",
                        "verkopen"
                      ]
                    },
                    "licentie": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "geblokkeerd",
                            "actief",
                            "waarschuwing"
                          ]
                        },
                        "tekst": {
                          "type": "string",
                          "nullable": true
                        },
                        "per": {
                          "type": "string",
                          "nullable": true
                        },
                        "geldigTot": {
                          "type": "string",
                          "nullable": true
                        },
                        "soort": {
                          "type": "string",
                          "nullable": true
                        },
                        "meldingen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "geblokkeerd",
                                  "waarschuwing"
                                ]
                              },
                              "tekst": {
                                "type": "string"
                              },
                              "per": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "status",
                              "tekst",
                              "per"
                            ]
                          }
                        }
                      },
                      "required": [
                        "status",
                        "tekst",
                        "per",
                        "geldigTot",
                        "soort",
                        "meldingen"
                      ]
                    },
                    "updatemelding": {
                      "type": "boolean"
                    },
                    "update": {
                      "type": "object",
                      "properties": {
                        "versie": {
                          "type": "string"
                        },
                        "notitie": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "versie"
                      ],
                      "nullable": true
                    },
                    "database": {
                      "type": "string",
                      "enum": [
                        "extern",
                        "intern",
                        "mysql"
                      ]
                    },
                    "taal": {
                      "type": "string"
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "versie": {
                      "type": "string"
                    },
                    "vestiging": {
                      "type": "string"
                    },
                    "land": {
                      "type": "string",
                      "enum": [
                        "NL",
                        "BE"
                      ]
                    },
                    "schermen": {
                      "type": "number"
                    },
                    "fiscaalVerplicht": {
                      "type": "boolean"
                    },
                    "thema": {
                      "type": "string",
                      "enum": [
                        "donker",
                        "licht"
                      ]
                    }
                  },
                  "required": [
                    "licentie",
                    "database",
                    "ok",
                    "versie",
                    "vestiging",
                    "land",
                    "schermen",
                    "fiscaalVerplicht",
                    "thema"
                  ]
                }
              }
            }
          },
          "423": {
            "description": "Fout.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/haccp": {
      "get": {
        "tags": [
          "haccp"
        ],
        "operationId": "getHaccp",
        "summary": "Meetpunten, taken, wat er vandaag nog moet en de registraties van vandaag",
        "description": "Meetpunten, taken, wat er vandaag nog moet en de registraties van vandaag.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "open": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HaccpOpen"
                      }
                    },
                    "vandaag": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HaccpRegistratie"
                      }
                    }
                  },
                  "required": [
                    "punten",
                    "taken",
                    "open",
                    "vandaag"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/haccp/registraties": {
      "post": {
        "tags": [
          "haccp"
        ],
        "operationId": "postHaccpRegistraties",
        "summary": "{ puntId, waarde, actie?, opmerking?",
        "description": "{ puntId, waarde, actie?, opmerking? } of { taakId, gedaan?, actie?, opmerking? }; bij een afwijking is actie verplicht.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "punten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "overig",
                              "ontvangst",
                              "koeling",
                              "vriezer",
                              "warmhouden",
                              "kerntemperatuur",
                              "terugkoelen"
                            ]
                          },
                          "minTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "maxTemp": {
                            "type": "number",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "2x_dag",
                              "wekelijks",
                              "bij_gebruik"
                            ]
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "minTemp",
                          "maxTemp",
                          "frequentie",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "taken": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "ruimte": {
                            "type": "string",
                            "nullable": true
                          },
                          "instructie": {
                            "type": "string",
                            "nullable": true
                          },
                          "frequentie": {
                            "type": "string",
                            "enum": [
                              "dagelijks",
                              "wekelijks",
                              "maandelijks"
                            ]
                          },
                          "weekdag": {
                            "type": "number",
                            "nullable": true,
                            "description": "wekelijks: 1 = maandag ... 7 = zondag; null = ergens in de week"
                          },
                          "volgorde": {
                            "type": "number"
                          },
                          "actief": {
                            "type": "boolean"
                          },
                          "aangemaaktOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "ruimte",
                          "instructie",
                          "frequentie",
                          "weekdag",
                          "volgorde",
                          "actief",
                          "aangemaaktOp"
                        ]
                      }
                    },
                    "open": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HaccpOpen"
                      }
                    },
                    "vandaag": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HaccpRegistratie"
                      }
                    },
                    "registratie": {
                      "$ref": "#/components/schemas/HaccpRegistratie"
                    },
                    "afwijking": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "punten",
                    "taken",
                    "open",
                    "vandaag",
                    "registratie",
                    "afwijking"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/hotel": {
      "get": {
        "tags": [
          "hotel"
        ],
        "operationId": "getHotel",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        }
                      },
                      "required": [
                        "aan"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "leverancier": {
                          "type": "string",
                          "enum": [
                            "mews",
                            "apaleo",
                            "cloudbeds",
                            "demo",
                            "amadeus",
                            "bookingexperts",
                            "clock",
                            "eviivo",
                            "guestline",
                            "hotelogix",
                            "infor",
                            "littlehotelier",
                            "opera",
                            "protel",
                            "roomraccoon",
                            "shiji",
                            "stayntouch",
                            "vips",
                            "sirvoy"
                          ]
                        },
                        "naam": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "aan",
                        "leverancier",
                        "naam"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/hotel/gasten": {
      "get": {
        "tags": [
          "hotel"
        ],
        "operationId": "getHotelGasten",
        "parameters": [
          {
            "name": "zoek",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gasten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HotelGast"
                      }
                    }
                  },
                  "required": [
                    "gasten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/hotel/sirvoy": {
      "get": {
        "tags": [
          "hotel"
        ],
        "operationId": "getHotelSirvoy",
        "parameters": [
          {
            "name": "sleutel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "hotel"
        ],
        "operationId": "postHotelSirvoy",
        "parameters": [
          {
            "name": "sleutel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/artikelen/{id}/printer": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenArtikelenIdPrinter",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "printer": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "printer": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "printer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Deze printer bestaat niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze printer bestaat niet."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Product niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Product niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/artikelgroepen/{id}/printer": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenArtikelgroepenIdPrinter",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "printer": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "printer": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "printer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Deze printer bestaat niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze printer bestaat niet."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Artikelgroep niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Artikelgroep niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/bonprinter": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenBonprinter",
        "summary": "Welke printer print kassabon en pro forma (en opent de kassalade)?",
        "description": "Welke printer print kassabon en pro forma (en opent de kassalade)? null = geen.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "printer": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "printer"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenBonprinter",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "printer": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "printer": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "printer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Deze printer bestaat niet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze printer bestaat niet."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/klantportaal": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenKlantportaal",
        "summary": "Klantportaal (beheerportaal van Pin Voordeel): kan deze kassa een koppelcode maken?",
        "description": "Klantportaal (beheerportaal van Pin Voordeel): kan deze kassa een koppelcode\nmaken? Alleen als de kassa aan het portaal gekoppeld is (PORTAAL_URL en\nPORTAAL_SLEUTEL in .env).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingesteld": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string",
                      "nullable": true
                    },
                    "code": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "geldigTot": {
                          "type": "string",
                          "nullable": true
                        },
                        "url": {
                          "type": "string",
                          "nullable": true
                        },
                        "registreerUrl": {
                          "type": "string",
                          "nullable": true
                        },
                        "gekoppeld": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "naam": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "naam",
                              "email"
                            ]
                          }
                        }
                      },
                      "required": [
                        "code",
                        "geldigTot",
                        "url",
                        "registreerUrl",
                        "gekoppeld"
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "ingesteld",
                    "url",
                    "code"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/klantportaal/koppelcode": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenKlantportaalKoppelcode",
        "summary": "Koppelcode voor het klantportaal: de eigenaar logt in op het portaal (of maakt daar een account aan) en vul…",
        "description": "Koppelcode voor het klantportaal: de eigenaar logt in op het portaal (of maakt\ndaar een account aan) en vult deze code in; daarna ziet hij deze kassa online.\nEenmalig te gebruiken; 24 uur geldig (KOPPELCODE_UREN in het portaal), of\nminstens zo lang als de licentie van de kassa. Een nieuwe code vervangt de vorige.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "geldigTot": {
                      "type": "string",
                      "nullable": true
                    },
                    "url": {
                      "type": "string",
                      "nullable": true
                    },
                    "registreerUrl": {
                      "type": "string",
                      "nullable": true
                    },
                    "gekoppeld": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "naam": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "naam",
                          "email"
                        ]
                      }
                    }
                  },
                  "required": [
                    "code",
                    "geldigTot",
                    "url",
                    "registreerUrl",
                    "gekoppeld"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Deze kassa is niet gekoppeld aan het beheerportaal (PORTAAL_URL en PORTAAL_SLEUTEL in .env).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kassa is niet gekoppeld aan het beheerportaal (PORTAAL_URL en PORTAAL_SLEUTEL in .env)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Het beheerportaal is niet bereikbaar. Controleer de internetverbinding en probeer het opnieuw.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Het beheerportaal is niet bereikbaar. Controleer de internetverbinding en probeer het opnieuw."
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printapparaten": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenPrintapparaten",
        "summary": "Printapparaten: Android-bedienschermen met de HorecaPOS-app waar zelf een printer aan hangt (Bluetooth, USB…",
        "description": "Printapparaten: Android-bedienschermen met de HorecaPOS-app waar zelf een printer\naan hangt (Bluetooth, USB, ingebouwd). Zie lib/printapparaat.ts.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apparaten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PrintapparaatGegevens"
                      }
                    }
                  },
                  "required": [
                    "apparaten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenPrintapparaten",
        "summary": "Dit apparaat (het bedienscherm waarop de beheerder nu werkt) aanmelden als printapparaat",
        "description": "Dit apparaat (het bedienscherm waarop de beheerder nu werkt) aanmelden als printapparaat.\nGeeft één keer de sleutel terug; de app bewaart hem en haalt daarmee zijn bonnen op.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {
                    "type": "string"
                  },
                  "platform": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "sleutel": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "sleutel",
                    "naam"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geef het apparaat een naam, bijvoorbeeld \"Terras\" of \"Handterminal 1\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef het apparaat een naam, bijvoorbeeld \"Terras\" of \"Handterminal 1\"."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printapparaten/{id}": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenPrintapparatenId",
        "description": "**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naam": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "apparaten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PrintapparaatGegevens"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "apparaten"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geef het apparaat een naam.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geef het apparaat een naam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Dit printapparaat bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit printapparaat bestaat niet (meer)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printapparaten/{id}/verwijderen": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenPrintapparatenIdVerwijderen",
        "summary": "Printapparaat afmelden",
        "description": "Printapparaat afmelden. Printers die eraan hingen, print daarna de kassaserver zelf.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "apparaten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PrintapparaatGegevens"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "apparaten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Dit printapparaat bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit printapparaat bestaat niet (meer)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printerkoppelingen": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenPrinterkoppelingen",
        "summary": "Welke printer hoort bij welke groep en welk product?",
        "description": "Welke printer hoort bij welke groep en welk product?\ngroep.printer:   null = geen werkbon\nproduct.printer: null = zoals de groep, '' = geen werkbon\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groepen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "printer": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "printer"
                        ]
                      }
                    },
                    "artikelen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "groepId": {
                            "type": "string",
                            "nullable": true
                          },
                          "printer": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "groepId",
                          "printer"
                        ]
                      }
                    }
                  },
                  "required": [
                    "groepen",
                    "artikelen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printers": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenPrinters",
        "summary": "Alle printers van deze vestiging: wat in de database staat en printers waar een groep of product nog naar v…",
        "description": "Alle printers van deze vestiging: wat in de database staat en printers\nwaar een groep of product nog naar verwijst. Een nieuwe zaak heeft er\ngeen. Per printer ook hoeveel groepen en producten hem gebruiken.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "naam": {
                        "type": "string"
                      },
                      "host": {
                        "type": "string"
                      },
                      "poort": {
                        "type": "number"
                      },
                      "breedte": {
                        "type": "number"
                      },
                      "bron": {
                        "type": "string",
                        "enum": [
                          "database",
                          "geen"
                        ]
                      },
                      "taal": {
                        "type": "string"
                      },
                      "verbinding": {
                        "type": "string",
                        "enum": [
                          "serieel",
                          "netwerk",
                          "bluetooth",
                          "usb",
                          "systeem",
                          "ingebouwd"
                        ]
                      },
                      "adres": {
                        "type": "string"
                      },
                      "baud": {
                        "type": "number"
                      },
                      "protocol": {
                        "type": "string",
                        "enum": [
                          "escpos",
                          "star"
                        ]
                      },
                      "apparaat": {
                        "type": "string",
                        "nullable": true
                      },
                      "gebruik": {
                        "type": "object",
                        "properties": {
                          "groepen": {
                            "type": "number"
                          },
                          "artikelen": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "groepen",
                          "artikelen"
                        ]
                      }
                    },
                    "required": [
                      "naam",
                      "host",
                      "poort",
                      "breedte",
                      "bron",
                      "taal",
                      "verbinding",
                      "adres",
                      "baud",
                      "protocol",
                      "apparaat",
                      "gebruik"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printers/zoeken": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenPrintersZoeken",
        "summary": "Printers zoeken die de kassaserver zelf ziet: USB (Linux /dev/usb/lp*), COM- en seriële poorten, printers v…",
        "description": "Printers zoeken die de kassaserver zelf ziet: USB (Linux /dev/usb/lp*), COM- en\nseriële poorten, printers van Windows/CUPS en op Android ingebouwd, USB en gekoppeld\nBluetooth. Plus welke verbindingen hier kunnen. Netwerkprinters zoekt hij niet.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrinterZoekResultaat"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printers/{naam}": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenPrintersNaam",
        "summary": "Printer opslaan of toevoegen",
        "description": "Printer opslaan of toevoegen. Zonder IP-adres verschijnen de bonnen van\ndeze printer in het servervenster.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "naam",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrinterInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "naam": {
                      "type": "string"
                    },
                    "host": {
                      "type": "string"
                    },
                    "poort": {
                      "type": "number"
                    },
                    "breedte": {
                      "type": "number"
                    },
                    "bron": {
                      "type": "string",
                      "enum": [
                        "database",
                        "geen"
                      ]
                    },
                    "taal": {
                      "type": "string"
                    },
                    "verbinding": {
                      "type": "string",
                      "enum": [
                        "serieel",
                        "netwerk",
                        "bluetooth",
                        "usb",
                        "systeem",
                        "ingebouwd"
                      ]
                    },
                    "adres": {
                      "type": "string"
                    },
                    "baud": {
                      "type": "number"
                    },
                    "protocol": {
                      "type": "string",
                      "enum": [
                        "escpos",
                        "star"
                      ]
                    },
                    "apparaat": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "naam",
                    "host",
                    "poort",
                    "breedte",
                    "bron",
                    "taal",
                    "verbinding",
                    "adres",
                    "baud",
                    "protocol",
                    "apparaat"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige printernaam.\n- Dit printapparaat bestaat niet (meer). Meld het bedienscherm opnieuw aan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige printernaam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printers/{naam}/test": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenPrintersNaamTest",
        "summary": "Testbon printen",
        "description": "Testbon printen. Met een IP-adres (of bij een andere verbinding: de verbinding)\nin de body wordt dát getest (handig vóór het opslaan), anders de huidige instelling.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "naam",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrinterInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string"
                    },
                    "melding": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige printernaam.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige printernaam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printers/{naam}/verwijderen": {
      "post": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "postInstellingenPrintersNaamVerwijderen",
        "summary": "Printer verwijderen",
        "description": "Printer verwijderen. Kan niet zolang hij de kassabon print of door een groep/product gebruikt wordt.\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "parameters": [
          {
            "name": "naam",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige printernaam.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige printernaam."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Printer \"…\" print de kassabon. Kies daar eerst een andere printer (of geen).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Printer \"…\" print de kassabon. Kies daar eerst een andere printer (of geen)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/instellingen/printerverbindingen": {
      "get": {
        "tags": [
          "Instellingen"
        ],
        "operationId": "getInstellingenPrinterverbindingen",
        "summary": "Welke verbindingen kan de kassaserver op dit besturingssysteem gebruiken (zonder te zoeken)",
        "description": "Welke verbindingen kan de kassaserver op dit besturingssysteem gebruiken (zonder te zoeken).\n\n**Toegang:** Vereist recht `instellingen_beheren` (Zaak, betalen en printers instellen).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "verbindingen": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "serieel",
                          "netwerk",
                          "bluetooth",
                          "usb",
                          "systeem",
                          "ingebouwd"
                        ]
                      }
                    }
                  },
                  "required": [
                    "verbindingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: zaak, betalen en printers instellen. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/intern/backup": {
      "post": {
        "tags": [
          "Database"
        ],
        "operationId": "postInternBackup",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "bestand": {
                      "$ref": "#/components/schemas/BackupBestand"
                    }
                  },
                  "required": [
                    "ok",
                    "bestand"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Alleen voor de kassa-pc zelf.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen voor de kassa-pc zelf."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/intern/stop": {
      "post": {
        "tags": [
          "Database"
        ],
        "operationId": "postInternStop",
        "summary": "Netjes stoppen (scripts/kassa-service.mjs, vóór een update): de database eerst sluiten",
        "description": "Netjes stoppen (scripts/kassa-service.mjs, vóór een update): de database\neerst sluiten. Op Windows kan een proces geen SIGTERM ontvangen; dit doet\nhetzelfde als Ctrl+C (zie index.ts).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Alleen voor de kassa-pc zelf.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen voor de kassa-pc zelf."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas": {
      "get": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "getKas",
        "summary": "Stand van de kassalade van de lopende dag",
        "description": "Stand van de kassalade van de lopende dag.\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vanaf": {
                      "type": "string"
                    },
                    "kas": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "mutaties": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Kasmutatie"
                              }
                            },
                            "wisselgeldValuta": {
                              "type": "number"
                            },
                            "inAutomaat": {
                              "type": "number"
                            },
                            "tekortUitLade": {
                              "type": "number"
                            },
                            "startgeld": {
                              "type": "number"
                            },
                            "contantOntvangen": {
                              "type": "number"
                            },
                            "verwacht": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "mutaties",
                            "startgeld",
                            "contantOntvangen",
                            "verwacht"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "mutaties": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Kasmutatie"
                              }
                            },
                            "wisselgeldValuta": {
                              "type": "number"
                            },
                            "inAutomaat": {
                              "type": "number"
                            },
                            "tekortUitLade": {
                              "type": "number"
                            },
                            "startgeld": {
                              "type": "number"
                            },
                            "contantOntvangen": {
                              "type": "number"
                            },
                            "inLade": {
                              "type": "number"
                            },
                            "uitLade": {
                              "type": "number"
                            },
                            "verwacht": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "mutaties",
                            "startgeld",
                            "contantOntvangen",
                            "inLade",
                            "uitLade",
                            "verwacht"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "vanaf",
                    "kas"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/lade": {
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postKasLade",
        "summary": "Lade openen zonder verkoop (bv",
        "description": "Lade openen zonder verkoop (bv. wisselen). Komt met reden in het logboek.\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Vul een reden in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een reden in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/ladestatus": {
      "get": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "getKasLadestatus",
        "summary": "Staat de lade open?",
        "description": "Staat de lade open? { sensor: is er een sensor ingesteld, open: true/false/null (onbekend) }.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sensor": {
                      "type": "boolean"
                    },
                    "blokkeren": {
                      "type": "boolean"
                    },
                    "open": {
                      "type": "boolean",
                      "nullable": true
                    }
                  },
                  "required": [
                    "sensor",
                    "blokkeren",
                    "open"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/medewerkers": {
      "get": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "getKasMedewerkers",
        "summary": "Per medewerker: startgeld, contant, geld in/uit, verwacht en de laatste telling (lopende kassasessie)",
        "description": "Per medewerker: startgeld, contant, geld in/uit, verwacht en de laatste telling (lopende kassasessie).\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "medewerkers": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MedewerkerKas"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "medewerkers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/medewerkers/{id}/startgeld": {
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postKasMedewerkersIdStartgeld",
        "summary": "Startgeld in de lade van een medewerker (lopende kassasessie)",
        "description": "Startgeld in de lade van een medewerker (lopende kassasessie).\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startgeld": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Vul een geldig startgeld in (mag 0,00 zijn).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een geldig startgeld in (mag 0,00 zijn)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Medewerker niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Medewerker niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/medewerkers/{id}/telling": {
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postKasMedewerkersIdTelling",
        "summary": "Telling van de lade van een medewerker: het verschil met verwacht is zijn kasverschil",
        "description": "Telling van de lade van een medewerker: het verschil met verwacht is zijn kasverschil.\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "geteld": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "verwacht": {
                      "type": "number"
                    },
                    "geteld": {
                      "type": "number"
                    },
                    "verschil": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "verwacht",
                    "geteld",
                    "verschil"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Vul het getelde bedrag in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul het getelde bedrag in."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "404": {
            "description": "Medewerker niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Medewerker niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/mutatie": {
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postKasMutatie",
        "summary": "Geld in of uit de lade, buiten verkopen om",
        "description": "Geld in of uit de lade, buiten verkopen om. Opent de lade en print een bonnetje.\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "soort": {
                    "type": "string"
                  },
                  "bedrag": {},
                  "reden": {},
                  "printen": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "printFout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies geld in of geld uit de lade.\n- Vul een bedrag groter dan 0 in.\n- Vul een reden in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies geld in of geld uit de lade."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kas/startgeld": {
      "post": {
        "tags": [
          "Kassalade"
        ],
        "operationId": "postKasStartgeld",
        "summary": "Startgeld van de lopende dag invullen of corrigeren",
        "description": "Startgeld van de lopende dag invullen of corrigeren.\n\n**Toegang:** Vereist recht `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startgeld": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Vul een geldig startgeld in (mag 0,00 zijn).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Vul een geldig startgeld in (mag 0,00 zijn)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: kassalade beheren (geld in/uit, lade openen, startgeld). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kassaopties": {
      "get": {
        "tags": [
          "kassaopties"
        ],
        "operationId": "getKassaopties",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KassaOpties"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken": {
      "get": {
        "tags": [
          "Keuken"
        ],
        "operationId": "getKeuken",
        "summary": "Bonnen voor een station, oudste eerst",
        "description": "Bonnen voor een station, oudste eerst. ?klaar=1: wat het afgelopen uur\nklaar is gemeld (om terug te halen). station leeg = alles.",
        "parameters": [
          {
            "name": "station",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "klaar",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "bestellingId": {
                        "type": "string"
                      },
                      "nummer": {
                        "type": "number"
                      },
                      "waar": {
                        "type": "string"
                      },
                      "sinds": {
                        "type": "string"
                      },
                      "gangGevraagd": {
                        "type": "object",
                        "properties": {
                          "gang": {
                            "type": "number"
                          },
                          "op": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "gang",
                          "op"
                        ],
                        "nullable": true,
                        "description": "gang aangevraagd vanaf het keukenscherm (migratie 105)"
                      },
                      "regels": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "naam": {
                              "type": "string"
                            },
                            "aantal": {
                              "type": "number"
                            },
                            "opties": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "opmerking": {
                              "type": "string",
                              "nullable": true
                            },
                            "gang": {
                              "type": "number"
                            },
                            "wacht": {
                              "type": "boolean"
                            },
                            "storno": {
                              "type": "boolean"
                            },
                            "klaar": {
                              "type": "boolean"
                            },
                            "station": {
                              "type": "string",
                              "nullable": true,
                              "description": "het station van deze regel en of hij van een ander station is doorgezet (migratie 105)"
                            },
                            "doorgezet": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "naam",
                            "aantal",
                            "opties",
                            "opmerking",
                            "gang",
                            "wacht",
                            "storno",
                            "klaar",
                            "station",
                            "doorgezet"
                          ]
                        }
                      }
                    },
                    "required": [
                      "bestellingId",
                      "nummer",
                      "waar",
                      "sinds",
                      "regels"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken/doorzetten": {
      "post": {
        "tags": [
          "Keuken"
        ],
        "operationId": "postKeukenDoorzetten",
        "summary": "Regels (of een hele bon) naar een ander station zetten: { regelIds, van, naar }",
        "description": "Regels (of een hele bon) naar een ander station zetten: { regelIds, van, naar }.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regelIds": {},
                  "van": {},
                  "naar": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aantal": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "aantal"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken/gang": {
      "post": {
        "tags": [
          "Keuken"
        ],
        "operationId": "postKeukenGang",
        "summary": "Volgende gang vanaf het keukenscherm: { bestellingId, gang, station }",
        "description": "Volgende gang vanaf het keukenscherm: { bestellingId, gang, station }. Bij \"aanvragen\" krijgt de bediening\neen seintje; bij \"afroepen\" roept het scherm de gang zelf af (zoals de knop Afroepen in de kassa).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bestellingId": {},
                  "gang": {},
                  "station": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "afgeroepen": {
                          "type": "boolean"
                        },
                        "gang": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "ok",
                        "afgeroepen",
                        "gang"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "afgeroepen": {
                          "type": "boolean"
                        },
                        "gang": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "ok",
                        "afgeroepen",
                        "gang"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Onbekende bestelling.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende bestelling."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken/instelling": {
      "get": {
        "tags": [
          "Keuken"
        ],
        "operationId": "getKeukenInstelling",
        "summary": "Wat het keukenscherm mag (migratie 105): doorzetten, herordenen, gang aanvragen of afroepen",
        "description": "Wat het keukenscherm mag (migratie 105): doorzetten, herordenen, gang aanvragen of afroepen.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "doorzetten": {
                      "type": "boolean"
                    },
                    "volgende": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "extraStations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "herordenen": {
                      "type": "boolean"
                    },
                    "gang": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aanvragen",
                        "afroepen"
                      ]
                    },
                    "migratie": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "doorzetten",
                    "volgende",
                    "extraStations",
                    "herordenen",
                    "gang",
                    "migratie"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken/klaar": {
      "post": {
        "tags": [
          "Keuken"
        ],
        "operationId": "postKeukenKlaar",
        "summary": "Regels klaar melden (of terugzetten)",
        "description": "Regels klaar melden (of terugzetten). Als daarmee alles van een bestelling\nvoor dit station klaar is, krijgt de bediening een seintje.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regelIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "klaar": {
                    "type": "boolean"
                  },
                  "station": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "aantal": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "ok",
                    "aantal"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geen regels opgegeven.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geen regels opgegeven."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken/stations": {
      "get": {
        "tags": [
          "Keuken"
        ],
        "operationId": "getKeukenStations",
        "summary": "Welke stations zijn er (namen van printers, groepen en producten met een printer)",
        "description": "Welke stations zijn er (namen van printers, groepen en producten met een printer).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/keuken/volgorde": {
      "post": {
        "tags": [
          "Keuken"
        ],
        "operationId": "postKeukenVolgorde",
        "summary": "Volgorde van de bonnen op een station: { station, bestellingIds } (eerste = bovenaan)",
        "description": "Volgorde van de bonnen op een station: { station, bestellingIds } (eerste = bovenaan).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "station": {},
                  "bestellingIds": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/bestellingen": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskBestellingen",
        "parameters": [
          {
            "name": "breedte",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/bestellingen/{id}": {
      "get": {
        "tags": [
          "kiosk"
        ],
        "operationId": "getKioskBestellingenId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "breedte",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/bestellingen/{id}/annuleren": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskBestellingenIdAnnuleren",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/bestellingen/{id}/betalen": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskBestellingenIdBetalen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "breedte",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/bestellingen/{id}/kamer": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskBestellingenIdKamer",
        "summary": "Op de kamer (hotelkoppeling, zelfbediening): { kamer, achternaam } → afgerekend op de kamer, of een fout",
        "description": "Op de kamer (hotelkoppeling, zelfbediening): { kamer, achternaam } → afgerekend op de kamer, of een fout.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "breedte",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/bestellingen/{id}/kassa": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskBestellingenIdKassa",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "breedte",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/koppelen": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskKoppelen",
        "summary": "Koppelen: { code } → { sleutel, naam } (de pagina bewaart de sleutel op het apparaat)",
        "description": "Koppelen: { code } → { sleutel, naam } (de pagina bewaart de sleutel op het apparaat).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "429": {
            "description": "Te veel pogingen. Probeer het over 10 minuten opnieuw.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Te veel pogingen. Probeer het over 10 minuten opnieuw."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/menu": {
      "get": {
        "tags": [
          "kiosk"
        ],
        "operationId": "getKioskMenu",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/noodbestellingen": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskNoodbestellingen",
        "summary": "Noodmodus van de kiosk-app: noodbestellingen in de kassa zetten { bestellingen } → { verwerkt, resultaten }",
        "description": "Noodmodus van de kiosk-app: noodbestellingen in de kassa zetten { bestellingen } → { verwerkt, resultaten }.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/opwaarderen": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskOpwaarderen",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/scan": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskScan",
        "summary": "Barcodescanner (optioneel): { code } → { soort: product | kortingscode | klant | cadeaubon | onbekend, ... }",
        "description": "Barcodescanner (optioneel): { code } → { soort: product | kortingscode | klant | cadeaubon | onbekend, ... }",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/start": {
      "get": {
        "tags": [
          "kiosk"
        ],
        "operationId": "getKioskStart",
        "summary": "Wat de kiosk moet weten om te starten: naam, aan/uit, instellingen (zonder groepen), talen en de zaak",
        "description": "Wat de kiosk moet weten om te starten: naam, aan/uit, instellingen (zonder groepen), talen en de zaak.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "naam": {
                      "type": "string"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "melding": {
                      "type": "string",
                      "nullable": true
                    },
                    "instelling": {
                      "type": "object",
                      "properties": {
                        "bon": {
                          "type": "string",
                          "enum": [
                            "kassa",
                            "geen",
                            "kiosk"
                          ],
                          "description": "Waar de kassabon komt: printer van de kiosk(-app), bonprinter van de kassa, of geen bon."
                        },
                        "meenemen": {
                          "type": "boolean",
                          "description": "De gast kan kiezen voor meenemen (afhalen). Minstens één van beide."
                        },
                        "hierEten": {
                          "type": "boolean",
                          "description": "De gast kan kiezen voor hier opeten (ter plaatse)."
                        },
                        "upsellGroepen": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Upsell bij afrekenen (\"Ook iets erbij?\"): producten uit deze groepen; leeg = geen upsell."
                        },
                        "welkom": {
                          "type": "string",
                          "description": "Welkomtekst op het startscherm; leeg = standaard."
                        },
                        "terugSeconden": {
                          "type": "number",
                          "description": "Na zoveel seconden zonder aanraken terug naar het startscherm (mand leeg)."
                        },
                        "keuken": {
                          "type": "string",
                          "enum": [
                            "meteen",
                            "na_betalen"
                          ],
                          "description": "Betalen aan de kassa: de bestelling meteen naar de keuken (standaard), of pas als hij aan de kassa betaald is."
                        },
                        "statusQr": {
                          "type": "boolean",
                          "description": "QR-code op de kioskbon: de gast volgt de bestelling op de eigen telefoon (via het beheerportaal) en krijgt een\r\nmelding als hij klaar is. Standaard uit; werkt alleen als de kassa met het portaal verbonden is (migratie 111)."
                        },
                        "scanner": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/ScanKeuzes"
                            }
                          ],
                          "description": "Barcodescanner (standaard alles uit): wat een scan op de kiosk mag doen."
                        },
                        "opwaarderen": {
                          "type": "boolean",
                          "description": "Tegoed opwaarderen op de kiosk (standaard uit; werkt alleen met oplaadbaar tegoed aan)."
                        },
                        "opwaardeerBedragen": {
                          "type": "array",
                          "items": {
                            "type": "number"
                          },
                          "description": "Bedragen om uit te kiezen bij opwaarderen, in centen (1 tot 6, oplopend)."
                        }
                      },
                      "required": [
                        "bon",
                        "meenemen",
                        "hierEten",
                        "upsellGroepen",
                        "welkom",
                        "terugSeconden",
                        "keuken",
                        "statusQr",
                        "scanner",
                        "opwaarderen",
                        "opwaardeerBedragen"
                      ]
                    },
                    "zaak": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "object"
                        },
                        "valuta": {
                          "type": "object"
                        },
                        "land": {
                          "type": "object"
                        }
                      },
                      "required": [
                        "naam",
                        "valuta",
                        "land"
                      ]
                    },
                    "pin": {
                      "type": "boolean"
                    },
                    "betalen": {
                      "type": "string",
                      "enum": [
                        "kassa",
                        "pin",
                        "keuze"
                      ],
                      "nullable": true
                    },
                    "tegoed": {
                      "type": "boolean"
                    },
                    "kamer": {
                      "type": "boolean"
                    },
                    "lan": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "naam",
                    "aan",
                    "melding",
                    "instelling",
                    "zaak",
                    "pin",
                    "betalen",
                    "tegoed",
                    "kamer",
                    "lan"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/status/{token}": {
      "get": {
        "tags": [
          "kiosk"
        ],
        "operationId": "getKioskStatusToken",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "429": {
            "description": "Te vaak. Probeer het zo opnieuw.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Te vaak. Probeer het zo opnieuw."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/kiosk/tegoed": {
      "post": {
        "tags": [
          "kiosk"
        ],
        "operationId": "postKioskTegoed",
        "summary": "Tegoed opwaarderen (optioneel): saldo van een pas, en een bestelling met alleen de opwaardering",
        "description": "Tegoed opwaarderen (optioneel): saldo van een pas, en een bestelling met alleen de opwaardering.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Deze kiosk is niet (meer) gekoppeld.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze kiosk is niet (meer) gekoppeld."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klanten": {
      "get": {
        "tags": [
          "Klanten"
        ],
        "operationId": "getKlanten",
        "summary": "Zoeken op naam of (een deel van) het telefoonnummer",
        "description": "Zoeken op naam of (een deel van) het telefoonnummer.",
        "parameters": [
          {
            "name": "zoek",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Klanten"
        ],
        "operationId": "postKlanten",
        "summary": "Nieuwe klant (aan de kassa)",
        "description": "Nieuwe klant (aan de kassa).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KlantInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/KlantInfo"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Dit telefoonnummer hoort al bij ….",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Dit telefoonnummer hoort al bij …."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klanten/{id}": {
      "get": {
        "tags": [
          "Klanten"
        ],
        "operationId": "getKlantenId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlantInfo"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klanten/{id}/gastprofiel": {
      "get": {
        "tags": [
          "gastprofiel"
        ],
        "operationId": "getKlantenIdGastprofiel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vip": {
                      "type": "boolean"
                    },
                    "dieet": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "voorkeuren": {
                      "type": "string",
                      "nullable": true
                    },
                    "naam": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "vip",
                    "dieet",
                    "voorkeuren",
                    "naam"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "gastprofiel"
        ],
        "operationId": "postKlantenIdGastprofiel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vip": {
                      "type": "boolean"
                    },
                    "dieet": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "voorkeuren": {
                      "type": "string",
                      "nullable": true
                    },
                    "naam": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "vip",
                    "dieet",
                    "voorkeuren",
                    "naam"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klanten/{id}/kaart": {
      "post": {
        "tags": [
          "scanner"
        ],
        "operationId": "postKlantenIdKaart",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kaart": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kaart": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "kaart"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Klant niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Klant niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "De klantenkaart staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De klantenkaart staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klantscherm-dia": {
      "get": {
        "tags": [
          "klantschermextra"
        ],
        "operationId": "getKlantschermDia",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "seconden": {
                      "type": "number"
                    },
                    "dia": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "soort": {
                                "type": "string",
                                "enum": [
                                  "actie"
                                ]
                              },
                              "naam": {
                                "type": "string"
                              },
                              "nu": {
                                "type": "boolean"
                              },
                              "dagen": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              },
                              "van": {
                                "type": "string"
                              },
                              "tot": {
                                "type": "string"
                              },
                              "procent": {
                                "type": "number"
                              },
                              "prijs": {
                                "type": "number"
                              },
                              "op": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "soort",
                              "naam",
                              "nu",
                              "dagen",
                              "van",
                              "tot",
                              "op"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "soort": {
                                "type": "string",
                                "enum": [
                                  "product"
                                ]
                              },
                              "naam": {
                                "type": "string"
                              },
                              "prijs": {
                                "type": "number"
                              },
                              "foto": {
                                "type": "string"
                              },
                              "groep": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "required": [
                              "soort",
                              "naam",
                              "prijs",
                              "groep"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "soort": {
                                "type": "string",
                                "enum": [
                                  "spaarkaart"
                                ]
                              },
                              "puntenPerEuro": {
                                "type": "number"
                              },
                              "puntenNodig": {
                                "type": "number"
                              },
                              "beloning": {
                                "type": "number"
                              },
                              "stempels": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "naam": {
                                      "type": "string"
                                    },
                                    "nodig": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "naam",
                                    "nodig"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "soort",
                              "puntenPerEuro",
                              "puntenNodig",
                              "beloning",
                              "stempels"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "soort": {
                                "type": "string",
                                "enum": [
                                  "tekst"
                                ]
                              },
                              "tekst": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "soort",
                              "tekst"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "seconden",
                    "dia"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klantscherm/deze-pc": {
      "post": {
        "tags": [
          "Klantscherm"
        ],
        "operationId": "postKlantschermDezePc",
        "summary": "Kassa-pc met twee schermen: het klantscherm (Instellingen → Zaak → Klantscherm) de eerste keer vanzelf aanz…",
        "description": "Kassa-pc met twee schermen: het klantscherm (Instellingen → Zaak → Klantscherm) de eerste\nkeer vanzelf aanzetten. Zonder aanmelden, maar alleen vanaf de kassa-pc zelf (127.0.0.1, niet\ndoorgestuurd): het installatiescript en de kassa op http://localhost roepen dit aan zodra ze een\ntweede scherm zien. Eén keer per zaak: zet iemand het daarna uit, dan blijft het uit.\n`aan` = het klantscherm staat nu aan; `gezet` = het is nu net vanzelf aangezet.\nBody `{ rust: true }`: niemand aangemeld op de kassa (pincodescherm): het klantscherm van deze\npc (code DEZEPC) toont alleen het welkom, nooit meer de rekening van daarvoor. Zet niets aan.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rust": {}
                },
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "was": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "ok",
                        "was"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "gezet": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan",
                        "gezet"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Alleen vanaf de kassa-pc zelf.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Alleen vanaf de kassa-pc zelf."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/klantscherm/{code}": {
      "get": {
        "tags": [
          "Klantscherm"
        ],
        "operationId": "getKlantschermCode",
        "summary": "Beeld voor het klantscherm met deze koppelcode (het scherm zelf haalt dit op; geen aanmelding, want er word…",
        "description": "Beeld voor het klantscherm met deze koppelcode (het scherm zelf haalt dit\nop; geen aanmelding, want er wordt niets bediend). `aan` = klantscherm\nstaat aan bij de zaak; `gekoppeld` = er heeft al een kassa naar deze code\ngestuurd; `beeld` = wat er nu te zien is (null = rustscherm).\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "zaak": {
                      "type": "object",
                      "properties": {
                        "naam": {
                          "type": "string"
                        },
                        "welkom": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "naam",
                        "welkom"
                      ]
                    },
                    "gekoppeld": {
                      "type": "boolean"
                    },
                    "beeld": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/KlantBeeld"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "aan",
                    "zaak",
                    "gekoppeld",
                    "beeld"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige koppelcode (6 tekens).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige koppelcode (6 tekens)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      },
      "put": {
        "tags": [
          "Klantscherm"
        ],
        "operationId": "putKlantschermCode",
        "summary": "Nieuw beeld voor het klantscherm met deze koppelcode (stuurt de kassa vanzelf bij elke wijziging)",
        "description": "Nieuw beeld voor het klantscherm met deze koppelcode (stuurt de kassa\nvanzelf bij elke wijziging). Body: het beeld (`fase`, `regels`, `totaal`\n...). 409 als het klantscherm uit staat bij de zaak.",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldige koppelcode (6 tekens).\n- Ongeldig beeld voor het klantscherm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige koppelcode (6 tekens)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Het klantscherm staat uit (Instellingen → Zaak).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Het klantscherm staat uit (Instellingen → Zaak)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Klantscherm"
        ],
        "operationId": "deleteKlantschermCode",
        "summary": "Klantscherm met deze koppelcode loskoppelen: het toont weer zijn koppelcode",
        "description": "Klantscherm met deze koppelcode loskoppelen: het toont weer zijn koppelcode.",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "was": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "was"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige koppelcode (6 tekens).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldige koppelcode (6 tekens)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klok": {
      "get": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "getKlok",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "stand": {
                          "type": "string",
                          "enum": [
                            "uit"
                          ]
                        },
                        "ingeklokt": {
                          "type": "boolean"
                        },
                        "sinds": {
                          "nullable": true
                        }
                      },
                      "required": [
                        "stand",
                        "ingeklokt",
                        "sinds"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "stand": {
                          "type": "string",
                          "enum": [
                            "aan",
                            "verplicht"
                          ]
                        },
                        "ingeklokt": {
                          "type": "boolean"
                        },
                        "sinds": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "stand",
                        "ingeklokt",
                        "sinds"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klok/in": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postKlokIn",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlokUitkomst"
                }
              }
            }
          },
          "400": {
            "description": "In- en uitklokken staat uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "In- en uitklokken staat uit."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klok/pas": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postKlokPas",
        "summary": "Klokken met een pasje (migratie 114, als aanmelden met een pasje aan staat): wisselt tussen in en uit",
        "description": "Klokken met een pasje (migratie 114, als aanmelden met een pasje aan staat): wisselt tussen in en uit.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pas": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlokUitkomst"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- In- en uitklokken staat uit.\n- Dit pasje kan de kassa niet lezen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "In- en uitklokken staat uit."
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekend pasje.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekend pasje."
                }
              }
            }
          },
          "409": {
            "description": "Aanmelden met een pasje staat uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Aanmelden met een pasje staat uit."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/klok/pincode": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postKlokPincode",
        "summary": "Klokken met alleen de pincode: wisselt tussen in en uit",
        "description": "Klokken met alleen de pincode: wisselt tussen in en uit.\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pincode": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlokUitkomst"
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- In- en uitklokken staat uit.\n- Voer een pincode van 4 tot 8 cijfers in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "In- en uitklokken staat uit."
                }
              }
            }
          },
          "401": {
            "description": "Onbekende pincode.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende pincode."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/klok/stand": {
      "get": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "getKlokStand",
        "summary": "Staat klokken aan?",
        "description": "Staat klokken aan? (Het pincodescherm toont dan de knop \"In- / uitklokken\".)\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "stand": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "aan",
                        "verplicht"
                      ]
                    }
                  },
                  "required": [
                    "stand"
                  ]
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/klok/uit": {
      "post": {
        "tags": [
          "Werktijden"
        ],
        "operationId": "postKlokUit",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlokUitkomst"
                }
              }
            }
          },
          "400": {
            "description": "In- en uitklokken staat uit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "In- en uitklokken staat uit."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/logboek": {
      "get": {
        "tags": [
          "Logboek"
        ],
        "operationId": "getLogboek",
        "description": "**Toegang:** Vereist recht `logboek` (Logboek bekijken).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "soorten",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gebruikerId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "tijd": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "soort": {
                            "type": "string"
                          },
                          "gebruikerId": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string",
                            "nullable": true
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "medewerkerNaam": {
                            "type": "string",
                            "nullable": true
                          },
                          "tafel": {
                            "type": "string",
                            "nullable": true
                          },
                          "bestellingNummer": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "tijd",
                          "soort",
                          "gebruikerId",
                          "naam",
                          "details",
                          "medewerkerNaam",
                          "tafel",
                          "bestellingNummer"
                        ]
                      }
                    },
                    "meer": {
                      "type": "boolean"
                    },
                    "perMedewerker": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "gebruikerId": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "storno": {
                            "type": "number"
                          },
                          "stornoBedrag": {
                            "type": "number"
                          },
                          "korting": {
                            "type": "number"
                          },
                          "kortingBedrag": {
                            "type": "number"
                          },
                          "retour": {
                            "type": "number"
                          },
                          "retourBedrag": {
                            "type": "number"
                          },
                          "ladeOpen": {
                            "type": "number"
                          },
                          "geldUit": {
                            "type": "number"
                          },
                          "kopie": {
                            "type": "number"
                          },
                          "proforma": {
                            "type": "number"
                          },
                          "pinHandmatig": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "gebruikerId",
                          "naam",
                          "storno",
                          "stornoBedrag",
                          "korting",
                          "kortingBedrag",
                          "retour",
                          "retourBedrag",
                          "ladeOpen",
                          "geldUit",
                          "kopie",
                          "proforma",
                          "pinHandmatig"
                        ]
                      }
                    },
                    "aanmeldenMislukt": {
                      "type": "number"
                    },
                    "medewerkers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "actief": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "actief"
                        ]
                      }
                    }
                  },
                  "required": [
                    "van",
                    "tot",
                    "regels",
                    "meer",
                    "perMedewerker",
                    "aanmeldenMislukt",
                    "medewerkers"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige periode (van tot en met tot).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van tot en met tot)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: logboek bekijken. Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: logboek bekijken. Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/maaltijdcheques/bestelling/{id}": {
      "get": {
        "tags": [
          "maaltijdcheques"
        ],
        "operationId": "getMaaltijdchequesBestellingId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "uitgevers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "pluxee",
                              "edenred",
                              "monizze"
                            ]
                          }
                        },
                        "beperkt": {
                          "type": "boolean"
                        },
                        "max": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aan",
                        "uitgevers",
                        "beperkt",
                        "max"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/mailing/terug": {
      "get": {
        "tags": [
          "Mailchimp en Klaviyo"
        ],
        "operationId": "getMailingTerug",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/menubord": {
      "get": {
        "tags": [
          "menubord"
        ],
        "operationId": "getMenubord",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MenubordBeeld"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/mijn-taal": {
      "post": {
        "tags": [
          "Aanmelden"
        ],
        "operationId": "postMijnTaal",
        "summary": "Taal van de aangemelde medewerker bewaren (vlaggetje rechtsonder naast het ©-knopje): nl, am, ar, ary, ary_…",
        "description": "Taal van de aangemelde medewerker bewaren (vlaggetje rechtsonder naast het\n©-knopje): nl, am, ar, ary, ary_latn, bg, ckb, cs, de, en, es, fa, fr, hi, hr, hu, id, it, ku, lt, lv, pap, pl, prs, ps, pt, rif, ro, ru, sk, so, sq, sr, srn, syr, ti, tr, uk, ur, vi, zgh of zh. Na aanmelden staat de kassa dan\nmeteen in die taal.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taal": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "taal": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "taal"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Onbekende taal.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende taal."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/muziek": {
      "get": {
        "tags": [
          "Muziek"
        ],
        "operationId": "getMuziek",
        "summary": "De bronnen voor het paneel (bv",
        "description": "De bronnen voor het paneel (bv. Bar, Terras) en wat ze kunnen.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bronnen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "nullable": true
                          },
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string",
                            "enum": [
                              "http",
                              "soundtrack",
                              "sonos",
                              "bluos",
                              "vlc",
                              "web"
                            ]
                          },
                          "kan": {
                            "$ref": "#/components/schemas/Mogelijk"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort",
                          "kan"
                        ]
                      }
                    }
                  },
                  "required": [
                    "bronnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/muziek/{id}/lijst": {
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postMuziekIdLijst",
        "summary": "Een lijst kiezen en afspelen: { id }",
        "description": "Een lijst kiezen en afspelen: { id }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MuziekStatus"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/muziek/{id}/lijsten": {
      "get": {
        "tags": [
          "Muziek"
        ],
        "operationId": "getMuziekIdLijsten",
        "summary": "Andere muziek om te kiezen: Sonos-favorieten en -afspeellijsten, BluOS-voorkeuzes",
        "description": "Andere muziek om te kiezen: Sonos-favorieten en -afspeellijsten, BluOS-voorkeuzes.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lijsten": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "soort": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam",
                          "soort"
                        ]
                      }
                    }
                  },
                  "required": [
                    "lijsten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/muziek/{id}/playlist": {
      "get": {
        "tags": [
          "Muziek"
        ],
        "operationId": "getMuziekIdPlaylist",
        "summary": "De playlist (wachtrij): { nu: index of null, nummers: [{ id, titel, artiest }] } (Sonos, BluOS, VLC)",
        "description": "De playlist (wachtrij): { nu: index of null, nummers: [{ id, titel, artiest }] } (Sonos, BluOS, VLC).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Playlist"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postMuziekIdPlaylist",
        "summary": "De playlist aanpassen: { actie: speel | weg | omhoog | omlaag | leeg, nummer }",
        "description": "De playlist aanpassen: { actie: speel | weg | omhoog | omlaag | leeg, nummer }. Geeft de nieuwe playlist.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Playlist"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/muziek/{id}/status": {
      "get": {
        "tags": [
          "Muziek"
        ],
        "operationId": "getMuziekIdStatus",
        "summary": "Wat er nu speelt: { speelt, titel, artiest, volume (0-100) }; onbekend = null",
        "description": "Wat er nu speelt: { speelt, titel, artiest, volume (0-100) }; onbekend = null.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MuziekStatus"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/muziek/{id}/{actie}": {
      "post": {
        "tags": [
          "Muziek"
        ],
        "operationId": "postMuziekIdActie",
        "summary": "Knop: afspelen, pauze, volgende, vorige, harder, zachter; of volume met { volume: 0-100 }",
        "description": "Knop: afspelen, pauze, volgende, vorige, harder, zachter; of volume met { volume: 0-100 }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "actie",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "volume": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MuziekStatus"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "tags": [
          "Documentatie"
        ],
        "operationId": "getOpenapiJson",
        "summary": "De OpenAPI-specificatie (JSON)",
        "description": "De OpenAPI-specificatie (JSON).\n\n**Toegang:** Openbaar: werkt zonder aanmelden.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "openapi.json ontbreekt. Draai \"npm run api:docs\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "openapi.json ontbreekt. Draai \"npm run api:docs\"."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/oprekening": {
      "get": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "getOprekening",
        "summary": "Voor het afrekenscherm: staat op rekening aan, en de actieve klanten met wat er open staat en hun grens",
        "description": "Voor het afrekenscherm: staat op rekening aan, en de actieve klanten met wat er open staat en hun grens.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "klanten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RekeningKlant"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "klanten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/bank": {
      "get": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "getOprekeningBank",
        "summary": "Bijschrijvingen (open eerst, met voorstel), en of er een bank gekoppeld is",
        "description": "Bijschrijvingen (open eerst, met voorstel), en of er een bank gekoppeld is.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transacties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankTransactie"
                      }
                    },
                    "koppeling": {
                      "type": "object",
                      "properties": {
                        "verbonden": {
                          "type": "boolean"
                        },
                        "verlopen": {
                          "type": "boolean"
                        },
                        "bank": {
                          "type": "object",
                          "properties": {
                            "naam": {
                              "type": "string"
                            },
                            "land": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "required": [
                            "naam",
                            "land"
                          ],
                          "nullable": true
                        },
                        "laatstOpgehaald": {
                          "type": "string",
                          "nullable": true
                        },
                        "automatisch": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "verbonden",
                        "verlopen",
                        "bank",
                        "laatstOpgehaald",
                        "automatisch",
                        "fout"
                      ]
                    }
                  },
                  "required": [
                    "transacties",
                    "koppeling"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/bank/afschrift": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postOprekeningBankAfschrift",
        "summary": "Bankafschrift inlezen: { inhoud } = de tekst van het bestand (CAMT.053-XML, MT940 of CODA)",
        "description": "Bankafschrift inlezen: { inhoud } = de tekst van het bestand (CAMT.053-XML, MT940 of CODA). Alleen bijschrijvingen;\ndubbele regels worden overgeslagen. Zeker bij een factuur en \"automatisch\" aan: meteen afgeboekt.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transacties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankTransactie"
                      }
                    },
                    "bron": {
                      "type": "string",
                      "enum": [
                        "camt",
                        "mt940",
                        "coda",
                        "enablebanking"
                      ]
                    },
                    "gelezen": {
                      "type": "number"
                    },
                    "nieuw": {
                      "type": "number"
                    },
                    "geboekt": {
                      "type": "number"
                    },
                    "voorstel": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "transacties",
                    "bron",
                    "gelezen",
                    "nieuw",
                    "geboekt",
                    "voorstel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/bank/{id}/boeken": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postOprekeningBankIdBoeken",
        "summary": "{ factuurId?",
        "description": "{ factuurId? }: deze bijschrijving afboeken bij die factuur (leeg = het voorstel), als \"Overgemaakt (bank)\" op de bankdatum.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transacties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankTransactie"
                      }
                    },
                    "transactie": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/BankTransactie"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "transacties",
                    "transactie"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/bank/{id}/heropenen": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postOprekeningBankIdHeropenen",
        "summary": "Een genegeerde bijschrijving weer open zetten",
        "description": "Een genegeerde bijschrijving weer open zetten.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transacties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankTransactie"
                      }
                    }
                  },
                  "required": [
                    "transacties"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/bank/{id}/negeren": {
      "post": {
        "tags": [
          "Bank (op rekening)"
        ],
        "operationId": "postOprekeningBankIdNegeren",
        "summary": "Hoort niet bij een factuur op rekening",
        "description": "Hoort niet bij een factuur op rekening.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "transacties": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankTransactie"
                      }
                    }
                  },
                  "required": [
                    "transacties"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/facturen": {
      "get": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "getOprekeningFacturen",
        "summary": "Openstaande facturen op rekening (nieuwste eerst), om een betaling in de zaak te ontvangen",
        "description": "Openstaande facturen op rekening (nieuwste eerst), om een betaling in de zaak te ontvangen.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "facturen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FactuurRij"
                      }
                    }
                  },
                  "required": [
                    "facturen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/facturen/{id}/betaling": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postOprekeningFacturenIdBetaling",
        "summary": "Betaling van een factuur op rekening: { methode: 'contant'|'pin'|'bon'|'bank', bedrag (centen), cadeaubonCo…",
        "description": "Betaling van een factuur op rekening: { methode: 'contant'|'pin'|'bon'|'bank', bedrag (centen), cadeaubonCode? }.\nContant: geld in de lade (komt op X en Z) en de lade gaat open. Pin: op de terminal gepind. Bank: overgemaakt\n(alleen vastleggen, migratie 086). Geen nieuwe kassabon.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factuur": {
                      "$ref": "#/components/schemas/FactuurRij"
                    },
                    "betalingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "methode",
                          "bedrag",
                          "door",
                          "op"
                        ]
                      }
                    }
                  },
                  "required": [
                    "factuur",
                    "betalingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Betalen op rekening staat uit (Instellingen → Facturen).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Betalen op rekening staat uit (Instellingen → Facturen)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/facturen/{id}/betalingen": {
      "get": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "getOprekeningFacturenIdBetalingen",
        "summary": "Betalingen van een factuur op rekening (methode, bedrag, door wie, wanneer)",
        "description": "Betalingen van een factuur op rekening (methode, bedrag, door wie, wanneer).\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "betalingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "methode",
                          "bedrag",
                          "door",
                          "op"
                        ]
                      }
                    }
                  },
                  "required": [
                    "betalingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/klanten/{id}/tegoed": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postOprekeningKlantenIdTegoed",
        "summary": "Tegoed op de rekening van een klant zetten (geld vooraf): { methode: 'contant'|'pin', bedrag (centen) }. Co…",
        "description": "Tegoed op de rekening van een klant zetten (geld vooraf): { methode: 'contant'|'pin', bedrag (centen) }.\nContant: geld in de lade (de lade gaat open). Pin: op de terminal gepind. Bij de volgende verkoop op rekening gaat\nhet tegoed eerst van de factuur af. In België: geld in (signMoneyInOut) bij de zwarte doos.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "klant": {
                      "$ref": "#/components/schemas/RekeningKlant"
                    },
                    "stortingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "door": {
                            "type": "string",
                            "nullable": true
                          },
                          "op": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "methode",
                          "bedrag",
                          "door",
                          "op"
                        ]
                      }
                    }
                  },
                  "required": [
                    "klant",
                    "stortingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/klanten/{id}/verzamelfactuur": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postOprekeningKlantenIdVerzamelfactuur",
        "summary": "Verzamelfactuur maken voor alle bonnen van deze klant die nog niet op een factuur staan (bv",
        "description": "Verzamelfactuur maken voor alle bonnen van deze klant die nog niet op een factuur staan (bv. aan het eind van de\nmaand; UC4121, UC4122). Versturen als dat bij de klant zo is ingesteld. In België: signInvoice met alle bonnen.\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factuur": {
                      "$ref": "#/components/schemas/FactuurRij"
                    },
                    "verstuurd": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "factuur",
                    "verstuurd"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Betalen op rekening staat uit (Instellingen → Facturen).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Betalen op rekening staat uit (Instellingen → Facturen)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/posten": {
      "get": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "getOprekeningPosten",
        "summary": "Bonnen op rekening die nog niet op een (verzamel)factuur staan (klanten met verzamelfactuur, migratie 132)",
        "description": "Bonnen op rekening die nog niet op een (verzamel)factuur staan (klanten met verzamelfactuur, migratie 132).\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RekeningPost"
                      }
                    }
                  },
                  "required": [
                    "posten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oprekening/posten/{id}/betaling": {
      "post": {
        "tags": [
          "Op rekening"
        ],
        "operationId": "postOprekeningPostenIdBetaling",
        "summary": "Betaling van een bon op rekening die nog niet op een factuur staat (verzamelfactuur): { methode, bedrag, ca…",
        "description": "Betaling van een bon op rekening die nog niet op een factuur staat (verzamelfactuur): { methode, bedrag, cadeaubonCode? },\nzoals bij een factuur. In België: betaalcorrectie op de bon (UC4118).\n\n**Toegang:** Vereist recht `op_rekening` (Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "$ref": "#/components/schemas/RekeningPost"
                    }
                  },
                  "required": [
                    "post"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Betalen op rekening staat uit (Instellingen → Facturen).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Betalen op rekening staat uit (Instellingen → Facturen)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oproep": {
      "get": {
        "tags": [
          "Oproepscherm"
        ],
        "operationId": "getOproep",
        "summary": "Voor het scherm: { aan, zaak, geluid, bereid: [{ nummer, naam?",
        "description": "Voor het scherm: { aan, zaak, geluid, bereid: [{ nummer, naam? }], klaar: [{ nummer, naam?, klaarOp }] }.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "zaak": {
                      "type": "string"
                    },
                    "geluid": {
                      "type": "boolean"
                    },
                    "stem": {
                      "type": "string",
                      "enum": [
                        "nl",
                        "ar",
                        "de",
                        "en",
                        "es",
                        "fr",
                        "it",
                        "pl",
                        "pt",
                        "tr"
                      ]
                    },
                    "bereid": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "nummer": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "bezorger": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "nummer"
                        ]
                      }
                    },
                    "klaar": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "nummer": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          },
                          "bezorger": {
                            "type": "string"
                          },
                          "klaarOp": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "nummer",
                          "klaarOp"
                        ]
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "zaak",
                    "geluid",
                    "bereid",
                    "klaar"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oproep/overzicht": {
      "get": {
        "tags": [
          "Oproepscherm"
        ],
        "operationId": "getOproepOverzicht",
        "summary": "Voor de kassa (knop Oproepen): { aan, minuten, bereid, klaar } met bestelnummer, naam en bron",
        "description": "Voor de kassa (knop Oproepen): { aan, minuten, bereid, klaar } met bestelnummer, naam en bron.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "minuten": {
                      "type": "number"
                    },
                    "bereid": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OproepRij"
                      }
                    },
                    "klaar": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OproepRij"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "minuten",
                    "bereid",
                    "klaar"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/oproep/{id}": {
      "post": {
        "tags": [
          "Oproepscherm"
        ],
        "operationId": "postOproepId",
        "summary": "Met de hand: { stand: 'klaar' | 'bereid' | 'weg' | null } (null = weer vanzelf, bv",
        "description": "Met de hand: { stand: 'klaar' | 'bereid' | 'weg' | null } (null = weer vanzelf, bv. na \"Opgehaald\" ongedaan maken).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "minuten": {
                      "type": "number"
                    },
                    "bereid": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OproepRij"
                      }
                    },
                    "klaar": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OproepRij"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "minuten",
                    "bereid",
                    "klaar"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/pin/config": {
      "get": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "getPinConfig",
        "summary": "Wat de kassa moet weten om het afrekenscherm op te bouwen (zonder sleutel)",
        "description": "Wat de kassa moet weten om het afrekenscherm op te bouwen (zonder sleutel).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "actief": {
                      "type": "boolean"
                    },
                    "testmodus": {
                      "type": "boolean"
                    },
                    "terminals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    }
                  },
                  "required": [
                    "actief",
                    "testmodus",
                    "terminals"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/pin/{id}": {
      "get": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "getPinId",
        "summary": "Status van een pinbetaling (vraagt zo nodig de API)",
        "description": "Status van een pinbetaling (vraagt zo nodig de API).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string"
                    },
                    "terminalNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "starten",
                        "started",
                        "pending",
                        "success",
                        "failed"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "testmodus": {
                      "type": "boolean"
                    },
                    "terugbetaling": {
                      "type": "boolean"
                    },
                    "fooi": {
                      "type": "number"
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "terminalNaam",
                    "bedrag",
                    "status",
                    "fout",
                    "testmodus",
                    "terugbetaling",
                    "fooi",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Pinbetaling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Pinbetaling niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/pin/{id}/annuleren": {
      "post": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "postPinIdAnnuleren",
        "summary": "Lopende betaling op de terminal afbreken",
        "description": "Lopende betaling op de terminal afbreken.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string"
                    },
                    "terminalNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "starten",
                        "started",
                        "pending",
                        "success",
                        "failed"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "testmodus": {
                      "type": "boolean"
                    },
                    "terugbetaling": {
                      "type": "boolean"
                    },
                    "fooi": {
                      "type": "number"
                    },
                    "verwerkt": {
                      "type": "boolean"
                    },
                    "aangemaaktOp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "bestellingId",
                    "terminalNaam",
                    "bedrag",
                    "status",
                    "fout",
                    "testmodus",
                    "terugbetaling",
                    "fooi",
                    "verwerkt",
                    "aangemaaktOp"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Pinbetaling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Pinbetaling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Deze betaling is al gelukt en kan niet meer geannuleerd worden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze betaling is al gelukt en kan niet meer geannuleerd worden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "502": {
            "description": "Annuleren lukte niet: … Breek de betaling zo nodig af op de terminal zelf.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Annuleren lukte niet: … Breek de betaling zo nodig af op de terminal zelf."
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/printapparaat/opdrachten": {
      "get": {
        "tags": [
          "Printapparaat"
        ],
        "operationId": "getPrintapparaatOpdrachten",
        "summary": "Bonnen ophalen",
        "description": "Bonnen ophalen. Staat er niets klaar, dan blijft het verzoek tot 25 seconden open\nen komt het antwoord zodra er een bon is (?wacht=0: meteen antwoorden).",
        "parameters": [
          {
            "name": "wacht",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "opdrachten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApparaatOpdracht"
                      }
                    }
                  },
                  "required": [
                    "opdrachten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekend printapparaat. Meld dit apparaat opnieuw aan in Instellingen → Printers.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekend printapparaat. Meld dit apparaat opnieuw aan in Instellingen → Printers."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/printapparaat/opdrachten/{id}": {
      "post": {
        "tags": [
          "Printapparaat"
        ],
        "operationId": "postPrintapparaatOpdrachtenId",
        "summary": "Resultaat van een bon melden",
        "description": "Resultaat van een bon melden. Body: { ok: true }, of { ok: false, fout: \"papier op\" }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ok": {
                    "type": "boolean"
                  },
                  "fout": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bekend": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "bekend"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekend printapparaat.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekend printapparaat."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/printwachtrij": {
      "get": {
        "tags": [
          "Printwachtrij"
        ],
        "operationId": "getPrintwachtrij",
        "summary": "Werkbonnen die nog wachten op de printer (leeg = alles is geprint)",
        "description": "Werkbonnen die nog wachten op de printer (leeg = alles is geprint).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bonnen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WachtendeWerkbon"
                      }
                    }
                  },
                  "required": [
                    "bonnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/printwachtrij/opnieuw": {
      "post": {
        "tags": [
          "Printwachtrij"
        ],
        "operationId": "postPrintwachtrijOpnieuw",
        "summary": "Nu meteen opnieuw printen (ook bonnen waarbij de kassa na een kwartier gestopt is)",
        "description": "Nu meteen opnieuw printen (ook bonnen waarbij de kassa na een kwartier gestopt is).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bonnen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WachtendeWerkbon"
                      }
                    },
                    "gelukt": {
                      "type": "number"
                    },
                    "mislukt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "bonnen",
                    "gelukt",
                    "mislukt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/printwachtrij/{id}/verwijderen": {
      "post": {
        "tags": [
          "Printwachtrij"
        ],
        "operationId": "postPrintwachtrijIdVerwijderen",
        "summary": "Een werkbon niet meer printen (bv",
        "description": "Een werkbon niet meer printen (bv. de keuken heeft hem al op papier gekregen).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bonnen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WachtendeWerkbon"
                      }
                    }
                  },
                  "required": [
                    "ok",
                    "bonnen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Deze werkbon staat niet (meer) in de wachtrij.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze werkbon staat niet (meer) in de wachtrij."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/acties": {
      "get": {
        "tags": [
          "extrarapporten"
        ],
        "operationId": "getRapportActies",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "regels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActieRegel"
                      }
                    },
                    "totaal": {
                      "type": "object",
                      "properties": {
                        "bonnen": {
                          "type": "number"
                        },
                        "korting": {
                          "type": "number"
                        },
                        "omzet": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "bonnen",
                        "korting",
                        "omzet"
                      ]
                    },
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "regels",
                    "totaal",
                    "van",
                    "tot"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/dashboard": {
      "get": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "getRapportDashboard",
        "summary": "Dashboard (tabblad in Rapport): omzet per uur van een dag tegenover dezelfde dag een week eerder, top 10 pr…",
        "description": "Dashboard (tabblad in Rapport): omzet per uur van een dag tegenover\ndezelfde dag een week eerder, top 10 producten, gemiddelde besteding per\ngast en de drukste uren over de laatste 7/28/90 dagen. Alleen lezen.\n?datum=JJJJ-MM-DD (standaard vandaag), ?dagen=7|28|90 (standaard 28).\n\n**Toegang:** Controleert daarnaast: `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "datum",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dagen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "datum": {
                      "type": "string"
                    },
                    "vorigeWeekDatum": {
                      "type": "string"
                    },
                    "isVandaag": {
                      "type": "boolean"
                    },
                    "dagen": {
                      "type": "number"
                    },
                    "perUur": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uur": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          },
                          "vorigeWeek": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "uur",
                          "omzet",
                          "vorigeWeek"
                        ]
                      }
                    },
                    "dag": {
                      "type": "object",
                      "properties": {
                        "omzet": {
                          "type": "number"
                        },
                        "bonnen": {
                          "type": "number"
                        },
                        "gasten": {
                          "type": "number"
                        },
                        "omzetGasten": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "omzet",
                        "bonnen",
                        "gasten",
                        "omzetGasten"
                      ]
                    },
                    "vorigeWeek": {
                      "type": "object",
                      "properties": {
                        "omzet": {
                          "type": "number"
                        },
                        "bonnen": {
                          "type": "number"
                        },
                        "gasten": {
                          "type": "number"
                        },
                        "omzetGasten": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "omzet",
                        "bonnen",
                        "gasten",
                        "omzetGasten"
                      ]
                    },
                    "vorigeWeekTotNu": {
                      "type": "number",
                      "nullable": true
                    },
                    "periode": {
                      "type": "object",
                      "properties": {
                        "gasten": {
                          "type": "number"
                        },
                        "omzet": {
                          "type": "number"
                        },
                        "bonnen": {
                          "type": "number"
                        },
                        "omzetGasten": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "gasten",
                        "omzet",
                        "bonnen",
                        "omzetGasten"
                      ]
                    },
                    "openDagen": {
                      "type": "number"
                    },
                    "top10": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "naam": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "naam",
                          "aantal",
                          "omzet"
                        ]
                      }
                    },
                    "drukte": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "weekdag": {
                            "type": "number"
                          },
                          "uur": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          },
                          "bonnen": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "weekdag",
                          "uur",
                          "omzet",
                          "bonnen"
                        ]
                      }
                    }
                  },
                  "required": [
                    "datum",
                    "vorigeWeekDatum",
                    "isVandaag",
                    "dagen",
                    "perUur",
                    "dag",
                    "vorigeWeek",
                    "vorigeWeekTotNu",
                    "periode",
                    "openDagen",
                    "top10",
                    "drukte"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige datum.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige datum."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/extra": {
      "get": {
        "tags": [
          "extrarapporten"
        ],
        "operationId": "getRapportExtra",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtraRapporten"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/journaal": {
      "get": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "getRapportJournaal",
        "summary": "Controle van het fiscale journaal: is de hashketen ongebroken?",
        "description": "Controle van het fiscale journaal: is de hashketen ongebroken?",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "geldig": {
                      "type": "boolean"
                    },
                    "foutBijVolgnummer": {
                      "type": "number"
                    },
                    "aantalTickets": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "geldig",
                    "aantalTickets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/menu-engineering": {
      "get": {
        "tags": [
          "extrarapporten"
        ],
        "operationId": "getRapportMenuEngineering",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groep",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MenuEngineering"
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/periode": {
      "get": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "getRapportPeriode",
        "summary": "Omzetoverzicht over een periode (manager/beheerder): ?van=2026-09-01&tot=2026-09-30 (beide dagen inclusief,…",
        "description": "Omzetoverzicht over een periode (manager/beheerder): ?van=2026-09-01&tot=2026-09-30\n(beide dagen inclusief, Nederlandse/Belgische tijd). Zelfde opbouw als het\nX-rapport, plus omzet per dag en per medewerker.\n\n**Toegang:** Controleert daarnaast: `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "perDag": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dag": {
                            "type": "string"
                          },
                          "bonnen": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          },
                          "gasten": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "dag",
                          "bonnen",
                          "omzet",
                          "gasten"
                        ]
                      }
                    },
                    "perMedewerker": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "naam": {
                            "type": "string"
                          },
                          "bonnen": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          },
                          "fooi": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "naam",
                          "bonnen",
                          "omzet",
                          "fooi"
                        ]
                      }
                    },
                    "betaalcorrecties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "van": {
                            "type": "string"
                          },
                          "naar": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "van",
                          "naar",
                          "aantal",
                          "bedrag"
                        ]
                      }
                    },
                    "valuta": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "valutaBedrag": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "wisselgeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "aantal",
                          "valutaBedrag",
                          "bedrag",
                          "wisselgeld"
                        ]
                      }
                    },
                    "opRekening": {
                      "type": "object",
                      "properties": {
                        "ontvangen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "methode": {
                                "type": "string"
                              },
                              "aantal": {
                                "type": "number"
                              },
                              "bedrag": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "methode",
                              "aantal",
                              "bedrag"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ontvangen"
                      ]
                    },
                    "geldautomaat": {
                      "type": "object",
                      "properties": {
                        "contant": {
                          "type": "number"
                        },
                        "tekort": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "contant",
                        "tekort"
                      ]
                    },
                    "fooiVerdeling": {
                      "$ref": "#/components/schemas/FooiVerdeling"
                    },
                    "cadeaubonnen": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "vanaf": {
                      "type": "string"
                    },
                    "aantalBonnen": {
                      "type": "number"
                    },
                    "omzetIncl": {
                      "type": "number"
                    },
                    "perBtw": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "percentage": {
                            "type": "number"
                          },
                          "basis": {
                            "type": "number"
                          },
                          "btw": {
                            "type": "number"
                          },
                          "totaal": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "percentage",
                          "basis",
                          "btw",
                          "totaal"
                        ]
                      }
                    },
                    "perBetaalwijze": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "fooi": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "methode",
                          "aantal",
                          "bedrag",
                          "fooi"
                        ]
                      }
                    },
                    "perGroep": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "groep": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "groep",
                          "aantal",
                          "omzet"
                        ]
                      }
                    },
                    "aantalStornos": {
                      "type": "number"
                    },
                    "retour": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "gasten": {
                      "type": "number"
                    },
                    "kortingen": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    }
                  },
                  "required": [
                    "van",
                    "tot",
                    "perDag",
                    "perMedewerker",
                    "vanaf",
                    "aantalBonnen",
                    "omzetIncl",
                    "perBtw",
                    "perBetaalwijze",
                    "perGroep",
                    "aantalStornos",
                    "retour",
                    "gasten",
                    "kortingen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een geldige periode (van tot en met tot).\n- Kies een periode van hooguit ruim een jaar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van tot en met tot)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/verspilling": {
      "get": {
        "tags": [
          "extrarapporten"
        ],
        "operationId": "getRapportVerspilling",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "afgeboekt": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VerspillingRegel"
                      }
                    },
                    "perReden": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "reden": {
                            "type": "string"
                          },
                          "keer": {
                            "type": "number"
                          },
                          "waarde": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "reden",
                          "keer",
                          "waarde"
                        ]
                      }
                    },
                    "geannuleerd": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "artikelId": {
                            "type": "string",
                            "nullable": true
                          },
                          "naam": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "verkoopwaarde": {
                            "type": "number"
                          },
                          "kostwaarde": {
                            "type": "number",
                            "nullable": true
                          }
                        },
                        "required": [
                          "artikelId",
                          "naam",
                          "aantal",
                          "verkoopwaarde",
                          "kostwaarde"
                        ]
                      },
                      "description": "Geannuleerd nadat het al naar de keuken of bar was gestuurd (storno na versturen)."
                    },
                    "totaal": {
                      "type": "object",
                      "properties": {
                        "waarde": {
                          "type": "number"
                        },
                        "zonderWaarde": {
                          "type": "number"
                        },
                        "geannuleerdVerkoop": {
                          "type": "number"
                        },
                        "geannuleerdKost": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "waarde",
                        "zonderWaarde",
                        "geannuleerdVerkoop",
                        "geannuleerdKost"
                      ]
                    },
                    "van": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "afgeboekt",
                    "perReden",
                    "geannuleerd",
                    "totaal",
                    "van",
                    "tot"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/x": {
      "get": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "getRapportX",
        "summary": "X-rapport: tussenstand sinds de vorige dagafsluiting, zonder iets af te sluiten",
        "description": "X-rapport: tussenstand sinds de vorige dagafsluiting, zonder iets af te\nsluiten. Met ?vanaf=... een eigen beginmoment (zoals voorheen).\n\n**Toegang:** Controleert daarnaast: `x_rapport` (Tussenstand (X-rapport) bekijken), `dag_afsluiten` (Dag afsluiten (Z-rapport)).",
        "parameters": [
          {
            "name": "vanaf",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kas": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "wisselgeldValuta": {
                              "type": "number"
                            },
                            "inAutomaat": {
                              "type": "number"
                            },
                            "tekortUitLade": {
                              "type": "number"
                            },
                            "startgeld": {
                              "type": "number"
                            },
                            "contantOntvangen": {
                              "type": "number"
                            },
                            "verwacht": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "startgeld",
                            "contantOntvangen",
                            "verwacht"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "wisselgeldValuta": {
                              "type": "number"
                            },
                            "inAutomaat": {
                              "type": "number"
                            },
                            "tekortUitLade": {
                              "type": "number"
                            },
                            "startgeld": {
                              "type": "number"
                            },
                            "contantOntvangen": {
                              "type": "number"
                            },
                            "inLade": {
                              "type": "number"
                            },
                            "uitLade": {
                              "type": "number"
                            },
                            "mutaties": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Kasmutatie"
                              }
                            },
                            "verwacht": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "startgeld",
                            "contantOntvangen",
                            "inLade",
                            "uitLade",
                            "mutaties",
                            "verwacht"
                          ]
                        }
                      ]
                    },
                    "betaalcorrecties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "van": {
                            "type": "string"
                          },
                          "naar": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "van",
                          "naar",
                          "aantal",
                          "bedrag"
                        ]
                      }
                    },
                    "valuta": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "valutaBedrag": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "wisselgeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "aantal",
                          "valutaBedrag",
                          "bedrag",
                          "wisselgeld"
                        ]
                      }
                    },
                    "opRekening": {
                      "type": "object",
                      "properties": {
                        "ontvangen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "methode": {
                                "type": "string"
                              },
                              "aantal": {
                                "type": "number"
                              },
                              "bedrag": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "methode",
                              "aantal",
                              "bedrag"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ontvangen"
                      ]
                    },
                    "geldautomaat": {
                      "type": "object",
                      "properties": {
                        "contant": {
                          "type": "number"
                        },
                        "tekort": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "contant",
                        "tekort"
                      ]
                    },
                    "fooiVerdeling": {
                      "$ref": "#/components/schemas/FooiVerdeling"
                    },
                    "cadeaubonnen": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "vanaf": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "aantalBonnen": {
                      "type": "number"
                    },
                    "omzetIncl": {
                      "type": "number"
                    },
                    "perBtw": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "percentage": {
                            "type": "number"
                          },
                          "basis": {
                            "type": "number"
                          },
                          "btw": {
                            "type": "number"
                          },
                          "totaal": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "percentage",
                          "basis",
                          "btw",
                          "totaal"
                        ]
                      }
                    },
                    "perBetaalwijze": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "fooi": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "methode",
                          "aantal",
                          "bedrag",
                          "fooi"
                        ]
                      }
                    },
                    "perGroep": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "groep": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "groep",
                          "aantal",
                          "omzet"
                        ]
                      }
                    },
                    "aantalStornos": {
                      "type": "number"
                    },
                    "retour": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "gasten": {
                      "type": "number"
                    },
                    "kortingen": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    }
                  },
                  "required": [
                    "kas",
                    "vanaf",
                    "tot",
                    "aantalBonnen",
                    "omzetIncl",
                    "perBtw",
                    "perBetaalwijze",
                    "perGroep",
                    "aantalStornos",
                    "retour",
                    "gasten",
                    "kortingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/x/print": {
      "post": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "postRapportXPrint",
        "summary": "X-rapport printen op de bonprinter",
        "description": "X-rapport printen op de bonprinter.\n\n**Toegang:** Controleert daarnaast: `x_rapport` (Tussenstand (X-rapport) bekijken).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/xaa": {
      "get": {
        "tags": [
          "Auditfile kassa (XAA)"
        ],
        "operationId": "getRapportXaa",
        "summary": "De auditfile van een periode (?van=JJJJ-MM-DD&tot=JJJJ-MM-DD, beide inclusief, hooguit ruim een jaar): { in…",
        "description": "De auditfile van een periode (?van=JJJJ-MM-DD&tot=JJJJ-MM-DD, beide\ninclusief, hooguit ruim een jaar): { inhoud, naam, ondertekend, bonnen,\ngebeurtenissen }. Met certificaat ondertekend in een envelop.\n\n**Toegang:** Controleert daarnaast: `omzet_periode` (Omzet per periode).",
        "parameters": [
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bonnen": {
                      "type": "number"
                    },
                    "gebeurtenissen": {
                      "type": "number"
                    },
                    "inhoud": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "ondertekend": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "bonnen",
                    "gebeurtenissen",
                    "inhoud",
                    "naam",
                    "ondertekend"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Kies een geldige periode (van tot en met tot).\n- Kies een periode van hooguit ruim een jaar.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van tot en met tot)."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/xaa/status": {
      "get": {
        "tags": [
          "Auditfile kassa (XAA)"
        ],
        "operationId": "getRapportXaaStatus",
        "summary": "Wordt de auditfile ondertekend (XAA_SLEUTEL en XAA_CERTIFICAAT in .env)?",
        "description": "Wordt de auditfile ondertekend (XAA_SLEUTEL en XAA_CERTIFICAAT in .env)?\n\n**Toegang:** Controleert daarnaast: `omzet_periode` (Omzet per periode).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ondertekenen": {
                      "type": "boolean"
                    },
                    "certificaat": {
                      "type": "string",
                      "nullable": true
                    },
                    "geldigTot": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ondertekenen",
                    "certificaat",
                    "geldigTot"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/z": {
      "post": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "postRapportZ",
        "summary": "Z-rapport: de dag afsluiten",
        "description": "Z-rapport: de dag afsluiten. Alles sinds de vorige afsluiting telt mee.\nMet de telling van de kassalade wordt het kasverschil vastgelegd.\nDaarna begint een nieuwe periode met het opgegeven startgeld.\n\n**Toegang:** Controleert daarnaast: `dag_afsluiten` (Dag afsluiten (Z-rapport)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "telling": {
                    "type": "number",
                    "nullable": true
                  },
                  "startgeldVolgende": {
                    "type": "number"
                  },
                  "telDetail": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "waarde": {},
                        "aantal": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "printFout": {
                      "type": "string"
                    },
                    "mailNaar": {
                      "type": "number"
                    },
                    "fiscaleRegels": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "kas": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "wisselgeldValuta": {
                              "type": "number"
                            },
                            "inAutomaat": {
                              "type": "number"
                            },
                            "tekortUitLade": {
                              "type": "number"
                            },
                            "startgeld": {
                              "type": "number"
                            },
                            "contantOntvangen": {
                              "type": "number"
                            },
                            "verwacht": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "startgeld",
                            "contantOntvangen",
                            "verwacht"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "wisselgeldValuta": {
                              "type": "number"
                            },
                            "inAutomaat": {
                              "type": "number"
                            },
                            "tekortUitLade": {
                              "type": "number"
                            },
                            "startgeld": {
                              "type": "number"
                            },
                            "contantOntvangen": {
                              "type": "number"
                            },
                            "inLade": {
                              "type": "number"
                            },
                            "uitLade": {
                              "type": "number"
                            },
                            "mutaties": {
                              "type": "array",
                              "items": {
                                "$ref": "#/components/schemas/Kasmutatie"
                              }
                            },
                            "verwacht": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "startgeld",
                            "contantOntvangen",
                            "inLade",
                            "uitLade",
                            "mutaties",
                            "verwacht"
                          ]
                        }
                      ]
                    },
                    "z": {
                      "type": "object",
                      "properties": {
                        "telDetail": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "waarde": {
                                "type": "number"
                              },
                              "aantal": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "waarde",
                              "aantal"
                            ]
                          }
                        },
                        "nummer": {
                          "type": "number"
                        },
                        "telling": {
                          "type": "number",
                          "nullable": true
                        },
                        "verschil": {
                          "type": "number",
                          "nullable": true
                        },
                        "startgeldVolgende": {
                          "type": "number"
                        },
                        "afgeslotenDoor": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "nummer",
                        "telling",
                        "verschil",
                        "startgeldVolgende",
                        "afgeslotenDoor"
                      ]
                    },
                    "betaalcorrecties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "van": {
                            "type": "string"
                          },
                          "naar": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "van",
                          "naar",
                          "aantal",
                          "bedrag"
                        ]
                      }
                    },
                    "valuta": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "valutaBedrag": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "wisselgeld": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "aantal",
                          "valutaBedrag",
                          "bedrag",
                          "wisselgeld"
                        ]
                      }
                    },
                    "opRekening": {
                      "type": "object",
                      "properties": {
                        "ontvangen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "methode": {
                                "type": "string"
                              },
                              "aantal": {
                                "type": "number"
                              },
                              "bedrag": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "methode",
                              "aantal",
                              "bedrag"
                            ]
                          }
                        }
                      },
                      "required": [
                        "ontvangen"
                      ]
                    },
                    "geldautomaat": {
                      "type": "object",
                      "properties": {
                        "contant": {
                          "type": "number"
                        },
                        "tekort": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "contant",
                        "tekort"
                      ]
                    },
                    "fooiVerdeling": {
                      "$ref": "#/components/schemas/FooiVerdeling"
                    },
                    "cadeaubonnen": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "vanaf": {
                      "type": "string"
                    },
                    "tot": {
                      "type": "string"
                    },
                    "aantalBonnen": {
                      "type": "number"
                    },
                    "omzetIncl": {
                      "type": "number"
                    },
                    "perBtw": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "percentage": {
                            "type": "number"
                          },
                          "basis": {
                            "type": "number"
                          },
                          "btw": {
                            "type": "number"
                          },
                          "totaal": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "code",
                          "percentage",
                          "basis",
                          "btw",
                          "totaal"
                        ]
                      }
                    },
                    "perBetaalwijze": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "methode": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "bedrag": {
                            "type": "number"
                          },
                          "fooi": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "methode",
                          "aantal",
                          "bedrag",
                          "fooi"
                        ]
                      }
                    },
                    "perGroep": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "groep": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "omzet": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "groep",
                          "aantal",
                          "omzet"
                        ]
                      }
                    },
                    "aantalStornos": {
                      "type": "number"
                    },
                    "retour": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "gasten": {
                      "type": "number"
                    },
                    "kortingen": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "bedrag": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "bedrag"
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "mailNaar",
                    "kas",
                    "z",
                    "vanaf",
                    "tot",
                    "aantalBonnen",
                    "omzetIncl",
                    "perBtw",
                    "perBetaalwijze",
                    "perGroep",
                    "aantalStornos",
                    "retour",
                    "gasten",
                    "kortingen",
                    "id"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Mogelijke meldingen:\n- Ongeldig getelde bedrag.\n- Ongeldig startgeld.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Ongeldig getelde bedrag."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Er staan nog … bestelling(en) open. Reken die eerst af.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Er staan nog … bestelling(en) open. Reken die eerst af."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "get": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "getRapportZ",
        "summary": "Eerdere Z-rapporten, nieuwste eerst",
        "description": "Eerdere Z-rapporten, nieuwste eerst.\n\n**Toegang:** Controleert daarnaast: `x_rapport` (Tussenstand (X-rapport) bekijken).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/z/{id}": {
      "get": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "getRapportZId",
        "description": "**Toegang:** Controleert daarnaast: `x_rapport` (Tussenstand (X-rapport) bekijken).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RapportBonGegevens"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Z-rapport niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Z-rapport niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/z/{id}/mail": {
      "post": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "postRapportZIdMail",
        "summary": "Een oud Z-rapport opnieuw mailen naar de beheerder (met \"KOPIE\" erop)",
        "description": "Een oud Z-rapport opnieuw mailen naar de beheerder (met \"KOPIE\" erop).\n\n**Toegang:** Controleert daarnaast: `x_rapport` (Tussenstand (X-rapport) bekijken).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "naar": {
                      "type": "number"
                    },
                    "fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "naar"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geen e-mailadres voor het Z-rapport ingesteld (Instellingen → Zaak), of geen mailserver in .env.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geen e-mailadres voor het Z-rapport ingesteld (Instellingen → Zaak), of geen mailserver in .env."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Z-rapport niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Z-rapport niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rapport/z/{id}/print": {
      "post": {
        "tags": [
          "Rapporten"
        ],
        "operationId": "postRapportZIdPrint",
        "summary": "Een oud Z-rapport opnieuw printen (met \"KOPIE\" erop)",
        "description": "Een oud Z-rapport opnieuw printen (met \"KOPIE\" erop).\n\n**Toegang:** Controleert daarnaast: `x_rapport` (Tussenstand (X-rapport) bekijken).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Z-rapport niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Z-rapport niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/rechten": {
      "get": {
        "tags": [
          "Rechten"
        ],
        "operationId": "getRechten",
        "summary": "Rechten van de aangemelde medewerker (welke knoppen de kassa toont)",
        "description": "Rechten van de aangemelde medewerker (welke knoppen de kassa toont).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "rechten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reserveringen": {
      "get": {
        "tags": [
          "Reserveringen"
        ],
        "operationId": "getReserveringen",
        "summary": "Reserveringen van één dag (standaard vandaag), op tijd",
        "description": "Reserveringen van één dag (standaard vandaag), op tijd.",
        "parameters": [
          {
            "name": "datum",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Rij"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Reserveringen"
        ],
        "operationId": "postReserveringen",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mail": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok"
                      ]
                    },
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "telefoon": {
                      "type": "string",
                      "nullable": true
                    },
                    "email": {
                      "type": "string",
                      "nullable": true
                    },
                    "personen": {
                      "type": "number"
                    },
                    "tijdstip": {
                      "type": "string"
                    },
                    "datum": {
                      "type": "string"
                    },
                    "tijd": {
                      "type": "string"
                    },
                    "duurMin": {
                      "type": "number"
                    },
                    "tafelId": {
                      "type": "string",
                      "nullable": true
                    },
                    "tafelNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "opmerking": {
                      "type": "string",
                      "nullable": true
                    },
                    "status": {
                      "type": "string"
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "klantId": {
                      "type": "string",
                      "nullable": true
                    },
                    "gemaildOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "platformId": {
                      "type": "string",
                      "nullable": true,
                      "description": "reservering van een platform (migratie 078): id en naam (bv. TheFork)"
                    },
                    "platformNaam": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "id",
                    "naam",
                    "telefoon",
                    "email",
                    "personen",
                    "tijdstip",
                    "datum",
                    "tijd",
                    "duurMin",
                    "tafelId",
                    "tafelNaam",
                    "opmerking",
                    "status",
                    "bestellingId",
                    "klantId",
                    "gemaildOp"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reserveringen/platform/{id}": {
      "post": {
        "tags": [
          "reserveringplatform"
        ],
        "operationId": "postReserveringenPlatformId",
        "summary": "Reserveringen van een platform: één reservering, een lijst, of { reservations | bookings: [...] }; per rese…",
        "description": "Reserveringen van een platform: één reservering, een lijst, of { reservations | bookings: [...] };\nper reservering id, personen, tijd (of datum + tijd), naam, telefoon, e-mail, tafel, opmerking, status.\nTheFork: het seintje van de webhook ({ entityType, eventType, uuid }); de kassa haalt de reservering op.\nStaat het uit: 503 (het platform probeert het later opnieuw).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fouten": {
                      "type": "number"
                    },
                    "nieuw": {
                      "type": "number"
                    },
                    "bijgewerkt": {
                      "type": "number"
                    },
                    "opTafel": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "fouten",
                    "nieuw",
                    "bijgewerkt",
                    "opTafel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekend platform of verkeerde sleutel.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekend platform of verkeerde sleutel."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reserveringen/{id}": {
      "put": {
        "tags": [
          "Reserveringen"
        ],
        "operationId": "putReserveringenId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Rij"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Reservering niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Reservering niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reserveringen/{id}/mail": {
      "post": {
        "tags": [
          "Reserveringen"
        ],
        "operationId": "postReserveringenIdMail",
        "summary": "Bevestiging (opnieuw) mailen",
        "description": "Bevestiging (opnieuw) mailen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reservering": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Rij"
                        }
                      ],
                      "nullable": true
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "reservering",
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Reservering niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Reservering niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reserveringen/{id}/status": {
      "post": {
        "tags": [
          "Reserveringen"
        ],
        "operationId": "postReserveringenIdStatus",
        "summary": "Status: aangekomen (met de geopende bestelling), no_show, geannuleerd of terug naar gereserveerd",
        "description": "Status: aangekomen (met de geopende bestelling), no_show, geannuleerd of terug naar gereserveerd.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "bestellingId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Rij"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Onbekende status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende status."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Reservering niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Reservering niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/retouren/{id}/afronden": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postRetourenIdAfronden",
        "summary": "Retour afronden nadat de terugbetaling op de terminal gelukt is",
        "description": "Retour afronden nadat de terugbetaling op de terminal gelukt is.\n\n**Toegang:** Controleert daarnaast: `retour` (Retour doen (creditbon)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "bestellingId": {
                      "type": "string"
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "ticketNummer": {
                      "type": "number"
                    },
                    "printFout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "bestellingId",
                    "bedrag"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "404": {
            "description": "Deze retour bestaat niet of is al afgerond.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze retour bestaat niet of is al afgerond."
                }
              }
            }
          },
          "409": {
            "description": "De terugbetaling op de terminal is (nog) niet gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De terugbetaling op de terminal is (nog) niet gelukt."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/retouren/{id}/annuleren": {
      "post": {
        "tags": [
          "Bonnen"
        ],
        "operationId": "postRetourenIdAnnuleren",
        "summary": "Retour afbreken zolang er geen geld is teruggegaan",
        "description": "Retour afbreken zolang er geen geld is teruggegaan.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Het geld is al teruggestort op de kaart. Rond de retour af.\n- De terugbetaling loopt nog. Breek hem eerst af.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Het geld is al teruggestort op de kaart. Rond de retour af."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reviews": {
      "get": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "getReviews",
        "summary": "Reviews (nieuwste eerst) met samenvatting; filters: platform, zonderAntwoord=true, sterren=1..5, ongelezen=…",
        "description": "Reviews (nieuwste eerst) met samenvatting; filters: platform, zonderAntwoord=true, sterren=1..5, ongelezen=true.\n\n**Toegang:** Vereist recht `reviews_beantwoorden` (Reviews lezen en beantwoorden (Google, Trustpilot)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reviews": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReviewRegel"
                      }
                    },
                    "samenvatting": {
                      "type": "object",
                      "properties": {
                        "aantal": {
                          "type": "number"
                        },
                        "gemiddeld": {
                          "type": "number",
                          "nullable": true
                        },
                        "perSter": {
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        },
                        "zonderAntwoord": {
                          "type": "number"
                        },
                        "ongelezen": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aantal",
                        "gemiddeld",
                        "perSter",
                        "zonderAntwoord",
                        "ongelezen"
                      ]
                    },
                    "koppelingen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "string"
                          },
                          "manier": {
                            "type": "string"
                          },
                          "kanAntwoorden": {
                            "type": "boolean"
                          },
                          "laatsteSync": {
                            "type": "string",
                            "nullable": true
                          },
                          "laatsteFout": {
                            "type": "string",
                            "nullable": true
                          },
                          "gemiddeld": {
                            "type": "string",
                            "nullable": true
                          },
                          "totaal": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "platform",
                          "manier",
                          "kanAntwoorden",
                          "laatsteSync",
                          "laatsteFout",
                          "gemiddeld",
                          "totaal"
                        ]
                      }
                    }
                  },
                  "required": [
                    "reviews",
                    "samenvatting",
                    "koppelingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reviews/gelezen": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postReviewsGelezen",
        "summary": "{ ids: [...] } als gelezen markeren",
        "description": "{ ids: [...] } als gelezen markeren.\n\n**Toegang:** Vereist recht `reviews_beantwoorden` (Reviews lezen en beantwoorden (Google, Trustpilot)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gemarkeerd": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "gemarkeerd"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reviews/google/terug": {
      "get": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "getReviewsGoogleTerug",
        "description": "**Toegang:** Openbaar: werkt zonder aanmelden.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        },
        "security": []
      }
    },
    "/api/reviews/ophalen": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postReviewsOphalen",
        "summary": "Nu ophalen bij alle gekoppelde platforms",
        "description": "Nu ophalen bij alle gekoppelde platforms.\n\n**Toegang:** Vereist recht `reviews_beantwoorden` (Reviews lezen en beantwoorden (Google, Trustpilot)).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reviews/{id}/antwoord": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postReviewsIdAntwoord",
        "summary": "{ tekst }: antwoord van de zaak plaatsen of wijzigen op Google of Trustpilot",
        "description": "{ tekst }: antwoord van de zaak plaatsen of wijzigen op Google of Trustpilot.\n\n**Toegang:** Vereist recht `reviews_beantwoorden` (Reviews lezen en beantwoorden (Google, Trustpilot)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tekst": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/reviews/{id}/antwoord/verwijderen": {
      "post": {
        "tags": [
          "reviewbeheer"
        ],
        "operationId": "postReviewsIdAntwoordVerwijderen",
        "description": "**Toegang:** Vereist recht `reviews_beantwoorden` (Reviews lezen en beantwoorden (Google, Trustpilot)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: reviews lezen en beantwoorden (Google, Trustpilot). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getRitten",
        "summary": "Voor de kassa (knop Ritten): { aan, volgen, locatie, wisselgeld, portaal, bezorgers, open, ritten }",
        "description": "Voor de kassa (knop Ritten): { aan, volgen, locatie, wisselgeld, portaal, bezorgers, open, ritten }.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "volgen": {
                      "type": "boolean"
                    },
                    "locatie": {
                      "type": "boolean"
                    },
                    "wisselgeld": {
                      "type": "number"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "planning": {
                      "type": "boolean"
                    },
                    "app": {
                      "type": "boolean",
                      "description": "bezorgersapp (migratie 099): app aan, en de live kaart met alle bezorgers"
                    },
                    "kaart": {
                      "type": "boolean"
                    },
                    "bezorgers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "naam": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "naam"
                        ]
                      }
                    },
                    "open": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Stop"
                      }
                    },
                    "ritten": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Rit"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "volgen",
                    "locatie",
                    "wisselgeld",
                    "portaal",
                    "planning",
                    "app",
                    "kaart",
                    "bezorgers",
                    "open",
                    "ritten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postRitten",
        "summary": "Nieuwe rit: { bestellingIds, bezorgerId, wisselgeld?",
        "description": "Nieuwe rit: { bestellingIds, bezorgerId, wisselgeld? } → { rit, link } (link = voor de telefoon van de bezorger).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rit": {
                      "$ref": "#/components/schemas/Rit"
                    },
                    "link": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "rit",
                    "link"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/kaart": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getRittenKaart",
        "summary": "Bezorgersapp (migratie 099): live kaart met alle bezorgers → { aan, zaak, bezorgers: [{ naam, lat, lon, op,…",
        "description": "Bezorgersapp (migratie 099): live kaart met alle bezorgers → { aan, zaak, bezorgers: [{ naam, lat, lon, op, rit, status, viaApp }], stops }.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Kaart"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/voorstel": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getRittenVoorstel",
        "summary": "Ritplanning (migratie 098): voorstel voor ritten → { voorstellen: [{ stops, afstandKm, reistijdMin, aankoms…",
        "description": "Ritplanning (migratie 098): voorstel voor ritten → { voorstellen: [{ stops, afstandKm, reistijdMin, aankomst }], zonderLigging, bron, fout }.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "voorstellen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Voorstel"
                      }
                    },
                    "zonderLigging": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "bron": {
                      "type": "string",
                      "enum": [
                        "schatting",
                        "osrm",
                        "openrouteservice"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "voorstellen",
                    "zonderLigging",
                    "bron",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/{id}": {
      "get": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "getRittenId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rit"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Rit niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Rit niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "put": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "putRittenId",
        "summary": "Andere bestellingen of volgorde, of ander wisselgeld (voor vertrek): { bestellingIds, wisselgeld?",
        "description": "Andere bestellingen of volgorde, of ander wisselgeld (voor vertrek): { bestellingIds, wisselgeld? }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rit": {
                      "$ref": "#/components/schemas/Rit"
                    }
                  },
                  "required": [
                    "rit"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "delete": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "deleteRittenId",
        "summary": "Rit opheffen (alleen voor vertrek)",
        "description": "Rit opheffen (alleen voor vertrek).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/{id}/afrekenen": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postRittenIdAfrekenen",
        "summary": "Kasafdracht: { stops: [{ bestellingId, betaling: 'contant' | 'pin' | 'vooraf' | 'terug' }], geteld } → { ri…",
        "description": "Kasafdracht: { stops: [{ bestellingId, betaling: 'contant' | 'pin' | 'vooraf' | 'terug' }], geteld } → { rit }.\n\n**Toegang:** Controleert daarnaast: `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rit": {
                      "$ref": "#/components/schemas/Rit"
                    },
                    "printFout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "rit"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/{id}/bezorgd": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postRittenIdBezorgd",
        "summary": "Eén bestelling bezorgd (vanaf de kassa): { bestellingId, betaling: 'contant' | 'pin' | 'vooraf' }",
        "description": "Eén bestelling bezorgd (vanaf de kassa): { bestellingId, betaling: 'contant' | 'pin' | 'vooraf' }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Rit"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/{id}/link": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postRittenIdLink",
        "summary": "Nieuwe link (QR-code) voor de telefoon van de bezorger: { link }",
        "description": "Nieuwe link (QR-code) voor de telefoon van de bezorger: { link }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "link"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/{id}/vertrek": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postRittenIdVertrek",
        "summary": "Vertrekken: wisselgeld uit de lade, \"onderweg\" naar de klanten → { rit, berichten }",
        "description": "Vertrekken: wisselgeld uit de lade, \"onderweg\" naar de klanten → { rit, berichten }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rit": {
                      "$ref": "#/components/schemas/Rit"
                    },
                    "berichten": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "rit",
                    "berichten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/ritten/{id}/volgorde": {
      "post": {
        "tags": [
          "Eigen bezorgers"
        ],
        "operationId": "postRittenIdVolgorde",
        "summary": "Ritplanning: de beste volgorde voor een rit die nog niet vertrokken is → { volgorde, afstandKm, reistijdMin…",
        "description": "Ritplanning: de beste volgorde voor een rit die nog niet vertrokken is → { volgorde, afstandKm, reistijdMin, bron }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "volgorde": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "afstandKm": {
                      "type": "number"
                    },
                    "reistijdMin": {
                      "type": "number"
                    },
                    "bron": {
                      "type": "string",
                      "enum": [
                        "schatting",
                        "osrm",
                        "openrouteservice"
                      ]
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "volgorde",
                    "afstandKm",
                    "reistijdMin",
                    "bron",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/scanner": {
      "get": {
        "tags": [
          "scanner"
        ],
        "operationId": "getScanner",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ScannerInstelling"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/scanner/herken": {
      "post": {
        "tags": [
          "scanner"
        ],
        "operationId": "postScannerHerken",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "product"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "artikelId": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "artikelId",
                        "naam"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "kortingscode"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "omschrijving": {
                          "type": "string",
                          "nullable": true
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "omschrijving"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "klant"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "klantId": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "klantId",
                        "naam"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "cadeaubon"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "saldo": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "soort",
                        "code",
                        "saldo"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "soort": {
                          "type": "string",
                          "enum": [
                            "onbekend"
                          ]
                        },
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "soort",
                        "code"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Lege scan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Lege scan."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "De scanner staat uit (Instellingen → Scanner).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De scanner staat uit (Instellingen → Scanner)."
                }
              }
            }
          },
          "429": {
            "description": "Te veel scans achter elkaar. Wacht een minuut.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Te veel scans achter elkaar. Wacht een minuut."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/schermadres": {
      "get": {
        "tags": [
          "Tweede scherm"
        ],
        "operationId": "getSchermadres",
        "summary": "{ adressen: ['http://192.168.1.20:3000', …] }: hier opent een tablet in hetzelfde netwerk de schermen",
        "description": "{ adressen: ['http://192.168.1.20:3000', …] }: hier opent een tablet in hetzelfde netwerk de schermen.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "adressen": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "adressen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/sessie": {
      "get": {
        "tags": [
          "Aanmelden"
        ],
        "operationId": "getSessie",
        "summary": "Nog aangemeld?",
        "description": "Nog aangemeld? Zelfde gegevens als bij aanmelden, zonder nieuw token. De\nkassa gebruikt dit na het wisselen van taal (de pagina laadt dan opnieuw).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gebruiker": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        },
                        "rol": {
                          "type": "string",
                          "enum": [
                            "bediening",
                            "manager",
                            "beheerder"
                          ]
                        },
                        "taal": {
                          "type": "string",
                          "enum": [
                            "id",
                            "nl",
                            "am",
                            "ar",
                            "ary",
                            "ary_latn",
                            "bg",
                            "ckb",
                            "cs",
                            "de",
                            "en",
                            "es",
                            "fa",
                            "fr",
                            "hi",
                            "hr",
                            "hu",
                            "it",
                            "ku",
                            "lt",
                            "lv",
                            "pap",
                            "pl",
                            "prs",
                            "ps",
                            "pt",
                            "rif",
                            "ro",
                            "ru",
                            "sk",
                            "so",
                            "sq",
                            "sr",
                            "srn",
                            "syr",
                            "ti",
                            "tr",
                            "uk",
                            "ur",
                            "vi",
                            "zgh",
                            "zh"
                          ],
                          "nullable": true
                        }
                      },
                      "required": [
                        "id",
                        "naam",
                        "rol",
                        "taal"
                      ]
                    },
                    "vestiging": {
                      "$ref": "#/components/schemas/Vestiging"
                    },
                    "fiscaalVerplicht": {
                      "type": "boolean"
                    },
                    "rechten": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "gebruiker",
                    "vestiging",
                    "fiscaalVerplicht",
                    "rechten"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/signalering": {
      "get": {
        "tags": [
          "Signalering"
        ],
        "operationId": "getSignalering",
        "description": "**Toegang:** Controleert daarnaast: `logboek` (Logboek bekijken).",
        "parameters": [
          {
            "name": "dagen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SignaalRegel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/signalering/stand": {
      "get": {
        "tags": [
          "Signalering"
        ],
        "operationId": "getSignaleringStand",
        "summary": "Voor de knop in de bovenbalk: aan, en het aantal open signalen",
        "description": "Voor de knop in de bovenbalk: aan, en het aantal open signalen.\n\n**Toegang:** Controleert daarnaast: `logboek` (Logboek bekijken).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "open": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "aan",
                    "open"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/signalering/{id}/afgehandeld": {
      "post": {
        "tags": [
          "Signalering"
        ],
        "operationId": "postSignaleringIdAfgehandeld",
        "description": "**Toegang:** Controleert daarnaast: `logboek` (Logboek bekijken).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notitie": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "tags": [
          "Pinnen"
        ],
        "operationId": "getStatus",
        "summary": "Heeft de kassaserver internet (nodig voor pinnen via de API)?",
        "description": "Heeft de kassaserver internet (nodig voor pinnen via de API)? Alleen\nrelevant als de pinkoppeling aan staat; testmodus heeft geen internet nodig.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pinKoppeling": {
                      "type": "boolean"
                    },
                    "internet": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "pinKoppeling",
                    "internet"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tablets": {
      "get": {
        "tags": [
          "Tablets"
        ],
        "operationId": "getTablets",
        "summary": "De gekoppelde tablets voor de knoppen \"Naar …\": { aan, tablets: [{ id, naam, online, scherm }] }",
        "description": "De gekoppelde tablets voor de knoppen \"Naar …\": { aan, tablets: [{ id, naam, online, scherm }] }.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "tablets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TabletRij"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "tablets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tablets/koppelen": {
      "post": {
        "tags": [
          "Tablets"
        ],
        "operationId": "postTabletsKoppelen",
        "summary": "Deze tablet koppelen: { naam } → { id, naam, sleutel } (de sleutel bewaart de tablet zelf)",
        "description": "Deze tablet koppelen: { naam } → { id, naam, sleutel } (de sleutel bewaart de tablet zelf).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "sleutel": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "naam",
                    "sleutel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tablets/{id}/ontkoppelen": {
      "post": {
        "tags": [
          "Tablets"
        ],
        "operationId": "postTabletsIdOntkoppelen",
        "summary": "Op de tablet: deze tablet ontkoppelen ({ sleutel })",
        "description": "Op de tablet: deze tablet ontkoppelen ({ sleutel }).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tablets/{id}/sluiten": {
      "post": {
        "tags": [
          "Tablets"
        ],
        "operationId": "postTabletsIdSluiten",
        "summary": "Op de tablet: terug naar wachten ({ sleutel })",
        "description": "Op de tablet: terug naar wachten ({ sleutel }).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tablets/{id}/stand": {
      "post": {
        "tags": [
          "Tablets"
        ],
        "operationId": "postTabletsIdStand",
        "summary": "De tablet vraagt wat hij moet tonen: { sleutel } → { naam, scherm, bron, versie }",
        "description": "De tablet vraagt wat hij moet tonen: { sleutel } → { naam, scherm, bron, versie }.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "naam": {
                      "type": "string"
                    },
                    "scherm": {
                      "type": "string",
                      "enum": [
                        "muziek",
                        "camera"
                      ],
                      "nullable": true
                    },
                    "bron": {
                      "type": "string",
                      "nullable": true
                    },
                    "versie": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "naam",
                    "scherm",
                    "bron",
                    "versie"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tablets/{id}/sturen": {
      "post": {
        "tags": [
          "Tablets"
        ],
        "operationId": "postTabletsIdSturen",
        "summary": "Vanaf de kassa: { scherm: 'muziek' | 'camera' | null, bron } naar de tablet sturen",
        "description": "Vanaf de kassa: { scherm: 'muziek' | 'camera' | null, bron } naar de tablet sturen.\n\n**Toegang:** Controleert daarnaast: `camera_bekijken`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "naam": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "naam"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Muziek bedienen staat uit (Instellingen → Zaak → Schermen en bediening).\n- Camerabeelden staan uit (Instellingen → Zaak → Schermen en bediening).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Muziek bedienen staat uit (Instellingen → Zaak → Schermen en bediening)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tafels": {
      "get": {
        "tags": [
          "Catalogus"
        ],
        "operationId": "getTafels",
        "summary": "Tafelplattegrond met daarop welke tafels bezet zijn en voor hoeveel",
        "description": "Tafelplattegrond met daarop welke tafels bezet zijn en voor hoeveel.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "tafels": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "id": {
                        "type": "string"
                      },
                      "naam": {
                        "type": "string"
                      },
                      "volgorde": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "tafels",
                      "id",
                      "naam",
                      "volgorde"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tafels/{tafelId}/bestelling": {
      "get": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "getTafelsTafelIdBestelling",
        "parameters": [
          {
            "name": "tafelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Bestelling"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tafels/{tafelId}/bestellingen": {
      "get": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "getTafelsTafelIdBestellingen",
        "summary": "Alle open groepen (rekeningen) aan een tafel",
        "description": "Alle open groepen (rekeningen) aan een tafel.",
        "parameters": [
          {
            "name": "tafelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TafelGroep"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tafels/{tafelId}/verplaats": {
      "post": {
        "tags": [
          "Bestellingen"
        ],
        "operationId": "postTafelsTafelIdVerplaats",
        "summary": "Hele tafel verplaatsen: alle open groepen (rekeningen) van deze tafel naar een andere tafel, bv",
        "description": "Hele tafel verplaatsen: alle open groepen (rekeningen) van deze tafel\nnaar een andere tafel, bv. van binnen naar het terras. Is de andere\ntafel bezet, dan komen de groepen erbij (samenvoegen; elke groep houdt\nzijn eigen rekening).",
        "parameters": [
          {
            "name": "tafelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "naar": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "naar": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "naam": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "naam"
                      ]
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "samengevoegd": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "naar",
                    "aantal",
                    "samengevoegd"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een andere tafel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een andere tafel."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Die tafel bestaat niet (meer).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Die tafel bestaat niet (meer)."
                }
              }
            }
          },
          "409": {
            "description": "Aan deze tafel staat niets open.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Aan deze tafel staat niets open."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/afkeuren": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postTapAfkeuren",
        "summary": "{ tapIds: [...], reden: spoelen|breuk|proeven|personeel|gratis|overig, toelichting?",
        "description": "{ tapIds: [...], reden: spoelen|breuk|proeven|personeel|gratis|overig, toelichting? }\n\n**Toegang:** Vereist recht `storno` (Regels schrappen na bestellen (storno)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taps": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapRij"
                      }
                    },
                    "afgekeurd": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "taps",
                    "afgekeurd"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Je rol heeft geen recht op: regels schrappen na bestellen (storno). Vraag een beheerder.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Je rol heeft geen recht op: regels schrappen na bestellen (storno). Vraag een beheerder."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/boeken": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postTapBoeken",
        "summary": "{ tapIds: [...], bestellingId }: taps op deze bestelling zetten",
        "description": "{ tapIds: [...], bestellingId }: taps op deze bestelling zetten.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taps": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapRij"
                      }
                    },
                    "geboekt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "taps",
                    "geboekt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/bron/{id}/taps": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postTapBronIdTaps",
        "summary": "Taps melden: één tap, een lijst of { taps: [...] } (hooguit 500)",
        "description": "Taps melden: één tap, een lijst of { taps: [...] } (hooguit 500). Per tap: kraan (of tap/plu),\nml (of cl/liter/volume+eenheid) of porties, id (voorkomt dubbel boeken), tijdstip, tafel, bediening.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fouten": {
                      "type": "number"
                    },
                    "ontvangen": {
                      "type": "number"
                    },
                    "geboekt": {
                      "type": "number"
                    },
                    "dubbel": {
                      "type": "number"
                    },
                    "onbekend": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "fouten",
                    "ontvangen",
                    "geboekt",
                    "dubbel",
                    "onbekend"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Geen taps gevonden (verwacht JSON met kraan en ml, of een lijst daarvan).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geen taps gevonden (verwacht JSON met kraan en ml, of een lijst daarvan)."
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekende bron of verkeerde sleutel.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende bron of verkeerde sleutel."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/bron/{id}/verkopen": {
      "get": {
        "tags": [
          "tap"
        ],
        "operationId": "getTapBronIdVerkopen",
        "summary": "Verkopen voor analysesystemen (BarTrack, Dashbar ...): ?van&tot (JJJJ-MM-DD), hooguit 366 dagen",
        "description": "Verkopen voor analysesystemen (BarTrack, Dashbar ...): ?van&tot (JJJJ-MM-DD), hooguit 366 dagen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "van",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "verkopen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": {}
                      }
                    }
                  },
                  "required": [
                    "verkopen"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Kies een geldige periode (van en tot, hooguit een jaar).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Kies een geldige periode (van en tot, hooguit een jaar)."
                }
              }
            }
          },
          "401": {
            "description": "Mogelijke meldingen:\n- Onbekende bron of verkeerde sleutel.\n- Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende bron of verkeerde sleutel."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/kegboard/{id}": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postTapKegboardId",
        "summary": "Kegboard event protocol v1: { v: 1, device, boot_id, sent_uptime_ms, events: [...] }",
        "description": "Kegboard event protocol v1: { v: 1, device, boot_id, sent_uptime_ms, events: [...] }.\nZonder geldige sleutel 401 met { pairing: { state } }; met sleutel { commands: [...] }.\nTapsysteem uit: 503 (het bord bewaart de berichten en probeert het later opnieuw).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/open": {
      "get": {
        "tags": [
          "tap"
        ],
        "operationId": "getTapOpen",
        "summary": "Taps die nog niet op een bon staan",
        "description": "Taps die nog niet op een bon staan.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taps": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapRij"
                      }
                    }
                  },
                  "required": [
                    "taps"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/vrijgaven": {
      "get": {
        "tags": [
          "tap"
        ],
        "operationId": "getTapVrijgaven",
        "summary": "Gedoseerd tappen: vrijgaven die lopen en die van het laatste uur",
        "description": "Gedoseerd tappen: vrijgaven die lopen en die van het laatste uur.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vrijgaven": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapVrijgave"
                      }
                    }
                  },
                  "required": [
                    "vrijgaven"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/vrijgaven/{id}/opnieuw": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postTapVrijgavenIdOpnieuw",
        "summary": "Opnieuw vrijgeven: alleen als er nog niets getapt is",
        "description": "Opnieuw vrijgeven: alleen als er nog niets getapt is.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vrijgaven": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapVrijgave"
                      }
                    }
                  },
                  "required": [
                    "vrijgaven"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tap/vrijgaven/{id}/stoppen": {
      "post": {
        "tags": [
          "tap"
        ],
        "operationId": "postTapVrijgavenIdStoppen",
        "summary": "Kraan weer dicht (bv",
        "description": "Kraan weer dicht (bv. vergist).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vrijgaven": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TapVrijgave"
                      }
                    }
                  },
                  "required": [
                    "vrijgaven"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tegoed": {
      "get": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "getTegoed",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        },
                        "terugbetalen": {
                          "type": "boolean"
                        },
                        "max": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "aan",
                        "terugbetalen",
                        "max"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "aan"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/tegoed/terugbetalen": {
      "post": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "postTegoedTerugbetalen",
        "description": "**Toegang:** Controleert daarnaast: `kassalade` (Kassalade beheren (geld in/uit, lade openen, startgeld)).",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {},
                  "bedrag": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "saldo": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "code",
                    "bedrag",
                    "saldo"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telaat": {
      "get": {
        "tags": [
          "Te laat"
        ],
        "operationId": "getTelaat",
        "summary": "Te late bestellingen van de afgelopen 24 uur (open eerst), en wat er kan (excuus, tegoedbon)",
        "description": "Te late bestellingen van de afgelopen 24 uur (open eerst), en wat er kan (excuus, tegoedbon).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "bericht": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "automatisch",
                        "vragen"
                      ]
                    },
                    "tegoed": {
                      "type": "boolean"
                    },
                    "meldingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeLaatMelding"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "bericht",
                    "tegoed",
                    "meldingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telaat/{id}/afgehandeld": {
      "post": {
        "tags": [
          "Te laat"
        ],
        "operationId": "postTelaatIdAfgehandeld",
        "summary": "Afgehandeld: weg uit de open meldingen",
        "description": "Afgehandeld: weg uit de open meldingen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "bericht": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "automatisch",
                        "vragen"
                      ]
                    },
                    "tegoed": {
                      "type": "boolean"
                    },
                    "meldingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeLaatMelding"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "bericht",
                    "tegoed",
                    "meldingen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telaat/{id}/excuus": {
      "post": {
        "tags": [
          "Te laat"
        ],
        "operationId": "postTelaatIdExcuus",
        "summary": "Excuus naar de klant (sms en/of e-mail), met de tegoedbon als die is ingesteld",
        "description": "Excuus naar de klant (sms en/of e-mail), met de tegoedbon als die is ingesteld.\n\n**Toegang:** Controleert daarnaast: `korting` (Korting geven).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "bericht": {
                      "type": "string",
                      "enum": [
                        "uit",
                        "automatisch",
                        "vragen"
                      ]
                    },
                    "tegoed": {
                      "type": "boolean"
                    },
                    "meldingen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeLaatMelding"
                      }
                    },
                    "via": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "sms",
                          "email"
                        ]
                      }
                    },
                    "code": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "aan",
                    "bericht",
                    "tegoed",
                    "meldingen",
                    "via",
                    "code"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "403": {
            "description": "Geen recht.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telefonie/oproep": {
      "get": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "getTelefonieOproep",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "postTelefonieOproep",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telefonie/oproep/{id}": {
      "get": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "getTelefonieOproepId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telefonie/oproep/{id}/afgehandeld": {
      "post": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "postTelefonieOproepIdAfgehandeld",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bestellingId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telefonie/oproepen": {
      "get": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "getTelefonieOproepen",
        "parameters": [
          {
            "name": "uren",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "oproepen": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OproepRegel"
                      }
                    }
                  },
                  "required": [
                    "aan",
                    "oproepen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telefonie/stand": {
      "get": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "getTelefonieStand",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "melding": {
                      "type": "boolean"
                    },
                    "zoeken": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "melding",
                    "zoeken"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/telefonie/zoek": {
      "get": {
        "tags": [
          "Telefonie"
        ],
        "operationId": "getTelefonieZoek",
        "parameters": [
          {
            "name": "nummer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "beller": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Beller"
                        }
                      ],
                      "nullable": true
                    }
                  },
                  "required": [
                    "beller"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Opzoeken op telefoonnummer staat uit (Instellingen → Telefonie).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Opzoeken op telefoonnummer staat uit (Instellingen → Telefonie)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/thefork/orders/{id}/koppel": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postTheforkOrdersIdKoppel",
        "summary": "Een gast van TheFork aan een tafel (opent de tafel) of aan een bestaande bestelling koppelen; null = loskop…",
        "description": "Een gast van TheFork aan een tafel (opent de tafel) of aan een bestaande bestelling koppelen; null = loskoppelen.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bestellingId": {},
                  "tafelId": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/thefork/orders/{id}/rekening": {
      "post": {
        "tags": [
          "Bezorgplatforms en TheFork"
        ],
        "operationId": "postTheforkOrdersIdRekening",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "required": [
                    "ok",
                    "fout"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Deze reservering is nog niet aan een bestelling gekoppeld.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze reservering is nog niet aan een bestelling gekoppeld."
                }
              }
            }
          },
          "409": {
            "description": "De bestelling is nog niet afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De bestelling is nog niet afgerekend."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/thuisbezorgd/bestellingen": {
      "get": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "getThuisbezorgdBestellingen",
        "parameters": [
          {
            "name": "dagen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TbOverzicht"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/thuisbezorgd/bestellingen/{id}/afronden": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postThuisbezorgdBestellingenIdAfronden",
        "summary": "Online betaald bij Thuisbezorgd: afrekenen als \"online\" voor het openstaande bedrag (bon in het journaal, z…",
        "description": "Online betaald bij Thuisbezorgd: afrekenen als \"online\" voor het openstaande\nbedrag (bon in het journaal, zoals elke verkoop). Contant bij de deur: gewoon\nafrekenen via de bestelling.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AfrekenResultaat"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is geannuleerd.\n- Deze bestelling wordt bij de deur betaald: reken af via de bestelling (contant of pin).\n- Deze bestelling is al afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is geannuleerd."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/thuisbezorgd/bestellingen/{id}/status": {
      "post": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "postThuisbezorgdBestellingenIdStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Onbekende status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende status."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden of geannuleerd.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden of geannuleerd."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/thuisbezorgd/status": {
      "get": {
        "tags": [
          "Thuisbezorgd"
        ],
        "operationId": "getThuisbezorgdStatus",
        "summary": "Stand van de koppeling (voor de knop in de bovenbalk en Instellingen → Zaak)",
        "description": "Stand van de koppeling (voor de knop in de bovenbalk en Instellingen → Zaak).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "portaal": {
                      "type": "boolean"
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "laatstOpgehaald": {
                      "type": "string",
                      "nullable": true
                    },
                    "koppeling": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Koppeling"
                        }
                      ],
                      "nullable": true
                    },
                    "lopend": {
                      "type": "number"
                    },
                    "aan": {
                      "type": "boolean"
                    },
                    "menuAuto": {
                      "type": "boolean"
                    },
                    "werkbon": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "portaal",
                    "verbonden",
                    "fout",
                    "laatstOpgehaald",
                    "koppeling",
                    "lopend",
                    "aan",
                    "menuAuto",
                    "werkbon"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/valuta": {
      "get": {
        "tags": [
          "valutategoed"
        ],
        "operationId": "getValuta",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        }
                      },
                      "required": [
                        "aan"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "aan": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "valuta": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "koers": {
                                "type": "number"
                              },
                              "teken": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "koers",
                              "teken"
                            ]
                          }
                        }
                      },
                      "required": [
                        "aan",
                        "valuta"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/vinify": {
      "get": {
        "tags": [
          "Vinify"
        ],
        "operationId": "getVinify",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "api": {
                      "type": "string"
                    },
                    "version": {
                      "type": "number"
                    },
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "name",
                    "api",
                    "version",
                    "endpoints"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/vinify/articles": {
      "get": {
        "tags": [
          "Vinify"
        ],
        "operationId": "getVinifyArticles",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VinifyArtikel"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Vinify"
        ],
        "operationId": "postVinifyArticles",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/vinify/articles/{id}": {
      "get": {
        "tags": [
          "Vinify"
        ],
        "operationId": "getVinifyArticlesId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VinifyArtikel"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Wijn niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Wijn niet gevonden."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "patch": {
        "tags": [
          "Vinify"
        ],
        "operationId": "patchVinifyArticlesId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/vinify/groups": {
      "get": {
        "tags": [
          "Vinify"
        ],
        "operationId": "getVinifyGroups",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "wine": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "wine"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Vinify"
        ],
        "operationId": "postVinifyGroups",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/vinify/token": {
      "post": {
        "tags": [
          "Vinify"
        ],
        "operationId": "postVinifyToken",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/vinify/transactions": {
      "get": {
        "tags": [
          "Vinify"
        ],
        "operationId": "getVinifyTransactions",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VinifyTransactie"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/voorschotten/{bon}": {
      "get": {
        "tags": [
          "voorschot"
        ],
        "operationId": "getVoorschottenBon",
        "parameters": [
          {
            "name": "bon",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bon": {
                      "type": "number"
                    },
                    "regels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "naam": {
                            "type": "string"
                          },
                          "aantal": {
                            "type": "number"
                          },
                          "verrekend": {
                            "type": "number"
                          },
                          "prijsIncl": {
                            "type": "number"
                          },
                          "btwCode": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "naam",
                          "aantal",
                          "verrekend",
                          "prijsIncl",
                          "btwCode"
                        ]
                      }
                    },
                    "open": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "bon",
                    "regels",
                    "open"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/wachtlijst": {
      "get": {
        "tags": [
          "Wachtlijst"
        ],
        "operationId": "getWachtlijst",
        "summary": "Wie er nu wacht (op volgorde van aanmelden), plus wie vandaag al geplaatst of weg is",
        "description": "Wie er nu wacht (op volgorde van aanmelden), plus wie vandaag al geplaatst of weg is.",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Wachtende"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      },
      "post": {
        "tags": [
          "Wachtlijst"
        ],
        "operationId": "postWachtlijst",
        "summary": "Op de wachtlijst zetten",
        "description": "Op de wachtlijst zetten.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WachtendeInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Wachtende"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/wachtlijst/{id}": {
      "put": {
        "tags": [
          "Wachtlijst"
        ],
        "operationId": "putWachtlijstId",
        "summary": "Gegevens wijzigen (naam, telefoon, personen, wens, wachttijd)",
        "description": "Gegevens wijzigen (naam, telefoon, personen, wens, wachttijd).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WachtendeInvoer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Wachtende"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Ongeldige invoer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/wachtlijst/{id}/oproepen": {
      "post": {
        "tags": [
          "Wachtlijst"
        ],
        "operationId": "postWachtlijstIdOproepen",
        "summary": "Oproepen: er is een tafel vrij",
        "description": "Oproepen: er is een tafel vrij. Stuurt een sms (als er een telefoonnummer is\nen CM_TOKEN in .env staat), tenzij sms: false. Nog een keer oproepen = nog een sms.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tafelId": {
                    "type": "string",
                    "nullable": true
                  },
                  "sms": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sms": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok"
                      ]
                    },
                    "id": {
                      "type": "string"
                    },
                    "naam": {
                      "type": "string"
                    },
                    "telefoon": {
                      "type": "string",
                      "nullable": true
                    },
                    "personen": {
                      "type": "number"
                    },
                    "wens": {
                      "type": "string",
                      "nullable": true,
                      "description": "bv. terras, kinderstoel"
                    },
                    "wachttijdMin": {
                      "type": "number",
                      "nullable": true,
                      "description": "genoemde verwachte wachttijd (minuten)"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "wacht",
                        "opgeroepen",
                        "geplaatst",
                        "weg"
                      ]
                    },
                    "aangemeldOp": {
                      "type": "string"
                    },
                    "opgeroepenOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "smsStatus": {
                      "type": "string",
                      "nullable": true,
                      "description": "'verstuurd' of de foutmelding van de laatste sms"
                    },
                    "smsOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "geplaatstOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "tafelId": {
                      "type": "string",
                      "nullable": true
                    },
                    "tafelNaam": {
                      "type": "string",
                      "nullable": true
                    },
                    "bestellingId": {
                      "type": "string",
                      "nullable": true
                    },
                    "wachtMin": {
                      "type": "number",
                      "description": "hoe lang (minuten) aan het wachten, of hoe lang gewacht tot geplaatst/weg"
                    },
                    "bron": {
                      "type": "string",
                      "enum": [
                        "webshop",
                        "kassa"
                      ],
                      "description": "aangemeld aan de deur (kassa) of online via de webshop (migratie 108)"
                    }
                  },
                  "required": [
                    "id",
                    "naam",
                    "telefoon",
                    "personen",
                    "wens",
                    "wachttijdMin",
                    "status",
                    "aangemeldOp",
                    "opgeroepenOp",
                    "smsStatus",
                    "smsOp",
                    "geplaatstOp",
                    "tafelId",
                    "tafelNaam",
                    "bestellingId",
                    "wachtMin",
                    "bron"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Onbekende tafel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende tafel."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Deze gast staat niet (meer) te wachten.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze gast staat niet (meer) te wachten."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/wachtlijst/{id}/status": {
      "post": {
        "tags": [
          "Wachtlijst"
        ],
        "operationId": "postWachtlijstIdStatus",
        "summary": "Status: geplaatst (met de geopende bestelling en tafel), weg, of terug naar wacht",
        "description": "Status: geplaatst (met de geopende bestelling en tafel), weg, of terug naar wacht.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "bestellingId": {
                    "type": "string"
                  },
                  "tafelId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Wachtende"
                    }
                  ],
                  "nullable": true
                }
              }
            }
          },
          "400": {
            "description": "Onbekende status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende status."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "409": {
            "description": "Kan nu niet (conflict met de huidige toestand).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/webshop/bestellingen": {
      "get": {
        "tags": [
          "webshop"
        ],
        "operationId": "getWebshopBestellingen",
        "parameters": [
          {
            "name": "dagen",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WsOverzicht"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/webshop/bestellingen/{id}/afronden": {
      "post": {
        "tags": [
          "webshop"
        ],
        "operationId": "postWebshopBestellingenIdAfronden",
        "summary": "Online betaald in de webshop: afrekenen als \"online\" voor het openstaande bedrag, met de fooi van de gast (…",
        "description": "Online betaald in de webshop: afrekenen als \"online\" voor het openstaande\nbedrag, met de fooi van de gast (bon in het journaal, zoals elke verkoop).\nOp rekening besteld (migratie 108): afrekenen op rekening, met meteen de factuur (of als post bij een klant met\nverzamelfactuur, migratie 132).\nOp de kamer besteld (migratie 133, hotelkoppeling): afrekenen op de kamer en de bon op de hotelrekening.\nContant of pin bij afhalen/bezorgen: gewoon afrekenen via de bestelling.\nBelgië (GKS 2.0): fooi, op rekening en op de kamer alleen als ze getest zijn (zoals aan de kassa).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "opKamer": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "handmatig": {
                                  "type": "boolean"
                                },
                                "kamer": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "geboekt": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "handmatig",
                                "kamer",
                                "naam",
                                "geboekt"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kamer": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "geboekt": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "kamer",
                                "naam",
                                "geboekt"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "fout": {
                                  "type": "string"
                                },
                                "kamer": {
                                  "type": "string"
                                },
                                "naam": {
                                  "type": "string"
                                },
                                "geboekt": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "fout",
                                "kamer",
                                "naam",
                                "geboekt"
                              ]
                            }
                          ]
                        },
                        "ok": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string"
                        },
                        "bestelling": {
                          "$ref": "#/components/schemas/Bestelling"
                        },
                        "ticketNummer": {
                          "type": "number"
                        },
                        "bonRegels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "bonTekst": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
                        },
                        "printFout": {
                          "type": "string"
                        },
                        "cadeaubonnen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "waarde": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "code",
                              "waarde"
                            ]
                          },
                          "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
                        },
                        "mail": {
                          "type": "object",
                          "properties": {
                            "verstuurd": {
                              "type": "boolean"
                            },
                            "fout": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "verstuurd"
                          ],
                          "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
                        }
                      },
                      "required": [
                        "opKamer",
                        "ok"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "opRekening": {
                          "type": "object",
                          "properties": {
                            "fout": {
                              "type": "string"
                            },
                            "verstuurd": {
                              "type": "boolean"
                            },
                            "post": {
                              "$ref": "#/components/schemas/RekeningPost"
                            },
                            "factuur": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "nummer": {
                                  "type": "string"
                                },
                                "openstaand": {
                                  "type": "number"
                                },
                                "vervaldatum": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "id",
                                "nummer",
                                "openstaand",
                                "vervaldatum"
                              ]
                            }
                          },
                          "required": [
                            "verstuurd"
                          ]
                        },
                        "ok": {
                          "type": "boolean"
                        },
                        "fout": {
                          "type": "string"
                        },
                        "bestelling": {
                          "$ref": "#/components/schemas/Bestelling"
                        },
                        "ticketNummer": {
                          "type": "number"
                        },
                        "bonRegels": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "bonTekst": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
                        },
                        "printFout": {
                          "type": "string"
                        },
                        "cadeaubonnen": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "waarde": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "code",
                              "waarde"
                            ]
                          },
                          "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
                        },
                        "mail": {
                          "type": "object",
                          "properties": {
                            "verstuurd": {
                              "type": "boolean"
                            },
                            "fout": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "verstuurd"
                          ],
                          "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
                        }
                      },
                      "required": [
                        "opRekening",
                        "ok"
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/AfrekenResultaat"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden."
                }
              }
            }
          },
          "409": {
            "description": "Mogelijke meldingen:\n- Deze bestelling is geannuleerd.\n- Deze bestelling wordt bij afhalen of bezorgen betaald: reken af via de bestelling (contant of pin).\n- Deze bestelling is al afgerekend.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Deze bestelling is geannuleerd."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/webshop/bestellingen/{id}/annuleren": {
      "post": {
        "tags": [
          "webshop"
        ],
        "operationId": "postWebshopBestellingenIdAnnuleren",
        "summary": "Annuleren door de zaak (bv",
        "description": "Annuleren door de zaak (bv. product op): de regels vervallen, online betaald = de webshop betaalt terug.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reden": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "Niet gevonden of al afgerekend (dan via een retour).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet gevonden of al afgerekend (dan via een retour)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/webshop/bestellingen/{id}/status": {
      "post": {
        "tags": [
          "webshop"
        ],
        "operationId": "postWebshopBestellingenIdStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Onbekende status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Onbekende status."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "404": {
            "description": "Bestelling niet gevonden of geannuleerd.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Bestelling niet gevonden of geannuleerd."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/webshop/pauze": {
      "post": {
        "tags": [
          "webshop"
        ],
        "operationId": "postWebshopPauze",
        "summary": "Webshop even pauzeren en/of druk melden (migratie 061)",
        "description": "Webshop even pauzeren en/of druk melden (migratie 061). Pauze: de gast kan\nniet bestellen en ziet de tekst. Druk: zoveel minuten extra bij \"zo snel\nmogelijk\" (webshop én bestellingen aan de kassa). Gaat met het menu mee.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aan": {},
                  "tekst": {},
                  "drukteMin": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pauze": {
                      "type": "boolean"
                    },
                    "pauzeTekst": {
                      "type": "string",
                      "nullable": true
                    },
                    "drukteMin": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "pauze",
                    "pauzeTekst",
                    "drukteMin"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Druk: kies 0 tot 240 minuten extra.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Druk: kies 0 tot 240 minuten extra."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "409": {
            "description": "De database is niet bijgewerkt. Draai npm run db:migrate (migratie 061).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "De database is niet bijgewerkt. Draai npm run db:migrate (migratie 061)."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/webshop/status": {
      "get": {
        "tags": [
          "webshop"
        ],
        "operationId": "getWebshopStatus",
        "summary": "Stand van de webshop (voor de knop in de bovenbalk en Instellingen → Zaak)",
        "description": "Stand van de webshop (voor de knop in de bovenbalk en Instellingen → Zaak).",
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aan": {
                      "type": "boolean"
                    },
                    "url": {
                      "type": "string",
                      "nullable": true
                    },
                    "tafels": {
                      "type": "boolean"
                    },
                    "reserveren": {
                      "type": "boolean"
                    },
                    "portaal": {
                      "type": "boolean"
                    },
                    "verbonden": {
                      "type": "boolean"
                    },
                    "fout": {
                      "type": "string",
                      "nullable": true
                    },
                    "laatstOpgehaald": {
                      "type": "string",
                      "nullable": true
                    },
                    "menuOp": {
                      "type": "string",
                      "nullable": true
                    },
                    "lopend": {
                      "type": "number"
                    },
                    "pauze": {
                      "type": "boolean"
                    },
                    "pauzeTekst": {
                      "type": "string",
                      "nullable": true
                    },
                    "drukteMin": {
                      "type": "number"
                    },
                    "werkbon": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "aan",
                    "url",
                    "tafels",
                    "reserveren",
                    "portaal",
                    "verbonden",
                    "fout",
                    "laatstOpgehaald",
                    "menuOp",
                    "lopend",
                    "pauzeTekst",
                    "werkbon"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/weegschaal/aiplugin": {
      "post": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "postWeegschaalAiplugin",
        "summary": "Aclas AI Recognition Plugin: herkennen aan (`resume`, het bestelscherm is open) of uit (`suspend`)",
        "description": "Aclas AI Recognition Plugin: herkennen aan (`resume`, het bestelscherm is open)\nof uit (`suspend`). Alleen voor het scherm op de weegschaal zelf (zelfde\napparaat als de kassaserver) en als er een AI-weegschaal is ingesteld; anders\ngebeurt er niets (`overgeslagen`). ok = false: de plugin antwoordt niet.\nHet bestelscherm stuurt `resume` elke 30 seconden zolang het openstaat; blijft\ndat uit, dan zet de kassaserver de plugin zelf op Suspend.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actie": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "overgeslagen": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok",
                    "overgeslagen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/weegschaal/etiket": {
      "post": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "postWeegschaalEtiket",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EtiketRegel"
                }
              }
            }
          },
          "400": {
            "description": "Geen streepjescode ontvangen.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Geen streepjescode ontvangen."
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    },
    "/api/weegschaal/gewicht": {
      "get": {
        "tags": [
          "Weegschaal"
        ],
        "operationId": "getWeegschaalGewicht",
        "summary": "Gewicht van de OS6X (via de kassaserver)",
        "description": "Gewicht van de OS6X (via de kassaserver). `weegschaal` = naam van de\nweegschaal die dit scherm gebruikt (leeg = de eerste); `artikelId` = tarra\nvan dat product eraf. stabiel = false: het gewicht staat nog niet stil,\neven later opnieuw vragen. Dialog 06: `prijs` (centen per kilo) gaat naar de\nweegschaal en het antwoord heeft `bedrag`, zoals de geijkte weegschaal rekende.",
        "parameters": [
          {
            "name": "weegschaal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "artikelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prijs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gelukt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "weegschaal": {
                      "type": "string"
                    },
                    "gewichtKg": {
                      "type": "number"
                    },
                    "brutoKg": {
                      "type": "number"
                    },
                    "tarraGram": {
                      "type": "number"
                    },
                    "stabiel": {
                      "type": "boolean"
                    },
                    "bedrag": {
                      "type": "number",
                      "description": "Dialog 06: bedrag en kiloprijs zoals de (geijkte) weegschaal ze rekende"
                    },
                    "weegschaalPrijs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "weegschaal",
                    "gewichtKg",
                    "brutoKg",
                    "tarraGram",
                    "stabiel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Niet aangemeld. Voer je pincode opnieuw in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fout"
                },
                "example": {
                  "fout": "Niet aangemeld. Voer je pincode opnieuw in."
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Serverfout"
          },
          "503": {
            "$ref": "#/components/responses/DatabaseOmzetten"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "token": {
        "type": "http",
        "scheme": "bearer",
        "description": "Token uit `POST /api/aanmelden` (pincode van een medewerker)."
      }
    },
    "schemas": {
      "Fout": {
        "type": "object",
        "description": "Elke fout heeft een leesbare melding in `fout` (Nederlands, voor het scherm).",
        "properties": {
          "fout": {
            "type": "string",
            "example": "Bestelling niet gevonden."
          },
          "code": {
            "type": "string",
            "description": "Soms een vaste code, bv. `DATABASE_OMZETTEN`."
          }
        },
        "required": [
          "fout"
        ]
      },
      "ActieRegel": {
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "happyhour",
              "kortingscode",
              "marketing"
            ]
          },
          "naam": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Kortingscode: de code; marketing: het aantal persoonlijke codes dat gebruikt is."
          },
          "bonnen": {
            "type": "number",
            "description": "Zo vaak gebruikt (bonnen); bij een happy hour: zoveel bonnen met minstens één product in de actie."
          },
          "stuks": {
            "type": "number",
            "description": "Happy hour: zoveel stuks tegen de actieprijs."
          },
          "korting": {
            "type": "number",
            "description": "Gegeven korting (centen)."
          },
          "omzet": {
            "type": "number",
            "description": "Omzet van de bonnen (kortingscode) of van de producten in de actie (happy hour), met btw."
          },
          "gemiddeld": {
            "type": "number",
            "description": "Gemiddelde per bon."
          }
        },
        "required": [
          "soort",
          "naam",
          "bonnen",
          "korting",
          "omzet",
          "gemiddeld"
        ]
      },
      "Adres": {
        "type": "object",
        "properties": {
          "straat": {
            "type": "string"
          },
          "huisnummer": {
            "type": "string"
          },
          "postcode": {
            "type": "string"
          },
          "plaats": {
            "type": "string"
          }
        },
        "required": [
          "straat",
          "huisnummer",
          "postcode",
          "plaats"
        ]
      },
      "AfrekenResultaat": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "fout": {
            "type": "string"
          },
          "bestelling": {
            "$ref": "#/components/schemas/Bestelling"
          },
          "ticketNummer": {
            "type": "number"
          },
          "bonRegels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bonTekst": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "de kassabon als tekstregels (alleen met bonTekst in het verzoek)"
          },
          "printFout": {
            "type": "string"
          },
          "cadeaubonnen": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "waarde": {
                  "type": "number"
                }
              },
              "required": [
                "code",
                "waarde"
              ]
            },
            "description": "cadeaubonnen die met deze afrekening actief zijn geworden (migratie 026)"
          },
          "mail": {
            "type": "object",
            "properties": {
              "verstuurd": {
                "type": "boolean"
              },
              "fout": {
                "type": "string"
              }
            },
            "required": [
              "verstuurd"
            ],
            "description": "bon per e-mail: gelukt of de fout (alleen als er een adres was)"
          }
        },
        "required": [
          "ok"
        ]
      },
      "AfwijkingRegels": {
        "type": "object",
        "properties": {
          "weken": {
            "type": "number",
            "description": "zoveel weken terug vergelijken (dezelfde weekdag)"
          },
          "omzet": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "marge": {
                "type": "number"
              },
              "minimum": {
                "type": "number"
              },
              "laag": {
                "type": "boolean"
              },
              "hoog": {
                "type": "boolean"
              }
            },
            "required": [
              "aan",
              "marge",
              "minimum",
              "laag",
              "hoog"
            ],
            "description": "marge in procenten; minimum = omzet die normaal rond deze tijd al gedaan is (centen)"
          },
          "keukentijd": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "marge": {
                "type": "number"
              },
              "maxMinuten": {
                "type": "number"
              },
              "minimumRegels": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "marge",
              "maxMinuten",
              "minimumRegels"
            ],
            "description": "marge in procenten; maxMinuten = altijd melden boven zoveel minuten (0 = niet)"
          },
          "storno": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "marge": {
                "type": "number"
              },
              "minimum": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "marge",
              "minimum"
            ],
            "description": "marge in procenten; minimum = pas melden vanaf zoveel storno's"
          }
        },
        "required": [
          "weken",
          "omzet",
          "keukentijd",
          "storno"
        ]
      },
      "ApicbaseInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "verbinding": {
            "type": "string",
            "enum": [
              "token",
              "inloggen"
            ],
            "description": "hoe verbonden: service-account-token, of inloggen (eigen app of die van Pin Voordeel)"
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "outletId": {
            "type": "string",
            "nullable": true,
            "description": "outlet in Apicbase (id) en de naam ervan"
          },
          "outletNaam": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "description": "location-id in Apicbase voor deze kassa (uniek in de library)"
          },
          "catalogus": {
            "type": "boolean",
            "description": "catalogus sturen (en vanzelf na een wijziging)"
          },
          "verkopen": {
            "type": "boolean",
            "description": "elke afgerekende bon sturen"
          },
          "kostprijzen": {
            "type": "boolean",
            "description": "kostprijs per portie terughalen"
          },
          "prijzenOvernemen": {
            "type": "boolean",
            "description": "verkoopprijs van Apicbase overnemen in de kassa (alleen gekoppelde producten)"
          },
          "foodCostMode": {
            "type": "string",
            "enum": [
              "cheapest",
              "last_ordered",
              "average_stock_value"
            ]
          }
        },
        "required": [
          "aan",
          "verbinding",
          "clientId",
          "outletId",
          "outletNaam",
          "locationId",
          "catalogus",
          "verkopen",
          "kostprijzen",
          "prijzenOvernemen",
          "foodCostMode"
        ]
      },
      "Apparaat": {
        "description": "Merk en model van dit apparaat; ts6x = de kassa draait op een Aclas pc-/AI-weegschaal, aclas = welk model.",
        "type": "object",
        "properties": {
          "merk": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "ts6x": {
            "type": "boolean"
          },
          "aclas": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "merk",
          "model",
          "ts6x",
          "aclas"
        ]
      },
      "ApparaatOpdracht": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "printer": {
            "type": "string",
            "description": "naam van de printer in de kassa"
          },
          "verbinding": {
            "type": "string"
          },
          "adres": {
            "type": "string"
          },
          "data": {
            "type": "string",
            "description": "bytes, base64 (al in de taal van de printer: ESC/POS of Star)"
          }
        },
        "required": [
          "id",
          "printer",
          "verbinding",
          "adres",
          "data"
        ]
      },
      "ArtikelInvoer": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "naamBon": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "groepId": {
            "type": "string"
          },
          "prijsIncl": {
            "type": "number"
          },
          "btwTerPlaatse": {
            "type": "string"
          },
          "btwAfhalen": {
            "type": "string",
            "nullable": true
          },
          "uitverkocht": {
            "type": "boolean"
          },
          "kleur": {
            "type": "string",
            "nullable": true,
            "description": "#rrggbb, of leeg/null = zoals de productgroep"
          },
          "allergenen": {
            "description": "allergeencodes; niet meegestuurd = niet wijzigen (migratie 024)"
          },
          "perKilo": {
            "description": "Weegschaal (migratie 047): prijs per kilo (prijsIncl is dan per kilo), PLU-nummer\r\n(null = geen) en tarra in gram. Niet meegestuurd = niet wijzigen."
          },
          "plu": {},
          "tarraGram": {},
          "openPrijs": {
            "description": "Migratie 129: open prijs (de prijs vul je in bij het aanslaan), voorschot (later te verrekenen) en mag terug\r\n(statiegeld terugnemen met een negatief aantal). Niet meegestuurd = niet wijzigen."
          },
          "voorschot": {},
          "magTerug": {},
          "spv": {
            "description": "Migratie 131: product is een single purpose voucher (SPV, bon voor één bepaald product of menu)."
          },
          "alcohol": {
            "description": "Wettelijk (migratie 072): bevat alcohol (leeftijdscheck), wegwerptoeslag en statiegeld per stuk\r\n(centen), soort voor de btw-assistent. Niet meegestuurd = niet wijzigen."
          },
          "wegwerp": {},
          "statiegeld": {},
          "btwSoort": {},
          "prijsAfhalen": {
            "description": "Leverwijze (migratie 084): eigen prijs bij afhalen en bezorgen (centen; null of leeg = de gewone\r\nprijs) en waar het product niet verkocht wordt. Niet meegestuurd = niet wijzigen."
          },
          "prijsBezorgen": {},
          "nietBij": {}
        }
      },
      "AssistentProduct": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "groep": {
            "type": "string",
            "nullable": true
          },
          "soort": {
            "type": "string",
            "enum": [
              "overig",
              "maaltijd",
              "frisdrank",
              "alcohol",
              "voeding"
            ]
          },
          "opgeslagen": {
            "type": "string",
            "enum": [
              "overig",
              "maaltijd",
              "frisdrank",
              "alcohol",
              "voeding"
            ],
            "nullable": true,
            "description": "soort zoals opgeslagen (null = nog niet bevestigd, dan is soort een gok)"
          },
          "alcohol": {
            "type": "boolean"
          },
          "terPlaatse": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "percentage": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "code",
              "percentage"
            ]
          },
          "afhalen": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "percentage": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "code",
              "percentage"
            ],
            "nullable": true
          },
          "advies": {
            "type": "object",
            "properties": {
              "terPlaatse": {
                "type": "number"
              },
              "afhalen": {
                "type": "number"
              }
            },
            "required": [
              "terPlaatse",
              "afhalen"
            ]
          },
          "anders": {
            "type": "boolean",
            "description": "wijkt het huidige tarief af van het advies?"
          }
        },
        "required": [
          "id",
          "naam",
          "groep",
          "soort",
          "opgeslagen",
          "alcohol",
          "terPlaatse",
          "afhalen",
          "advies",
          "anders"
        ]
      },
      "AyceArrangement": {
        "description": "Eén arrangement van de zaak.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string",
            "description": "bv. \"Vis\", \"Vlees\"; komt op de bon: \"Vis volwassene\""
          },
          "prijsVolwassen": {
            "type": "number",
            "description": "prijs per volwassene, inclusief btw"
          },
          "prijsKind": {
            "type": "number",
            "description": "prijs per kind, inclusief btw (0 = gratis)"
          },
          "btwCode": {
            "type": "string",
            "description": "btw-code van de arrangementsprijs en de toeslag (NL bv. LAAG, BE bv. B)"
          },
          "groepen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "productgroepen die erbij horen (€ 0)"
          },
          "artikelen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "losse producten die erbij horen (€ 0), ook uit andere groepen"
          },
          "minuten": {
            "type": "number",
            "description": "tijdslimiet in minuten vanaf de start; 0 = geen limiet"
          },
          "rondeMax": {
            "type": "number",
            "description": "hooguit zoveel gerechten per persoon per ronde; 0 = onbeperkt"
          },
          "rondeMinuten": {
            "type": "number",
            "description": "minimaal zoveel minuten tussen twee rondes; 0 = geen wachttijd"
          },
          "toeslag": {
            "type": "number",
            "description": "verspillingstoeslag per stuk; 0 = geen"
          }
        },
        "required": [
          "id",
          "naam",
          "prijsVolwassen",
          "prijsKind",
          "btwCode",
          "groepen",
          "artikelen",
          "minuten",
          "rondeMax",
          "rondeMinuten",
          "toeslag"
        ]
      },
      "AyceBestelling": {
        "description": "All-you-can-eat van één bestelling (groep aan tafel); ontbreekt = gewone bestelling.",
        "type": "object",
        "properties": {
          "arrangementen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AyceDeelname"
            }
          }
        },
        "required": [
          "arrangementen"
        ]
      },
      "AyceDeelname": {
        "description": "Deelname van een groep aan tafel aan één arrangement.",
        "type": "object",
        "properties": {
          "arrangementId": {
            "type": "string"
          },
          "naam": {
            "type": "string",
            "description": "naam van het arrangement (zoals bij de start)"
          },
          "volwassenen": {
            "type": "number"
          },
          "kinderen": {
            "type": "number"
          },
          "start": {
            "type": "string",
            "description": "ISO-tijd van de start (tijdslimiet loopt vanaf hier)"
          },
          "laatsteRonde": {
            "type": "string",
            "nullable": true,
            "description": "ISO-tijd van de laatste ronde (laatste keer \"Bestellen\" met gratis gerechten)"
          },
          "rondes": {
            "type": "number",
            "description": "hoeveel rondes er al besteld zijn"
          }
        },
        "required": [
          "arrangementId",
          "naam",
          "volwassenen",
          "kinderen",
          "start",
          "laatsteRonde",
          "rondes"
        ]
      },
      "AyceInstelling": {
        "description": "All-you-can-eat van de zaak.",
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean",
            "description": "all-you-can-eat gebruiken"
          },
          "arrangementen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AyceArrangement"
            },
            "description": "de arrangementen, op volgorde"
          }
        },
        "required": [
          "aan",
          "arrangementen"
        ]
      },
      "BackupBestand": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "gemaaktOp": {
            "type": "string"
          },
          "grootteKb": {
            "type": "number"
          }
        },
        "required": [
          "naam",
          "gemaaktOp",
          "grootteKb"
        ]
      },
      "BankTransactie": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bron": {
            "type": "string",
            "enum": [
              "camt",
              "mt940",
              "coda",
              "enablebanking"
            ]
          },
          "datum": {
            "type": "string"
          },
          "bedrag": {
            "type": "number"
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "iban": {
            "type": "string",
            "nullable": true
          },
          "omschrijving": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "geboekt",
              "genegeerd"
            ]
          },
          "voorstel": {
            "type": "object",
            "properties": {
              "factuurId": {
                "type": "string"
              },
              "nummer": {
                "type": "string"
              },
              "openstaand": {
                "type": "number"
              },
              "klant": {
                "type": "string"
              },
              "reden": {
                "type": "string"
              }
            },
            "required": [
              "factuurId",
              "nummer",
              "openstaand",
              "klant",
              "reden"
            ],
            "nullable": true
          },
          "factuur": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "nummer": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "nummer"
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "bron",
          "datum",
          "bedrag",
          "naam",
          "iban",
          "omschrijving",
          "status",
          "voorstel",
          "factuur"
        ]
      },
      "Beller": {
        "type": "object",
        "properties": {
          "nummer": {
            "type": "string"
          },
          "sleutel": {
            "type": "string"
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "klant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "naam": {
                "type": "string"
              },
              "telefoon": {
                "type": "string",
                "nullable": true
              },
              "email": {
                "type": "string",
                "nullable": true
              },
              "punten": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "naam",
              "telefoon",
              "email",
              "punten"
            ],
            "nullable": true
          },
          "adres": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Adres"
              }
            ],
            "nullable": true
          },
          "adresTekst": {
            "type": "string",
            "nullable": true,
            "description": "adres als tekst (webshop, platform) als het niet in losse velden te splitsen is"
          },
          "bestellingen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EerdereBestelling"
            }
          },
          "aantal": {
            "type": "number"
          },
          "besteed": {
            "type": "number",
            "description": "centen, betaalde bestellingen"
          },
          "reserveringen": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "tijdstip": {
                  "type": "string"
                },
                "personen": {
                  "type": "number"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tijdstip",
                "personen",
                "status"
              ]
            }
          }
        },
        "required": [
          "nummer",
          "sleutel",
          "naam",
          "email",
          "klant",
          "adres",
          "adresTekst",
          "bestellingen",
          "aantal",
          "besteed",
          "reserveringen"
        ]
      },
      "Bestand": {
        "type": "object",
        "properties": {
          "naam": {
            "description": "bestandsnaam: .xlsx = Excel (inhoud als base64), anders CSV-tekst"
          },
          "tekst": {},
          "base64": {}
        }
      },
      "Bestelling": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "tafelId": {
            "type": "string",
            "nullable": true
          },
          "tafelNaam": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "ter_plaatse",
              "afhalen",
              "bezorgen"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "betaald",
              "geannuleerd"
            ]
          },
          "gasten": {
            "type": "number"
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "regels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bestelregel"
            }
          },
          "betalingen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Betaling"
            }
          },
          "totaal": {
            "type": "number"
          },
          "betaald": {
            "type": "number"
          },
          "openstaand": {
            "type": "number"
          },
          "btw": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BtwRegel"
            }
          },
          "geopendOp": {
            "type": "string"
          },
          "groepNummer": {
            "type": "number",
            "description": "Groep aan de tafel: 1, 2, 3 ... (meerdere rekeningen aan één tafel)."
          },
          "groepNaam": {
            "type": "string",
            "nullable": true,
            "description": "Eigen naam van de groep, bv. \"Jansen\"."
          },
          "aantalGroepen": {
            "type": "number",
            "description": "Hoeveel open groepen er nu aan deze tafel zitten (inclusief deze)."
          },
          "apartVan": {
            "type": "string",
            "description": "Apart afrekenen (migratie 131): dit deel komt uit deze rekening (zonder splitsen)."
          },
          "klant": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "naam": {
                "type": "string"
              },
              "punten": {
                "type": "number"
              },
              "gastprofiel": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GastProfiel"
                  }
                ],
                "description": "Gastprofiel (migratie 115; alleen als het aan staat): VIP, dieetwensen/allergieën (codes) en voorkeuren."
              }
            },
            "required": [
              "id",
              "naam",
              "punten"
            ],
            "nullable": true,
            "description": "Klantenkaart: gekoppelde klant (migratie 038)."
          },
          "ayce": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AyceBestelling"
              }
            ],
            "nullable": true,
            "description": "All-you-can-eat voor deze groep (migratie 042); ontbreekt = gewone bestelling."
          },
          "gewenstOp": {
            "type": "string",
            "nullable": true,
            "description": "Gewenste tijd (afhalen/bezorgen met een tijdvak, of webshop; migratie 060)."
          },
          "bezorging": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BezorgGegevens"
              }
            ],
            "nullable": true,
            "description": "Bezorg- of afhaalgegevens van een bestelling uit de kassa (migratie 060)."
          },
          "leeftijd18": {
            "type": "boolean",
            "description": "Leeftijdscheck (migratie 072): afhalen/bezorgen met alcohol en de leeftijdscheck aan: \"18+\" op de bonnen."
          },
          "leeftijdBevestigd": {
            "type": "boolean",
            "description": "De klant bevestigde in de webshop 18 jaar of ouder te zijn (migratie 072)."
          }
        },
        "required": [
          "id",
          "nummer",
          "tafelId",
          "tafelNaam",
          "type",
          "status",
          "gasten",
          "opmerking",
          "regels",
          "betalingen",
          "totaal",
          "betaald",
          "openstaand",
          "btw",
          "geopendOp"
        ]
      },
      "Bestelregel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "artikelId": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string"
          },
          "aantal": {
            "type": "number"
          },
          "prijsIncl": {
            "type": "number"
          },
          "btwPercentage": {
            "type": "number"
          },
          "btwCode": {
            "type": "string"
          },
          "opties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GekozenOptie"
            }
          },
          "gang": {
            "type": "number"
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "nieuw",
              "besteld"
            ]
          },
          "geprintOp": {
            "type": "string",
            "nullable": true
          },
          "afgeroepenOp": {
            "type": "string",
            "nullable": true,
            "description": "Wanneer de keuken deze regel mocht maken. null bij een besteld gerecht\r\nin een latere gang = wacht op \"Afroepen\"."
          },
          "korting": {
            "type": "boolean",
            "description": "Kortingsregel (negatieve prijs, zelfde btw als waar hij op geldt)."
          },
          "kortingVanRegel": {
            "type": "string",
            "nullable": true,
            "description": "Korting op één regel: de id van die regel; null = korting op de hele bon."
          },
          "menuKop": {
            "type": "boolean",
            "description": "Menu: deze regel is de kop van een menu (prijs 0; de onderdelen dragen de prijs)."
          },
          "menuVan": {
            "type": "string",
            "nullable": true,
            "description": "Menu: onderdeel van het menu met deze kopregel."
          },
          "actie": {
            "type": "string",
            "nullable": true,
            "description": "Happy hour waarmee deze prijs is berekend (naam), anders null."
          },
          "spaar": {
            "type": "string",
            "nullable": true,
            "description": "Korting uit sparen (migratie 038): 'punten:<n>' of 'stempel:<artikelId>:<n>'."
          },
          "ayce": {
            "type": "string",
            "enum": [
              "volwassen",
              "kind",
              "toeslag",
              "gratis"
            ],
            "description": "All-you-can-eat (migratie 042): arrangementsprijs, toeslag of gratis gerecht."
          },
          "ayceArrangement": {
            "type": "string",
            "nullable": true,
            "description": "All-you-can-eat (migratie 043): bij welk arrangement deze regel hoort."
          },
          "eenheid": {
            "type": "string",
            "enum": [
              "kg"
            ],
            "nullable": true,
            "description": "Weegschaal (migratie 047): 'kg' = gewogen product, aantal is het gewicht en prijsIncl de prijs per kilo."
          },
          "toeslag": {
            "type": "string",
            "enum": [
              "wegwerp",
              "statiegeld"
            ],
            "nullable": true,
            "description": "Wegwerptoeslag of statiegeld (migratie 072): door de kassa zelf bijgehouden, niet los te wijzigen."
          },
          "afhalen": {
            "type": "boolean",
            "description": "Migratie 129: deze regel wordt meegenomen (afhaal-btw), ook in een bestelling ter plaatse."
          },
          "stoel": {
            "type": "number",
            "nullable": true,
            "description": "Migratie 129: stoelnummer aan de tafel."
          },
          "voorschotVan": {
            "type": "string",
            "nullable": true,
            "description": "Migratie 129: verrekening van het voorschot op deze bon (ticket-id)."
          },
          "magTerug": {
            "type": "boolean",
            "description": "Migratie 129: product dat terug mag (negatief aantal, bv. statiegeld)."
          },
          "kortingProcent": {
            "type": "number",
            "nullable": true,
            "description": "Migratie 131: percentage van een korting (herberekend als er een regel geschrapt wordt)."
          },
          "spv": {
            "type": "boolean",
            "description": "Migratie 131: inwisselen van een single purpose voucher (SPV) als negatieve regel."
          },
          "verbeteringVan": {
            "type": "string",
            "nullable": true,
            "description": "Migratie 131: verbetering van de prijs op deze bon (ticket-id)."
          }
        },
        "required": [
          "id",
          "artikelId",
          "naam",
          "aantal",
          "prijsIncl",
          "btwPercentage",
          "btwCode",
          "opties",
          "gang",
          "opmerking",
          "status",
          "geprintOp"
        ]
      },
      "Betaalregel": {
        "type": "object",
        "properties": {
          "methode": {
            "type": "string",
            "enum": [
              "contant",
              "pin",
              "bon",
              "online",
              "overig",
              "rekening",
              "maaltijdcheque",
              "valuta",
              "kamer",
              "onbetaald"
            ]
          },
          "bedrag": {
            "type": "number"
          },
          "fooi": {
            "type": "number"
          },
          "terminalRef": {
            "type": "string"
          },
          "handmatig": {
            "type": "boolean",
            "description": "Pin zonder de kassa: al op de terminal zelf gepind (bv. geen internet)."
          },
          "cadeaubonCode": {
            "type": "string",
            "description": "Cadeaubon met saldo: de code (migratie 026)."
          },
          "uitgever": {
            "type": "string",
            "description": "Maaltijdcheque (migratie 114): pluxee, edenred of monizze."
          },
          "valuta": {
            "type": "string",
            "description": "Vreemde valuta (migratie 116): munt en wat de gast gaf (centen in die munt); koers en wisselgeld zet de server."
          },
          "valutaBedrag": {
            "type": "number"
          },
          "koers": {
            "type": "number"
          },
          "wisselgeld": {
            "type": "number"
          }
        },
        "required": [
          "methode",
          "bedrag"
        ]
      },
      "Betaling": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "methode": {
            "type": "string",
            "enum": [
              "contant",
              "pin",
              "bon",
              "online",
              "overig",
              "rekening",
              "maaltijdcheque",
              "valuta",
              "kamer",
              "onbetaald"
            ]
          },
          "bedrag": {
            "type": "number"
          },
          "fooi": {
            "type": "number"
          },
          "terminalRef": {
            "type": "string",
            "nullable": true
          },
          "uitgever": {
            "type": "string",
            "nullable": true,
            "description": "Maaltijdcheque (migratie 114, België): pluxee, edenred of monizze."
          },
          "valuta": {
            "type": "string",
            "nullable": true,
            "description": "Vreemde valuta (migratie 116): munt (GBP ...), wat de gast gaf in centen van die munt, koers en wisselgeld in euro."
          },
          "valutaBedrag": {
            "type": "number",
            "nullable": true
          },
          "koers": {
            "type": "number",
            "nullable": true
          },
          "wisselgeld": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "methode",
          "bedrag",
          "fooi",
          "terminalRef"
        ]
      },
      "BezorgGegevens": {
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "afhalen",
              "bezorgen"
            ]
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "e-mailadres (migratie 061) en verstuurde berichten"
          },
          "berichten": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "soort": {
                  "type": "string",
                  "enum": [
                    "aangenomen",
                    "klaar",
                    "onderweg"
                  ]
                },
                "via": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "sms",
                      "email"
                    ]
                  }
                },
                "op": {
                  "type": "string"
                }
              },
              "required": [
                "soort",
                "via",
                "op"
              ]
            }
          },
          "adres": {
            "type": "object",
            "properties": {
              "straat": {
                "type": "string"
              },
              "huisnummer": {
                "type": "string"
              },
              "postcode": {
                "type": "string"
              },
              "plaats": {
                "type": "string"
              }
            },
            "required": [
              "straat",
              "huisnummer",
              "postcode",
              "plaats"
            ],
            "nullable": true
          },
          "zone": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "naam": {
                "type": "string"
              },
              "minimum": {
                "type": "number"
              },
              "kosten": {
                "type": "number"
              },
              "gratisVanaf": {
                "type": "number",
                "nullable": true
              },
              "extraMin": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "naam",
              "minimum",
              "kosten",
              "gratisVanaf",
              "extraMin"
            ],
            "nullable": true
          },
          "zsm": {
            "type": "boolean"
          },
          "kostenRegelId": {
            "type": "string",
            "nullable": true
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "soort",
          "naam",
          "telefoon"
        ]
      },
      "BezorgZone": {
        "description": "Bezorggebied (migratie 060), zoals in de webshop: op postcode of binnen een straal van de zaak.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "postcode",
              "straal",
              "gebied"
            ]
          },
          "postcodes": {
            "type": "string",
            "description": "bv. \"5000-5049, 5051, 5052 AB\" (bij soort postcode)"
          },
          "straalKm": {
            "type": "number",
            "nullable": true,
            "description": "km hemelsbreed van de zaak (bij soort straal)"
          },
          "punten": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "minItems": 2,
              "maxItems": 2
            },
            "nullable": true,
            "description": "hoekpunten [breedtegraad, lengtegraad] van een gebied op de kaart (bij soort gebied)"
          },
          "minimum": {
            "type": "number"
          },
          "kosten": {
            "type": "number"
          },
          "gratisVanaf": {
            "type": "number",
            "nullable": true,
            "description": "gratis vanaf dit bedrag; null = nooit gratis"
          },
          "extraMin": {
            "type": "number"
          },
          "uit": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "naam",
          "soort",
          "postcodes",
          "straalKm",
          "minimum",
          "kosten",
          "gratisVanaf",
          "extraMin",
          "uit"
        ]
      },
      "BiDatasetDef": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "betalingen",
              "regels",
              "producten",
              "bonnen",
              "dagomzet",
              "uuromzet",
              "stornos",
              "medewerkers",
              "werktijden"
            ]
          },
          "naam": {
            "type": "string"
          },
          "omschrijving": {
            "type": "string"
          },
          "periode": {
            "type": "boolean",
            "description": "false = stamgegevens (geen periode)"
          },
          "kolommen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BiKolom"
            }
          }
        },
        "required": [
          "code",
          "naam",
          "omschrijving",
          "periode",
          "kolommen"
        ]
      },
      "BiDienst": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "manieren": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "push",
                "bestand",
                "api"
              ]
            },
            "description": "wat deze dienst kan (de eerste is de aanrader)"
          },
          "bestemmingen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "map",
                "sftp",
                "ftp"
              ]
            },
            "description": "bij bestand: waar de bestanden heen kunnen"
          },
          "noot": {
            "type": "string",
            "description": "korte uitleg hoe je hem aansluit"
          }
        },
        "required": [
          "code",
          "naam",
          "manieren",
          "noot"
        ]
      },
      "BiKolom": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "datum",
              "tekst",
              "bedrag",
              "tijdstip",
              "getal",
              "tijd",
              "ja/nee"
            ]
          }
        },
        "required": [
          "naam",
          "type"
        ]
      },
      "BiKoppeling": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "dienst": {
            "type": "string"
          },
          "manier": {
            "type": "string",
            "enum": [
              "push",
              "bestand",
              "api"
            ]
          },
          "naam": {
            "type": "string"
          },
          "actief": {
            "type": "boolean"
          },
          "instellingen": {
            "type": "object",
            "additionalProperties": {}
          },
          "geheimIngevuld": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "per geheim veld: is het ingevuld (de waarde zelf nooit)"
          },
          "heeftSleutel": {
            "type": "boolean"
          },
          "verstuurdTot": {
            "type": "string",
            "nullable": true,
            "description": "push: tot en met wanneer verstuurd"
          },
          "laatsteExport": {
            "type": "string",
            "nullable": true
          },
          "laatsteSync": {
            "type": "string",
            "nullable": true
          },
          "laatsteFout": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "dienst",
          "manier",
          "naam",
          "actief",
          "instellingen",
          "geheimIngevuld",
          "heeftSleutel",
          "verstuurdTot",
          "laatsteExport",
          "laatsteSync",
          "laatsteFout"
        ]
      },
      "BiVraag": {
        "type": "object",
        "properties": {
          "van": {
            "type": "string"
          },
          "tot": {
            "type": "string"
          },
          "periode": {
            "type": "string"
          },
          "formaat": {
            "type": "string"
          },
          "scheiding": {
            "type": "string"
          },
          "sleutel": {
            "type": "string"
          }
        }
      },
      "BtwPlanning": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vanaf": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "product",
              "percentage"
            ]
          },
          "artikelId": {
            "type": "string",
            "nullable": true
          },
          "artikelNaam": {
            "type": "string",
            "nullable": true
          },
          "kolom": {
            "type": "string",
            "enum": [
              "ter_plaatse",
              "afhalen"
            ],
            "nullable": true
          },
          "tariefId": {
            "type": "string"
          },
          "tariefCode": {
            "type": "string"
          },
          "nieuwPercentage": {
            "type": "number",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "mislukt",
              "gepland",
              "uitgevoerd"
            ]
          },
          "fout": {
            "type": "string",
            "nullable": true
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "uitgevoerdOp": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "vanaf",
          "soort",
          "artikelId",
          "artikelNaam",
          "kolom",
          "tariefId",
          "tariefCode",
          "nieuwPercentage",
          "status",
          "fout",
          "aangemaaktOp",
          "uitgevoerdOp"
        ]
      },
      "BtwRegel": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "percentage": {
            "type": "number"
          },
          "basis": {
            "type": "number",
            "description": "grondslag exclusief btw, in centen"
          },
          "btw": {
            "type": "number",
            "description": "btw-bedrag in centen"
          },
          "totaal": {
            "type": "number",
            "description": "basis + btw"
          }
        },
        "required": [
          "code",
          "percentage",
          "basis",
          "btw",
          "totaal"
        ]
      },
      "Campagne": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "eenmalig",
              "verjaardag",
              "terugkomen"
            ]
          },
          "kanaal": {
            "type": "string",
            "enum": [
              "sms",
              "email"
            ]
          },
          "onderwerp": {
            "type": "string",
            "nullable": true
          },
          "tekst": {
            "type": "string"
          },
          "dagen": {
            "type": "number",
            "nullable": true,
            "description": "eenmalig: niet geweest sinds zoveel dagen (leeg = iedereen); terugkomen: na zoveel dagen"
          },
          "minPunten": {
            "type": "number",
            "nullable": true,
            "description": "eenmalig: minimaal zoveel punten (leeg = iedereen)"
          },
          "actief": {
            "type": "boolean",
            "description": "automatische berichten: aan/uit"
          },
          "status": {
            "type": "string",
            "enum": [
              "verstuurd",
              "concept",
              "bezig"
            ]
          },
          "onderbroken": {
            "type": "boolean",
            "description": "status 'bezig' maar er wordt niet (meer) verstuurd, bv. na een herstart: verder versturen kan"
          },
          "verstuurdOp": {
            "type": "string",
            "nullable": true
          },
          "aantalVerstuurd": {
            "type": "number"
          },
          "aantalMislukt": {
            "type": "number"
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "gewijzigdOp": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CampagneCode"
              }
            ],
            "nullable": true,
            "description": "persoonlijke kortingscode bij elk bericht (migratie 068); null = geen"
          },
          "via": {
            "type": "string",
            "enum": [
              "kassa",
              "push",
              "mailchimp",
              "klaviyo"
            ],
            "description": "wie verstuurt (migratie 090): de kassa, of Mailchimp/Klaviyo"
          },
          "fout": {
            "type": "string",
            "nullable": true,
            "description": "waarom versturen via Mailchimp/Klaviyo niet lukte (de actie is dan weer een concept)"
          }
        },
        "required": [
          "id",
          "naam",
          "soort",
          "kanaal",
          "onderwerp",
          "tekst",
          "dagen",
          "minPunten",
          "actief",
          "status",
          "onderbroken",
          "verstuurdOp",
          "aantalVerstuurd",
          "aantalMislukt",
          "aangemaaktOp",
          "gewijzigdOp",
          "code",
          "via",
          "fout"
        ]
      },
      "CampagneCode": {
        "description": "Persoonlijke kortingscode bij een bericht (migratie 068); null = geen code.",
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "procent",
              "bedrag"
            ]
          },
          "waarde": {
            "type": "number",
            "description": "procent: 1-100; bedrag: centen"
          },
          "minimum": {
            "type": "number",
            "description": "minimum bestelbedrag (centen)"
          },
          "dagen": {
            "type": "number",
            "description": "zoveel dagen geldig vanaf het versturen"
          },
          "kassa": {
            "type": "boolean"
          },
          "webshop": {
            "type": "boolean"
          }
        },
        "required": [
          "soort",
          "waarde",
          "minimum",
          "dagen",
          "kassa",
          "webshop"
        ]
      },
      "CampagneInvoer": {
        "type": "object",
        "properties": {
          "naam": {},
          "soort": {
            "description": "'eenmalig' | 'verjaardag' | 'terugkomen'"
          },
          "kanaal": {
            "description": "'sms' | 'email'"
          },
          "onderwerp": {
            "description": "alleen e-mail"
          },
          "tekst": {
            "description": "{naam}, {zaak} en {punten} worden ingevuld"
          },
          "dagen": {
            "description": "eenmalig: niet geweest sinds zoveel dagen (leeg = iedereen); terugkomen: na zoveel dagen (verplicht)"
          },
          "minPunten": {
            "description": "eenmalig: minimaal zoveel punten (leeg = iedereen)"
          },
          "actief": {
            "description": "automatische berichten: aan/uit"
          },
          "code": {
            "type": "object",
            "properties": {
              "soort": {},
              "waarde": {},
              "minimum": {},
              "dagen": {},
              "kassa": {},
              "webshop": {}
            },
            "nullable": true,
            "description": "persoonlijke kortingscode (migratie 068): { soort, waarde, minimum, dagen, kassa, webshop }; leeg/null = geen"
          },
          "via": {
            "description": "wie verstuurt (migratie 090): 'kassa' (standaard), 'mailchimp' of 'klaviyo' (alleen eenmalig per e-mail); 'push' (migratie 095)"
          }
        }
      },
      "CatalogusLeverancier": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "landen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "NL",
                "BE"
              ]
            }
          },
          "groep": {
            "type": "string",
            "enum": [
              "platform",
              "overig",
              "groothandel",
              "foodservice",
              "dranken",
              "brouwer",
              "vers",
              "nonfood"
            ]
          },
          "site": {
            "type": "string",
            "description": "website / bestelsite"
          },
          "wijze": {
            "type": "string",
            "enum": [
              "webhook",
              "email",
              "bestand",
              "cxml",
              "upload",
              "printen"
            ],
            "description": "voorgestelde bestelwijze"
          },
          "bestand": {
            "type": "string",
            "enum": [
              "csv",
              "xlsx",
              "care4fresh",
              "ubl",
              "eancom",
              "cxml"
            ],
            "description": "bijlage bij de e-mail / het bestand"
          },
          "csv": {
            "type": "object",
            "properties": {
              "scheiding": {
                "type": "string",
                "enum": [
                  ",",
                  ";",
                  "tab"
                ]
              },
              "kop": {
                "type": "boolean"
              },
              "kolommen": {
                "type": "string"
              }
            },
            "required": [
              "scheiding",
              "kop",
              "kolommen"
            ],
            "description": "CSV-indeling (alleen als de leverancier die voorschrijft)"
          },
          "email": {
            "type": "string",
            "description": "openbaar bestel-/orderadres"
          },
          "cxml": {
            "type": "boolean",
            "description": "cXML kan (leverancier geeft adres, klantnummer en geheim)"
          },
          "aanvraag": {
            "type": "string",
            "description": "adres om een koppeling aan te vragen (alleen als de leverancier het zelf noemt)"
          },
          "artikelnummer": {
            "type": "string",
            "enum": [
              "eigen",
              "ean",
              "beide"
            ],
            "description": "artikelnummer: eigen nummer van de leverancier, EAN (GTIN) of beide"
          },
          "noot": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "naam",
          "landen",
          "groep",
          "wijze",
          "bestand",
          "artikelnummer",
          "noot"
        ]
      },
      "CodeInvoer": {
        "type": "object",
        "properties": {
          "code": {},
          "omschrijving": {},
          "soort": {},
          "waarde": {},
          "minimum": {},
          "geldigVan": {},
          "geldigTot": {},
          "maxGebruik": {},
          "aanKassa": {},
          "inWebshop": {},
          "actief": {}
        }
      },
      "Dagdeel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "dagen": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1 = maandag ... 7 = zondag"
          },
          "van": {
            "type": "string",
            "description": "'HH:MM'; tot mag '24:00' (tot het einde van de dag) of over middernacht"
          },
          "tot": {
            "type": "string"
          },
          "seizoenVan": {
            "type": "string",
            "nullable": true,
            "description": "'MM-DD' tot en met 'MM-DD', elk jaar; null = het hele jaar"
          },
          "seizoenTot": {
            "type": "string",
            "nullable": true
          },
          "groepIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "artikelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actief": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "naam",
          "dagen",
          "van",
          "tot",
          "seizoenVan",
          "seizoenTot",
          "groepIds",
          "artikelIds",
          "actief"
        ]
      },
      "DagdeelInvoer": {
        "type": "object",
        "properties": {
          "naam": {},
          "dagen": {},
          "van": {},
          "tot": {},
          "seizoenVan": {},
          "seizoenTot": {},
          "groepIds": {},
          "artikelIds": {},
          "actief": {}
        }
      },
      "DatabaseOverzicht": {
        "type": "object",
        "properties": {
          "modus": {
            "type": "string",
            "enum": [
              "extern",
              "intern",
              "mysql"
            ]
          },
          "merk": {
            "type": "string",
            "enum": [
              "PGlite",
              "PostgreSQL",
              "MySQL",
              "MariaDB"
            ],
            "description": "Merk en versie van de database die nu draait (PGlite, PostgreSQL, MySQL of MariaDB)."
          },
          "versie": {
            "type": "string",
            "nullable": true
          },
          "vast": {
            "type": "boolean",
            "description": "De keuze staat vast in .env (DATABASE_MODUS): niet om te schakelen vanuit de kassa."
          },
          "bron": {
            "type": "string",
            "enum": [
              "bestand",
              "env",
              "standaard"
            ]
          },
          "extern": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "ingesteld": {
                "type": "boolean"
              },
              "uitEnv": {
                "type": "boolean"
              },
              "wachtwoord": {
                "type": "boolean"
              }
            },
            "required": [
              "url",
              "ingesteld",
              "uitEnv",
              "wachtwoord"
            ],
            "description": "url: adres zonder wachtwoord; ingesteld: er is een adres; uitEnv: het adres staat in\r\n.env (DATABASE_URL) en gaat voor, dus geen invulvelden; wachtwoord: er is een\r\nwachtwoord bewaard (leeg laten in het scherm = dat wachtwoord houden)."
          },
          "intern": {
            "type": "object",
            "properties": {
              "map": {
                "type": "string"
              },
              "bestaat": {
                "type": "boolean"
              },
              "beschikbaar": {
                "type": "boolean"
              }
            },
            "required": [
              "map",
              "bestaat",
              "beschikbaar"
            ]
          },
          "mysql": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "ingesteld": {
                "type": "boolean"
              },
              "uitEnv": {
                "type": "boolean"
              },
              "wachtwoord": {
                "type": "boolean"
              },
              "map": {
                "type": "string"
              },
              "beschikbaar": {
                "type": "boolean"
              },
              "velden": {
                "type": "object",
                "properties": {
                  "server": {
                    "type": "string"
                  },
                  "poort": {
                    "type": "string"
                  },
                  "database": {
                    "type": "string"
                  },
                  "gebruiker": {
                    "type": "string"
                  },
                  "wachtwoordIngesteld": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "server",
                  "poort",
                  "database",
                  "gebruiker",
                  "wachtwoordIngesteld"
                ],
                "nullable": true
              }
            },
            "required": [
              "url",
              "ingesteld",
              "uitEnv",
              "wachtwoord",
              "map",
              "beschikbaar",
              "velden"
            ],
            "description": "MySQL/MariaDB, precies zoals extern: MYSQL_URL in .env gaat voor (uitEnv, geen invulvelden),\r\nanders het adres uit dit scherm (data/database.json). map = de werkkopie waarin de kassa rekent;\r\nvelden = het adres in losse velden om het scherm voor te vullen (zonder wachtwoord)."
          },
          "tabellen": {
            "type": "number"
          },
          "rijen": {
            "type": "number"
          },
          "bezig": {
            "type": "boolean"
          }
        },
        "required": [
          "modus",
          "merk",
          "versie",
          "vast",
          "bron",
          "extern",
          "intern",
          "mysql",
          "tabellen",
          "rijen",
          "bezig"
        ]
      },
      "DiaInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "seconden": {
            "type": "number",
            "description": "Zoveel seconden per dia (4-60)."
          },
          "acties": {
            "type": "boolean",
            "description": "Happy hours (alleen actieve, die van nu eerst)."
          },
          "uitgelicht": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Uitgelichte producten (in deze volgorde)."
          },
          "spaarkaart": {
            "type": "boolean",
            "description": "De spaarkaart (punten en stempels), alleen als de klantenkaart aan staat."
          },
          "teksten": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Eigen teksten, elk een eigen dia."
          }
        },
        "required": [
          "aan",
          "seconden",
          "acties",
          "uitgelicht",
          "spaarkaart",
          "teksten"
        ]
      },
      "DigitaleBon": {
        "type": "object",
        "properties": {
          "zaak": {
            "type": "string"
          },
          "nummer": {
            "type": "number",
            "description": "Bonnummer en tijdstip (ISO)."
          },
          "tijdstip": {
            "type": "string"
          },
          "totaal": {
            "type": "number"
          },
          "tekst": {
            "type": "string",
            "description": "De bon zelf, als tekst (zelfde als de papieren)."
          }
        },
        "required": [
          "zaak",
          "nummer",
          "tijdstip",
          "totaal",
          "tekst"
        ]
      },
      "EerdereBestelling": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "op": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "ter_plaatse",
              "afhalen",
              "bezorgen"
            ]
          },
          "bron": {
            "type": "string",
            "enum": [
              "thuisbezorgd",
              "webshop",
              "kassa",
              "platform"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "betaald",
              "geannuleerd"
            ]
          },
          "totaal": {
            "type": "number",
            "description": "centen, zonder geannuleerde regels"
          },
          "regels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                }
              },
              "required": [
                "naam",
                "aantal"
              ]
            }
          }
        },
        "required": [
          "id",
          "nummer",
          "op",
          "type",
          "bron",
          "status",
          "totaal",
          "regels"
        ]
      },
      "Etiket": {
        "type": "object",
        "properties": {
          "artikelId": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "prijs": {
            "type": "number",
            "description": "centen; bij perKilo de prijs per kilo"
          },
          "perKilo": {
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "aantal": {
            "type": "number"
          }
        },
        "required": [
          "artikelId",
          "naam",
          "prijs",
          "perKilo",
          "code",
          "aantal"
        ]
      },
      "EtiketRegel": {
        "type": "object",
        "properties": {
          "artikelId": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "plu": {
            "type": "number"
          },
          "gewichtKg": {
            "type": "number",
            "description": "gewicht in kg dat op de regel komt"
          },
          "prijsPerKilo": {
            "type": "number"
          },
          "bedrag": {
            "type": "number",
            "description": "bedrag van de regel (prijs per kilo x gewicht), centen"
          },
          "etiketPrijs": {
            "type": "number",
            "nullable": true,
            "description": "stond er een prijs op het etiket: die"
          }
        },
        "required": [
          "artikelId",
          "naam",
          "plu",
          "gewichtKg",
          "prijsPerKilo",
          "bedrag",
          "etiketPrijs"
        ]
      },
      "Etiketten": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "formaat": {
            "type": "string",
            "enum": [
              "38x25",
              "57x32",
              "62x29",
              "100x50"
            ]
          },
          "prijs": {
            "type": "boolean",
            "description": "prijs op het etiket"
          },
          "streepjescode": {
            "type": "boolean",
            "description": "streepjescode op het etiket (als het product een code heeft)"
          },
          "scannen": {
            "type": "boolean",
            "description": "scannen op het bestelscherm zet het product erbij"
          }
        },
        "required": [
          "aan",
          "formaat",
          "prijs",
          "streepjescode",
          "scannen"
        ]
      },
      "ExtraRapporten": {
        "type": "object",
        "properties": {
          "menuEngineering": {
            "type": "boolean"
          },
          "acties": {
            "type": "boolean"
          },
          "verspilling": {
            "type": "boolean"
          }
        },
        "required": [
          "menuEngineering",
          "acties",
          "verspilling"
        ]
      },
      "FactuurAfnemer": {
        "type": "object",
        "properties": {
          "referentie": {
            "type": "string",
            "nullable": true,
            "description": "referentie of ordernummer van de klant (BuyerReference)"
          },
          "naam": {
            "type": "string"
          },
          "adres": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "plaats": {
            "type": "string",
            "nullable": true
          },
          "land": {
            "type": "string",
            "nullable": true,
            "description": "NL of BE (of een andere ISO-landcode)"
          },
          "btwNummer": {
            "type": "string",
            "nullable": true
          },
          "kvk": {
            "type": "string",
            "nullable": true,
            "description": "KvK-nummer (NL) of ondernemingsnummer (BE)"
          },
          "peppolId": {
            "type": "string",
            "nullable": true,
            "description": "Peppol-ID als \"schema:id\", bv. 0208:0123456789; leeg = afgeleid van KvK/btw"
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "naam"
        ]
      },
      "FactuurBtw": {
        "type": "object",
        "properties": {
          "percentage": {
            "type": "number"
          },
          "categorie": {
            "type": "string",
            "enum": [
              "S",
              "Z"
            ],
            "description": "S = standaard, Z = 0%"
          },
          "excl": {
            "type": "number"
          },
          "btw": {
            "type": "number"
          },
          "incl": {
            "type": "number"
          }
        },
        "required": [
          "percentage",
          "categorie",
          "excl",
          "btw",
          "incl"
        ]
      },
      "FactuurGegevens": {
        "type": "object",
        "properties": {
          "kvk": {
            "type": "string",
            "description": "KvK-nummer (NL) of ondernemingsnummer (BE) van de zaak"
          },
          "iban": {
            "type": "string"
          },
          "bic": {
            "type": "string"
          },
          "peppolId": {
            "type": "string",
            "description": "eigen Peppol-ID als \"schema:id\" (leeg = uit KvK/btw-nummer)"
          },
          "betaaltermijn": {
            "type": "number",
            "description": "dagen; alleen als er nog iets te betalen is"
          },
          "voorvoegsel": {
            "type": "string",
            "description": "voor het factuurnummer, bv. \"F\" geeft F2026-0001"
          },
          "verzendwijze": {
            "type": "string",
            "enum": [
              "email",
              "http",
              "billit",
              "storecove",
              "banqup",
              "download"
            ],
            "description": "standaard verzendwijze"
          },
          "kopie": {
            "type": "string",
            "description": "kopie van elke gemailde factuur naar dit adres (bv. de boekhouder)"
          },
          "notitie": {
            "type": "string",
            "description": "tekst onderaan de factuur"
          }
        },
        "required": [
          "kvk",
          "iban",
          "bic",
          "peppolId",
          "betaaltermijn",
          "voorvoegsel",
          "verzendwijze",
          "kopie",
          "notitie"
        ]
      },
      "FactuurRegel": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "aantal": {
            "type": "number"
          },
          "prijsIncl": {
            "type": "number",
            "description": "centen per stuk incl. btw"
          },
          "btwPercentage": {
            "type": "number"
          },
          "btwCode": {
            "type": "string"
          }
        },
        "required": [
          "naam",
          "aantal",
          "prijsIncl",
          "btwPercentage",
          "btwCode"
        ]
      },
      "FactuurRij": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "string"
          },
          "datum": {
            "type": "string"
          },
          "vervaldatum": {
            "type": "string",
            "nullable": true
          },
          "bonnummer": {
            "type": "number",
            "nullable": true
          },
          "ticketId": {
            "type": "string",
            "nullable": true
          },
          "afnemer": {
            "$ref": "#/components/schemas/FactuurAfnemer"
          },
          "regels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FactuurRegel"
            }
          },
          "totaal": {
            "type": "number"
          },
          "alBetaald": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "aangemaakt",
              "verstuurd",
              "mislukt"
            ]
          },
          "verzondenVia": {
            "type": "string",
            "nullable": true
          },
          "verzondenOp": {
            "type": "string",
            "nullable": true
          },
          "verzondenAan": {
            "type": "string",
            "nullable": true
          },
          "fout": {
            "type": "string",
            "nullable": true
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "rekeningklantId": {
            "type": "string",
            "nullable": true,
            "description": "op rekening (migratie 085): de zakelijke klant, later ontvangen, nog open en wanneer helemaal betaald"
          },
          "ontvangen": {
            "type": "number"
          },
          "openstaand": {
            "type": "number"
          },
          "betaaldOp": {
            "type": "string",
            "nullable": true
          },
          "creditnotaVan": {
            "type": "string",
            "nullable": true,
            "description": "creditnota (migratie 129): bij deze factuur"
          }
        },
        "required": [
          "id",
          "nummer",
          "datum",
          "vervaldatum",
          "bonnummer",
          "ticketId",
          "afnemer",
          "regels",
          "totaal",
          "alBetaald",
          "status",
          "verzondenVia",
          "verzondenOp",
          "verzondenAan",
          "fout",
          "aangemaaktOp",
          "rekeningklantId",
          "ontvangen",
          "openstaand",
          "betaaldOp",
          "creditnotaVan"
        ]
      },
      "FooiInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean",
            "description": "fooiknoppen tonen bij afrekenen"
          },
          "procenten": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "percentageknoppen, bv. [5, 10, 15]"
          },
          "afronden": {
            "type": "boolean",
            "description": "knop \"Afronden\" naar de volgende hele euro"
          },
          "betaalwijzen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "contant",
                "pin",
                "bon"
              ]
            },
            "description": "bij welke betaalwijzen fooi kan"
          }
        },
        "required": [
          "aan",
          "procenten",
          "afronden",
          "betaalwijzen"
        ]
      },
      "FooiVerdeling": {
        "type": "object",
        "properties": {
          "methode": {
            "type": "string",
            "enum": [
              "eigen",
              "uren",
              "gelijk"
            ]
          },
          "totaal": {
            "type": "number"
          },
          "regels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "bedrag": {
                  "type": "number"
                },
                "uren": {
                  "type": "number"
                }
              },
              "required": [
                "naam",
                "bedrag"
              ]
            }
          },
          "opmerking": {
            "type": "string",
            "description": "bv. \"Niemand ingeklokt: gelijk verdeeld\""
          }
        },
        "required": [
          "methode",
          "totaal",
          "regels"
        ]
      },
      "FraudeRegels": {
        "type": "object",
        "properties": {
          "stornoNaProforma": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "aantal": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "aantal"
            ]
          },
          "storno": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "aantal": {
                "type": "number"
              },
              "bedrag": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "aantal",
              "bedrag"
            ]
          },
          "korting": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "aantal": {
                "type": "number"
              },
              "bedrag": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "aantal",
              "bedrag"
            ]
          },
          "retour": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "aantal": {
                "type": "number"
              },
              "bedrag": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "aantal",
              "bedrag"
            ]
          },
          "ladeZonderVerkoop": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "aantal": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "aantal"
            ]
          },
          "bonLangOpen": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "minuten": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "minuten"
            ]
          }
        },
        "required": [
          "stornoNaProforma",
          "storno",
          "korting",
          "retour",
          "ladeZonderVerkoop",
          "bonLangOpen"
        ]
      },
      "GastProfiel": {
        "description": "Gastprofiel van een klant (migratie 115): VIP, dieetwensen en allergieën (codes, zie gastprofiel.ts) en voorkeuren.",
        "type": "object",
        "properties": {
          "vip": {
            "type": "boolean"
          },
          "dieet": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "voorkeuren": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "vip",
          "dieet",
          "voorkeuren"
        ]
      },
      "GekozenOptie": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "prijsDelta": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "naam",
          "prijsDelta"
        ]
      },
      "GeldFuncties": {
        "description": "Wat de kassa met de automaat kan.",
        "type": "object",
        "properties": {
          "betalen": {
            "type": "boolean"
          },
          "uitbetalen": {
            "type": "boolean",
            "description": "los geld uitbetalen (bv. terugbetaling of wisselgeld voor de lade)"
          },
          "telling": {
            "type": "boolean",
            "description": "stand per munt en biljet"
          },
          "bijvullen": {
            "type": "boolean"
          },
          "legen": {
            "type": "boolean",
            "description": "afromen/legen naar de kluis (wisselgeld blijft)"
          }
        },
        "required": [
          "betalen",
          "uitbetalen",
          "telling",
          "bijvullen",
          "legen"
        ]
      },
      "GeldSysteemInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "fabrikant": {
            "type": "string"
          },
          "landen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "NL",
                "BE"
              ]
            }
          },
          "merk": {
            "type": "string",
            "enum": [
              "cashdro",
              "cashmatic",
              "cashlogy",
              "cashkeeper",
              "glory",
              "extern",
              "proef"
            ],
            "nullable": true,
            "description": "welke adapter de kassa gebruikt; null = (nog) geen koppeling"
          },
          "dealers": {
            "type": "string",
            "description": "dealers / leveranciers in NL en BE"
          },
          "noot": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "naam",
          "fabrikant",
          "landen",
          "merk",
          "dealers",
          "noot"
        ]
      },
      "GeldTelling": {
        "type": "object",
        "properties": {
          "totaal": {
            "type": "number"
          },
          "delen": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "waarde": {
                  "type": "number"
                },
                "aantal": {
                  "type": "number"
                },
                "biljet": {
                  "type": "boolean"
                }
              },
              "required": [
                "waarde",
                "aantal",
                "biljet"
              ]
            }
          }
        },
        "required": [
          "totaal",
          "delen"
        ]
      },
      "GevondenAdres": {
        "type": "object",
        "properties": {
          "adres": {
            "type": "string",
            "description": "straat en huisnummer met letter/toevoeging, bv. \"Spoorlaan 12A\""
          },
          "straat": {
            "type": "string"
          },
          "huisnummer": {
            "type": "number"
          },
          "toevoeging": {
            "type": "string",
            "description": "huisletter en/of toevoeging, bv. \"A\" of \"bis\" (leeg = geen)"
          },
          "postcode": {
            "type": "string",
            "description": "1234 AB"
          },
          "plaats": {
            "type": "string"
          }
        },
        "required": [
          "adres",
          "straat",
          "huisnummer",
          "toevoeging",
          "postcode",
          "plaats"
        ]
      },
      "GevondenPrinter": {
        "type": "object",
        "properties": {
          "verbinding": {
            "type": "string",
            "enum": [
              "serieel",
              "netwerk",
              "bluetooth",
              "usb",
              "systeem",
              "ingebouwd"
            ]
          },
          "adres": {
            "type": "string",
            "description": "wat in het veld Adres komt (leeg bij netwerk)"
          },
          "naam": {
            "type": "string",
            "description": "voor de keuzelijst, bv. \"EPSON TM-T20II (USB001)\" of \"/dev/usb/lp0\""
          }
        },
        "required": [
          "verbinding",
          "adres",
          "naam"
        ]
      },
      "GevondenWeegschaal": {
        "type": "object",
        "properties": {
          "poort": {
            "type": "string"
          },
          "baud": {
            "type": "number"
          },
          "protocol": {
            "type": "string",
            "enum": [
              "opvragen",
              "continu",
              "dialog06",
              "digi",
              "gram"
            ]
          },
          "gewichtKg": {
            "type": "number",
            "nullable": true,
            "description": "gewicht bij het zoeken (null = antwoord wel herkend maar niet stil/geen gewicht)"
          }
        },
        "required": [
          "poort",
          "baud",
          "protocol",
          "gewichtKg"
        ]
      },
      "GroepInvoer": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "kleur": {
            "type": "string"
          },
          "nietBij": {
            "description": "leverwijze (migratie 084): waar deze groep niet verkocht wordt; niet meegestuurd = niet wijzigen"
          }
        }
      },
      "HaccpOpen": {
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "punt",
              "taak"
            ]
          },
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "nog": {
            "type": "number",
            "description": "nog zoveel keer vandaag/deze week/maand"
          },
          "telaat": {
            "type": "boolean",
            "description": "te laat (bv. wekelijkse taak op een dag die al voorbij is, of de tweede meting na 14:00)"
          }
        },
        "required": [
          "soort",
          "id",
          "naam",
          "nog",
          "telaat"
        ]
      },
      "HaccpRegistratie": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "puntId": {
            "type": "string",
            "nullable": true
          },
          "taakId": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string"
          },
          "waarde": {
            "type": "number",
            "nullable": true
          },
          "inOrde": {
            "type": "boolean"
          },
          "actie": {
            "type": "string",
            "nullable": true
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "gebruikerNaam": {
            "type": "string",
            "nullable": true
          },
          "tijdstip": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "puntId",
          "taakId",
          "naam",
          "waarde",
          "inOrde",
          "actie",
          "opmerking",
          "gebruikerNaam",
          "tijdstip"
        ]
      },
      "HappyHour": {
        "description": "Happy hour en menu's.\r\n\r\nHappy hour: binnen een tijdvak (dagen + van/tot) een korting in procenten\r\nof een vaste prijs voor gekozen productgroepen/producten. Een dagdeal is een\r\nhappy hour van de hele dag (00:00 tot 24:00) op een of meer dagen; met een\r\nseizoen (bv. 06-01 tot 08-31, elk jaar) geldt hij alleen in die periode. De kassaserver\r\nbepaalt de prijs bij het aantikken; de schermen gebruiken dezelfde functie\r\nom de prijs op de knop te tonen.\r\n\r\nMenu: een product met een vaste prijs en onderdelen. Een onderdeel is vast\r\n(altijd dit product) of een keuze (kies N uit een productgroep of lijst).\r\nDe onderdelen gaan als losse regels naar keuken/bar; de menuprijs wordt\r\nover de onderdelen verdeeld, zodat de btw per onderdeel klopt.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "dagen": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "1 = maandag ... 7 = zondag"
          },
          "van": {
            "type": "string",
            "description": "'HH:MM'"
          },
          "tot": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "prijs",
              "procent"
            ]
          },
          "waarde": {
            "type": "number",
            "description": "procent: 1-100; prijs: vaste prijs in centen"
          },
          "groepIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "artikelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actief": {
            "type": "boolean"
          },
          "seizoenVan": {
            "type": "string",
            "nullable": true,
            "description": "seizoen (migratie 084): 'MM-DD' tot en met 'MM-DD', elk jaar (mag over de jaarwisseling); null/ontbreekt = altijd"
          },
          "seizoenTot": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "naam",
          "dagen",
          "van",
          "tot",
          "soort",
          "waarde",
          "groepIds",
          "artikelIds",
          "actief"
        ]
      },
      "HappyHourInvoer": {
        "type": "object",
        "properties": {
          "naam": {},
          "dagen": {},
          "van": {},
          "tot": {},
          "soort": {},
          "waarde": {},
          "groepIds": {},
          "artikelIds": {},
          "actief": {},
          "seizoenVan": {},
          "seizoenTot": {}
        }
      },
      "HotelBoekregel": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "bedrag": {
            "type": "number",
            "description": "centen incl. btw (totaal van de regel)"
          },
          "btwPercentage": {
            "type": "number"
          }
        },
        "required": [
          "naam",
          "bedrag",
          "btwPercentage"
        ]
      },
      "HotelCatalogusItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "koppeling",
              "catalogus",
              "demo"
            ]
          },
          "nl": {
            "type": "boolean",
            "description": "verkrijgbaar en in gebruik in Nederland / België"
          },
          "be": {
            "type": "boolean"
          },
          "uitleg": {
            "type": "string",
            "description": "korte uitleg voor het instellingenscherm"
          },
          "website": {
            "type": "string"
          },
          "velden": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HotelVeld"
            },
            "description": "wat de zaak invult (voor de koppelingen uit lib/pms; Mews, apaleo en Cloudbeds hebben een eigen scherm)"
          },
          "omgeving": {
            "type": "boolean",
            "description": "heeft een test- en een echte omgeving"
          },
          "handmatig": {
            "type": "object",
            "properties": {
              "kan": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "kanNiet": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "nodig": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "kan",
              "kanNiet",
              "nodig"
            ],
            "description": "Halve koppeling: de kassa kent de gasten (de hotelsoftware stuurt ze), maar de bon moet het hotel met de hand in de\r\nhotelsoftware zetten. kan/kanNiet = wat wel en wat niet werkt (voor het instellingenscherm)."
          }
        },
        "required": [
          "id",
          "naam",
          "status",
          "nl",
          "be",
          "uitleg"
        ]
      },
      "HotelGast": {
        "description": "Een gast die in het hotel verblijft (uit de hotelsoftware).",
        "type": "object",
        "properties": {
          "gastId": {
            "type": "string",
            "description": "id van de gast (klant) in de hotelsoftware"
          },
          "reserveringId": {
            "type": "string",
            "description": "id van de reservering (of het folio) in de hotelsoftware"
          },
          "kamer": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "aankomst": {
            "type": "string",
            "nullable": true
          },
          "vertrek": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "gastId",
          "reserveringId",
          "kamer",
          "naam"
        ]
      },
      "HotelVeld": {
        "description": "Een veld dat de zaak invult (Instellingen → Hotel); geheim = alleen bewaren, nooit tonen.",
        "type": "object",
        "properties": {
          "sleutel": {
            "type": "string",
            "enum": [
              "serviceId",
              "categorieId",
              "propertyId",
              "basisUrl",
              "btwCodes",
              "clientToken",
              "accessToken",
              "clientId",
              "clientSecret",
              "apiKey",
              "gebruiker",
              "wachtwoord"
            ]
          },
          "label": {
            "type": "string"
          },
          "geheim": {
            "type": "boolean"
          }
        },
        "required": [
          "sleutel",
          "label",
          "geheim"
        ]
      },
      "ImportTelling": {
        "type": "object",
        "properties": {
          "groepen": {
            "type": "number"
          },
          "artikelen": {
            "type": "number"
          },
          "optiegroepen": {
            "type": "number"
          },
          "ruimtes": {
            "type": "number"
          },
          "tafels": {
            "type": "number"
          },
          "printers": {
            "type": "number"
          },
          "rechten": {
            "type": "number"
          },
          "instellingen": {
            "type": "number"
          }
        },
        "required": [
          "groepen",
          "artikelen",
          "optiegroepen",
          "ruimtes",
          "tafels",
          "printers",
          "rechten",
          "instellingen"
        ]
      },
      "Invoer": {
        "type": "object",
        "properties": {
          "naam": {},
          "telefoon": {},
          "email": {},
          "personen": {},
          "datum": {},
          "tijd": {},
          "duurMin": {},
          "tafelId": {},
          "opmerking": {},
          "klantId": {},
          "toch": {
            "description": "ook opslaan als de tafel dan al gereserveerd is"
          },
          "mailen": {
            "description": "bevestiging mailen (alleen bij nieuw)"
          }
        }
      },
      "JournaalRegel": {
        "type": "object",
        "properties": {
          "dag": {
            "type": "string"
          },
          "sleutel": {
            "type": "string",
            "description": "soort regel: betaal:<methode>, omzet:<btw-code>, btw:<btw-code>, fooi, afronding, afstorting, kasverschil (migratie 063)"
          },
          "boekstuk": {
            "type": "string"
          },
          "rekening": {
            "type": "string"
          },
          "omschrijving": {
            "type": "string"
          },
          "debet": {
            "type": "number",
            "description": "centen, 0 als het een creditregel is"
          },
          "credit": {
            "type": "number"
          },
          "btwCode": {
            "type": "string",
            "nullable": true
          },
          "btwPercentage": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "dag",
          "sleutel",
          "boekstuk",
          "rekening",
          "omschrijving",
          "debet",
          "credit",
          "btwCode",
          "btwPercentage"
        ]
      },
      "Kaart": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "zaak": {
            "allOf": [
              {
                "$ref": "#/components/schemas/KaartPunt"
              }
            ],
            "nullable": true
          },
          "bezorgers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "naam": {
                  "type": "string"
                },
                "lat": {
                  "type": "number"
                },
                "lon": {
                  "type": "number"
                },
                "op": {
                  "type": "string"
                },
                "rit": {
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "type": "string",
                  "nullable": true
                },
                "viaApp": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "naam",
                "lat",
                "lon",
                "op",
                "rit",
                "status",
                "viaApp"
              ]
            }
          },
          "stops": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number"
                },
                "lon": {
                  "type": "number"
                },
                "nummer": {
                  "type": "number"
                },
                "rit": {
                  "type": "number"
                }
              },
              "required": [
                "lat",
                "lon",
                "nummer",
                "rit"
              ]
            },
            "description": "adressen van de ritten die onderweg zijn (nog niet bezorgd)"
          }
        },
        "required": [
          "aan",
          "zaak",
          "bezorgers",
          "stops"
        ]
      },
      "KaartPunt": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number"
          },
          "lon": {
            "type": "number"
          }
        },
        "required": [
          "lat",
          "lon"
        ]
      },
      "Kanalen": {
        "type": "object",
        "properties": {
          "kassa": {
            "type": "boolean"
          },
          "mail": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ntfy": {
            "type": "object",
            "properties": {
              "server": {
                "type": "string"
              },
              "topic": {
                "type": "string"
              }
            },
            "required": [
              "server",
              "topic"
            ],
            "nullable": true
          },
          "pushover": {
            "type": "object",
            "properties": {
              "user": {
                "type": "string"
              }
            },
            "required": [
              "user"
            ],
            "nullable": true
          },
          "telegram": {
            "type": "object",
            "properties": {
              "chatId": {
                "type": "string"
              }
            },
            "required": [
              "chatId"
            ],
            "nullable": true
          },
          "webhook": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "soort": {
                "type": "string",
                "enum": [
                  "json",
                  "slack",
                  "teams"
                ]
              }
            },
            "required": [
              "url",
              "soort"
            ],
            "nullable": true
          }
        },
        "required": [
          "kassa",
          "mail",
          "sms",
          "ntfy",
          "pushover",
          "telegram",
          "webhook"
        ]
      },
      "Kasmutatie": {
        "description": "Geld in of uit de kassalade buiten verkopen om.",
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "in",
              "uit"
            ]
          },
          "bedrag": {
            "type": "number"
          },
          "reden": {
            "type": "string"
          },
          "door": {
            "type": "string",
            "nullable": true
          },
          "tijd": {
            "type": "string"
          }
        },
        "required": [
          "soort",
          "bedrag",
          "reden",
          "door",
          "tijd"
        ]
      },
      "KassaOpties": {
        "type": "object",
        "properties": {
          "onbetaald": {
            "type": "boolean"
          },
          "gasten": {
            "type": "boolean"
          },
          "optellen": {
            "type": "boolean"
          },
          "meenemen": {
            "type": "boolean"
          },
          "stoel": {
            "type": "boolean"
          },
          "terugnemen": {
            "type": "boolean"
          },
          "voorschot": {
            "type": "boolean"
          },
          "spv": {
            "type": "boolean"
          },
          "apart": {
            "type": "boolean"
          },
          "verbeteren": {
            "type": "boolean"
          },
          "zonderwerkbon": {
            "type": "boolean"
          }
        },
        "required": [
          "onbetaald",
          "gasten",
          "optellen",
          "meenemen",
          "stoel",
          "terugnemen",
          "voorschot",
          "spv",
          "apart",
          "verbeteren",
          "zonderwerkbon"
        ]
      },
      "KegboardStatus": {
        "type": "object",
        "properties": {
          "fw": {
            "type": "string",
            "nullable": true
          },
          "meters": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "relays": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": [
          "fw",
          "meters",
          "relays"
        ]
      },
      "KioskApparaat": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "gekoppeld": {
            "type": "boolean"
          },
          "gekoppeldOp": {
            "type": "string",
            "nullable": true
          },
          "laatstGezien": {
            "type": "string",
            "nullable": true
          },
          "online": {
            "type": "boolean"
          },
          "terminalId": {
            "type": "string",
            "nullable": true
          },
          "betalen": {
            "type": "string",
            "enum": [
              "kassa",
              "pin",
              "keuze"
            ],
            "description": "hoe er op deze kiosk betaald wordt (migratie 110; standaard aan de kassa)"
          },
          "koppelcodeTot": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "naam",
          "gekoppeld",
          "gekoppeldOp",
          "laatstGezien",
          "online",
          "terminalId",
          "betalen",
          "koppelcodeTot"
        ]
      },
      "KioskInstelling": {
        "type": "object",
        "properties": {
          "hierEten": {
            "type": "boolean",
            "description": "De gast kan kiezen voor hier opeten (ter plaatse)."
          },
          "meenemen": {
            "type": "boolean",
            "description": "De gast kan kiezen voor meenemen (afhalen). Minstens één van beide."
          },
          "groepen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Productgroepen op de kiosk; leeg = alle."
          },
          "upsellGroepen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Upsell bij afrekenen (\"Ook iets erbij?\"): producten uit deze groepen; leeg = geen upsell."
          },
          "welkom": {
            "type": "string",
            "description": "Welkomtekst op het startscherm; leeg = standaard."
          },
          "terugSeconden": {
            "type": "number",
            "description": "Na zoveel seconden zonder aanraken terug naar het startscherm (mand leeg)."
          },
          "bon": {
            "type": "string",
            "enum": [
              "kassa",
              "geen",
              "kiosk"
            ],
            "description": "Waar de kassabon komt: printer van de kiosk(-app), bonprinter van de kassa, of geen bon."
          },
          "keuken": {
            "type": "string",
            "enum": [
              "meteen",
              "na_betalen"
            ],
            "description": "Betalen aan de kassa: de bestelling meteen naar de keuken (standaard), of pas als hij aan de kassa betaald is."
          },
          "statusQr": {
            "type": "boolean",
            "description": "QR-code op de kioskbon: de gast volgt de bestelling op de eigen telefoon (via het beheerportaal) en krijgt een\r\nmelding als hij klaar is. Standaard uit; werkt alleen als de kassa met het portaal verbonden is (migratie 111)."
          },
          "scanner": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ScanKeuzes"
              }
            ],
            "description": "Barcodescanner (standaard alles uit): wat een scan op de kiosk mag doen."
          },
          "opwaarderen": {
            "type": "boolean",
            "description": "Tegoed opwaarderen op de kiosk (standaard uit; werkt alleen met oplaadbaar tegoed aan)."
          },
          "opwaardeerBedragen": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "Bedragen om uit te kiezen bij opwaarderen, in centen (1 tot 6, oplopend)."
          }
        },
        "required": [
          "hierEten",
          "meenemen",
          "groepen",
          "upsellGroepen",
          "welkom",
          "terugSeconden",
          "bon",
          "keuken",
          "statusQr",
          "scanner",
          "opwaarderen",
          "opwaardeerBedragen"
        ]
      },
      "KlantBeeld": {
        "type": "object",
        "properties": {
          "fase": {
            "type": "string",
            "enum": [
              "rust",
              "bestelling",
              "afrekenen",
              "bedankt"
            ]
          },
          "bestellingId": {
            "type": "string",
            "nullable": true,
            "description": "Bestelling waar dit beeld bij hoort (niet getoond)."
          },
          "titel": {
            "type": "string",
            "nullable": true,
            "description": "Tafel / balie, bv. \"Tafel 5\" of \"Afhalen\"."
          },
          "regels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KlantschermRegel"
            }
          },
          "korting": {
            "type": "number",
            "description": "Korting op de rekening (positief bedrag, in centen)."
          },
          "totaal": {
            "type": "number",
            "description": "Totaal van de rekening (na korting)."
          },
          "betaald": {
            "type": "number",
            "description": "Al betaald (rekening splitsen)."
          },
          "teBetalen": {
            "type": "number",
            "nullable": true,
            "description": "Afrekenen: wat er nu betaald wordt (zonder fooi)."
          },
          "fooi": {
            "type": "number",
            "description": "Afrekenen: fooi."
          },
          "betaalwijze": {
            "type": "string",
            "enum": [
              "contant",
              "pin",
              "bon"
            ],
            "nullable": true
          },
          "pinStatus": {
            "type": "string",
            "nullable": true,
            "description": "Pin: korte status (\"Volg de terminal\" ...)."
          },
          "ontvangen": {
            "type": "number",
            "nullable": true,
            "description": "Contant: wat de klant geeft en wat hij terugkrijgt."
          },
          "terug": {
            "type": "number",
            "nullable": true
          },
          "bonUrl": {
            "type": "string",
            "nullable": true,
            "description": "Digitale bon (migratie 113, optioneel): bij \"Bedankt\" een QR-code naar de bon op de telefoon van de gast,\r\nvia het beheerportaal (https://…/__bon/<kassa>/<sleutel>)."
          },
          "zaak": {
            "type": "object",
            "properties": {
              "naam": {
                "type": "string"
              },
              "welkom": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "naam",
              "welkom"
            ],
            "description": "Naam van de zaak en welkomsttekst (voor het rustscherm)."
          },
          "tijd": {
            "type": "number",
            "description": "Tijdstip (ms) waarop de kassa dit beeld maakte."
          }
        },
        "required": [
          "fase",
          "regels",
          "korting",
          "totaal",
          "betaald",
          "tijd"
        ]
      },
      "KlantInfo": {
        "description": "Klant van de klantenkaart, met punten en stempelkaarten.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "punten": {
            "type": "number"
          },
          "laatstOp": {
            "type": "string",
            "nullable": true
          },
          "stempels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "artikelId": {
                  "type": "string"
                },
                "naam": {
                  "type": "string"
                },
                "nodig": {
                  "type": "number"
                },
                "stand": {
                  "type": "number"
                }
              },
              "required": [
                "artikelId",
                "naam",
                "nodig",
                "stand"
              ]
            }
          },
          "smsToestemming": {
            "type": "boolean",
            "description": "Marketing (migratie 056): toestemming voor acties per sms / per e-mail en wanneer gegeven."
          },
          "emailToestemming": {
            "type": "boolean"
          },
          "toestemmingOp": {
            "type": "string",
            "nullable": true
          },
          "verjaardag": {
            "type": "string",
            "nullable": true,
            "description": "verjaardag zonder jaar: \"dd-mm\" (bv. \"24-09\")"
          },
          "adres": {
            "type": "string",
            "nullable": true,
            "description": "Adres (migratie 057; optioneel): straat en huisnummer, postcode, plaats."
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "plaats": {
            "type": "string",
            "nullable": true
          },
          "kaart": {
            "type": "string",
            "nullable": true,
            "description": "Nummer van de klantenkaart (migratie 117; scannen aan de kassa of kiosk); null = geen."
          }
        },
        "required": [
          "id",
          "naam",
          "telefoon",
          "email",
          "punten",
          "laatstOp",
          "stempels"
        ]
      },
      "KlantInvoer": {
        "type": "object",
        "properties": {
          "naam": {},
          "telefoon": {},
          "email": {},
          "smsToestemming": {
            "description": "Marketing (migratie 056): toestemming voor acties per sms / e-mail. Niet meegestuurd = niet wijzigen."
          },
          "emailToestemming": {},
          "verjaardag": {
            "description": "verjaardag zonder jaar, \"dd-mm\" (leeg = geen). Niet meegestuurd = niet wijzigen."
          },
          "adres": {
            "description": "Adres (migratie 057): straat + huisnummer, postcode, plaats. Niet meegestuurd = niet wijzigen; leeg = weg."
          },
          "postcode": {},
          "plaats": {},
          "kaart": {
            "description": "Klantenkaart (migratie 117, beheer): het nummer; leeg = weghalen. Niet meegestuurd = niet wijzigen."
          }
        }
      },
      "KlantschermRegel": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "aantal": {
            "type": "number"
          },
          "bedrag": {
            "type": "number",
            "description": "Totaal van de regel (stuksprijs x aantal), in centen."
          },
          "extra": {
            "type": "string",
            "description": "Opties of menu-onderdelen, klein onder de naam."
          },
          "foto": {
            "type": "string",
            "description": "Productfoto (Instellingen → Zaak → Productfoto's): pad `/api/artikelen/<id>/foto?v=<versie>`."
          }
        },
        "required": [
          "naam",
          "aantal",
          "bedrag"
        ]
      },
      "KlokUitkomst": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "ingeklokt": {
            "type": "boolean"
          },
          "sinds": {
            "type": "string",
            "nullable": true,
            "description": "begin van de (lopende of net afgesloten) dienst"
          },
          "minuten": {
            "type": "number",
            "description": "gewerkte minuten van de net afgesloten dienst"
          },
          "al": {
            "type": "boolean",
            "description": "was al in- of uitgeklokt: er is niets veranderd"
          }
        },
        "required": [
          "naam",
          "ingeklokt",
          "sinds"
        ]
      },
      "Koppeling": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "klaar",
              "menu",
              "fout",
              "uit",
              "aangevraagd",
              "configureren",
              "live"
            ]
          },
          "statusTekst": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "nullable": true
          },
          "jetRestaurant": {
            "type": "string",
            "nullable": true
          },
          "menu": {
            "type": "object",
            "properties": {
              "op": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "nullable": true
              },
              "fout": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "op",
              "status",
              "fout"
            ],
            "nullable": true
          },
          "laatsteFout": {
            "type": "string",
            "nullable": true
          },
          "menuGevraagd": {
            "type": "boolean"
          },
          "testmodus": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "statusTekst",
          "locationId",
          "jetRestaurant",
          "menu",
          "laatsteFout",
          "menuGevraagd",
          "testmodus"
        ]
      },
      "Koppeling2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "gebruikerId": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "toestel": {
            "type": "string",
            "nullable": true
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "gezienOp": {
            "type": "string",
            "nullable": true
          },
          "dienstOp": {
            "type": "string",
            "nullable": true,
            "description": "aan het werk (plek delen) sinds"
          },
          "locatie": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number"
              },
              "lon": {
                "type": "number"
              },
              "op": {
                "type": "string"
              }
            },
            "required": [
              "lat",
              "lon",
              "op"
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "gebruikerId",
          "naam",
          "toestel",
          "aangemaaktOp",
          "gezienOp",
          "dienstOp",
          "locatie"
        ]
      },
      "Kortingscode": {
        "description": "Kortingscode (migratie 061): aan de kassa en/of in de webshop.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "omschrijving": {
            "type": "string",
            "nullable": true
          },
          "soort": {
            "type": "string",
            "enum": [
              "procent",
              "bedrag"
            ]
          },
          "waarde": {
            "type": "number",
            "description": "procent: 1-100; bedrag: centen"
          },
          "minimum": {
            "type": "number"
          },
          "geldigVan": {
            "type": "string",
            "nullable": true
          },
          "geldigTot": {
            "type": "string",
            "nullable": true
          },
          "maxGebruik": {
            "type": "number",
            "nullable": true
          },
          "gebruikt": {
            "type": "number"
          },
          "aanKassa": {
            "type": "boolean"
          },
          "inWebshop": {
            "type": "boolean"
          },
          "actief": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "code",
          "omschrijving",
          "soort",
          "waarde",
          "minimum",
          "geldigVan",
          "geldigTot",
          "maxGebruik",
          "gebruikt",
          "aanKassa",
          "inWebshop",
          "actief"
        ]
      },
      "Kostprijs": {
        "type": "object",
        "properties": {
          "artikelId": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "plu": {
            "type": "string"
          },
          "recept": {
            "type": "string",
            "nullable": true
          },
          "kostprijs": {
            "type": "number",
            "nullable": true
          },
          "primeCost": {
            "type": "number",
            "nullable": true
          },
          "verkoopprijs": {
            "type": "number",
            "nullable": true
          },
          "kassaprijs": {
            "type": "number",
            "nullable": true
          },
          "marge": {
            "type": "number",
            "nullable": true
          },
          "bijgewerktOp": {
            "type": "string"
          }
        },
        "required": [
          "artikelId",
          "naam",
          "plu",
          "recept",
          "kostprijs",
          "primeCost",
          "verkoopprijs",
          "kassaprijs",
          "marge",
          "bijgewerktOp"
        ]
      },
      "MedewerkerInvoer": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "rol": {
            "type": "string"
          },
          "pincode": {
            "type": "string",
            "description": "Alleen meesturen om te wijzigen."
          },
          "actief": {
            "type": "boolean"
          },
          "rijksregisternummer": {
            "type": "string",
            "nullable": true,
            "description": "België: rijksregisternummer voor de personeelsregistratie (optioneel)."
          },
          "taal": {
            "type": "string",
            "nullable": true,
            "description": "Taal van de schermen voor deze medewerker (migratie 048); null = taal van het apparaat."
          },
          "pas": {
            "type": "string",
            "nullable": true,
            "description": "Pasje (migratie 114): het nummer zoals de lezer het gaf om te koppelen, null = weghalen. Niet meesturen = niet wijzigen."
          }
        }
      },
      "MedewerkerKas": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "lade": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "nullable": true
          },
          "startgeld": {
            "type": "number"
          },
          "contant": {
            "type": "number"
          },
          "inLade": {
            "type": "number"
          },
          "uitLade": {
            "type": "number"
          },
          "verwacht": {
            "type": "number"
          },
          "telling": {
            "type": "object",
            "properties": {
              "geteld": {
                "type": "number"
              },
              "verschil": {
                "type": "number"
              },
              "tijd": {
                "type": "string"
              }
            },
            "required": [
              "geteld",
              "verschil",
              "tijd"
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "naam",
          "lade",
          "startgeld",
          "contant",
          "inLade",
          "uitLade",
          "verwacht",
          "telling"
        ]
      },
      "MenuArtikel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "omschrijving": {
            "type": "string",
            "nullable": true
          },
          "groep_id": {
            "type": "string",
            "nullable": true
          },
          "prijs_incl": {
            "type": "number"
          },
          "uitverkocht": {
            "type": "boolean"
          },
          "btw_percentage": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "naam",
          "omschrijving",
          "groep_id",
          "prijs_incl",
          "uitverkocht",
          "btw_percentage"
        ]
      },
      "MenuEngineering": {
        "type": "object",
        "properties": {
          "van": {
            "type": "string"
          },
          "tot": {
            "type": "string"
          },
          "regels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuRegel"
            }
          },
          "grensAandeel": {
            "type": "number",
            "description": "Grenzen: populair vanaf dit aandeel (%), veel marge vanaf deze marge per stuk (centen)."
          },
          "grensMarge": {
            "type": "number"
          },
          "totaal": {
            "type": "object",
            "properties": {
              "aantal": {
                "type": "number"
              },
              "omzet": {
                "type": "number"
              },
              "omzetExcl": {
                "type": "number"
              },
              "margeTotaal": {
                "type": "number"
              }
            },
            "required": [
              "aantal",
              "omzet",
              "omzetExcl",
              "margeTotaal"
            ]
          },
          "zonderKostprijs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "artikelId": {
                  "type": "string"
                },
                "naam": {
                  "type": "string"
                },
                "groep": {
                  "type": "string",
                  "nullable": true
                },
                "aantal": {
                  "type": "number"
                },
                "omzet": {
                  "type": "number"
                }
              },
              "required": [
                "artikelId",
                "naam",
                "groep",
                "aantal",
                "omzet"
              ]
            }
          }
        },
        "required": [
          "van",
          "tot",
          "regels",
          "grensAandeel",
          "grensMarge",
          "totaal",
          "zonderKostprijs"
        ]
      },
      "MenuGroep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "naam"
        ]
      },
      "MenuKeuze": {
        "description": "Keuze binnen een menu. Bij een keuze-onderdeel: welk gerecht. Bij een vast\nonderdeel (optioneel): opties/opmerking voor dat vaste gerecht, in volgorde.",
        "type": "object",
        "properties": {
          "onderdeelId": {},
          "artikelId": {},
          "opmerking": {},
          "optieIds": {}
        }
      },
      "MenuOnderdeel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "vast",
              "keuze"
            ]
          },
          "artikelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "vast: dit product; keuze: kies uit deze producten ..."
          },
          "groepId": {
            "type": "string",
            "nullable": true,
            "description": "... of uit deze productgroep (keuze)"
          },
          "aantal": {
            "type": "number",
            "description": "vast: hoeveel stuks; keuze: hoeveel kiezen"
          },
          "gang": {
            "type": "number",
            "description": "gang voor de keuken (1 = meteen)"
          },
          "menuprijs": {
            "type": "number",
            "nullable": true,
            "description": "Vast deel van de menuprijs per stuk, in centen (migratie 127); null = naar verhouding.\r\nAlleen als alle onderdelen er een hebben en ze samen de menuprijs zijn (bv. de FOD-testzaak:\r\nBusiness menu € 38 = Carpaccio € 15 + Burger € 23)."
          }
        },
        "required": [
          "id",
          "naam",
          "soort",
          "artikelIds",
          "groepId",
          "aantal",
          "gang"
        ]
      },
      "MenuOptiegroep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "minimum": {
            "type": "number"
          },
          "maximum": {
            "type": "number"
          },
          "artikel_id": {
            "type": "string",
            "nullable": true
          },
          "artikelgroep_id": {
            "type": "string",
            "nullable": true
          },
          "opties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "naam": {
                  "type": "string"
                },
                "prijsDelta": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "naam",
                "prijsDelta"
              ]
            }
          }
        },
        "required": [
          "id",
          "naam",
          "minimum",
          "maximum",
          "artikel_id",
          "artikelgroep_id",
          "opties"
        ]
      },
      "MenuRegel": {
        "type": "object",
        "properties": {
          "artikelId": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "groep": {
            "type": "string",
            "nullable": true
          },
          "aantal": {
            "type": "number"
          },
          "omzet": {
            "type": "number",
            "description": "Omzet met en zonder btw (centen)."
          },
          "omzetExcl": {
            "type": "number"
          },
          "prijsExcl": {
            "type": "number",
            "description": "Gemiddelde verkoopprijs per stuk zonder btw, kostprijs en marge per stuk (centen)."
          },
          "kostprijs": {
            "type": "number"
          },
          "bron": {
            "type": "string",
            "enum": [
              "apicbase",
              "inkoop",
              "recept"
            ]
          },
          "marge": {
            "type": "number"
          },
          "margeProcent": {
            "type": "number",
            "description": "Marge in procenten van de verkoopprijs zonder btw."
          },
          "margeTotaal": {
            "type": "number"
          },
          "aandeel": {
            "type": "number",
            "description": "Aandeel in het aantal verkochte stuks (0-100)."
          },
          "klasse": {
            "type": "string",
            "enum": [
              "ster",
              "ploegpaard",
              "puzzel",
              "hond"
            ]
          }
        },
        "required": [
          "artikelId",
          "naam",
          "groep",
          "aantal",
          "omzet",
          "omzetExcl",
          "prijsExcl",
          "kostprijs",
          "bron",
          "marge",
          "margeProcent",
          "margeTotaal",
          "aandeel",
          "klasse"
        ]
      },
      "MenubordBeeld": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "zaak": {
            "type": "string"
          },
          "titel": {
            "type": "string"
          },
          "kolommen": {
            "type": "number"
          },
          "thema": {
            "type": "string",
            "enum": [
              "donker",
              "licht"
            ]
          },
          "seconden": {
            "type": "number"
          },
          "acties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "tot": {
                  "type": "string"
                }
              },
              "required": [
                "naam",
                "tot"
              ]
            },
            "description": "Happy hours die nu bezig zijn: naam en tot hoe laat."
          },
          "groepen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenubordGroep"
            }
          },
          "tijd": {
            "type": "string",
            "description": "Tijdstip (ISO) van dit beeld."
          }
        },
        "required": [
          "aan",
          "zaak",
          "titel",
          "kolommen",
          "thema",
          "seconden",
          "acties",
          "groepen",
          "tijd"
        ]
      },
      "MenubordGroep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "kleur": {
            "type": "string",
            "nullable": true
          },
          "producten": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenubordProduct"
            }
          }
        },
        "required": [
          "id",
          "naam",
          "kleur",
          "producten"
        ]
      },
      "MenubordProduct": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "prijs": {
            "type": "number",
            "description": "Prijs nu (met happy hour), in centen."
          },
          "normaal": {
            "type": "number",
            "description": "Normale prijs als er nu een happy hour geldt (doorgestreept op het bord)."
          },
          "actie": {
            "type": "string",
            "description": "Naam van de happy hour die nu geldt."
          },
          "uitverkocht": {
            "type": "boolean"
          },
          "perKilo": {
            "type": "boolean",
            "description": "Weegschaal: de prijs is per kilo."
          },
          "foto": {
            "type": "string",
            "description": "Pad van de productfoto (alleen als foto's aan staan)."
          },
          "allergenen": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "naam",
          "prijs",
          "uitverkocht"
        ]
      },
      "Mogelijk": {
        "description": "Wat een bron kan (voor de knoppen in het paneel).",
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean"
          },
          "afspelen": {
            "type": "boolean"
          },
          "pauze": {
            "type": "boolean"
          },
          "volgende": {
            "type": "boolean"
          },
          "vorige": {
            "type": "boolean"
          },
          "harder": {
            "type": "boolean"
          },
          "zachter": {
            "type": "boolean"
          },
          "volume": {
            "type": "boolean"
          },
          "playlist": {
            "type": "boolean"
          },
          "verschuiven": {
            "type": "boolean"
          },
          "lijsten": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "afspelen",
          "pauze",
          "volgende",
          "vorige",
          "harder",
          "zachter",
          "volume",
          "playlist",
          "verschuiven",
          "lijsten"
        ]
      },
      "MuziekStatus": {
        "type": "object",
        "properties": {
          "speelt": {
            "type": "boolean",
            "nullable": true,
            "description": "speelt er muziek (null = onbekend)"
          },
          "titel": {
            "type": "string",
            "nullable": true
          },
          "artiest": {
            "type": "string",
            "nullable": true
          },
          "volume": {
            "type": "number",
            "nullable": true,
            "description": "0-100 (null = onbekend)"
          }
        },
        "required": [
          "speelt",
          "titel",
          "artiest",
          "volume"
        ]
      },
      "NieuweRegel": {
        "type": "object",
        "properties": {
          "artikelId": {
            "type": "string"
          },
          "aantal": {
            "type": "number"
          },
          "optieIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "gang": {
            "type": "number"
          },
          "opmerking": {
            "type": "string"
          },
          "menu": {
            "type": "object",
            "properties": {
              "keuzes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MenuKeuze"
                }
              }
            },
            "description": "Menu: gekozen producten per keuze-onderdeel (vaste onderdelen gaan vanzelf mee)."
          },
          "etiket": {
            "type": "string",
            "description": "Weegschaal (migratie 047): streepjescode van een TS6X-etiket. Het gewicht op\nhet etiket wordt het aantal (kg); aantal hoeft dan niet mee."
          },
          "afhalen": {
            "type": "boolean",
            "description": "Migratie 129: deze regel wordt meegenomen (afhaal-btw), ook in een bestelling ter plaatse."
          },
          "stoel": {
            "type": "number",
            "description": "Migratie 129: stoelnummer aan de tafel (1 tot 99)."
          },
          "prijs": {
            "type": "number",
            "description": "Migratie 129: eigen prijs in centen (alleen bij een product met open prijs)."
          },
          "bij": {
            "type": "string",
            "description": "Knop \"+\" op een regel in het bestelscherm: met Zelfde producten optellen aan nog één erbij op juist deze nog\nniet bestelde regel. Optellen uit, al besteld, andere prijs ...: een nieuwe regel."
          }
        },
        "required": [
          "artikelId",
          "aantal"
        ]
      },
      "Nummer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "titel": {
            "type": "string"
          },
          "artiest": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "titel",
          "artiest"
        ]
      },
      "OmzetRegel": {
        "type": "object",
        "properties": {
          "dag": {
            "type": "string"
          },
          "uur": {
            "type": "number"
          },
          "excl": {
            "type": "number"
          },
          "incl": {
            "type": "number"
          }
        },
        "required": [
          "dag",
          "uur",
          "excl",
          "incl"
        ]
      },
      "Ontvangen": {
        "type": "object",
        "properties": {
          "ontvangen": {
            "type": "number"
          },
          "geboekt": {
            "type": "number"
          },
          "dubbel": {
            "type": "number"
          },
          "onbekend": {
            "type": "number"
          },
          "fouten": {
            "type": "number"
          }
        },
        "required": [
          "ontvangen",
          "geboekt",
          "dubbel",
          "onbekend",
          "fouten"
        ]
      },
      "OpenTijden": {
        "type": "object",
        "properties": {
          "afhalen": {
            "$ref": "#/components/schemas/WeekTijden"
          },
          "bezorgen": {
            "$ref": "#/components/schemas/WeekTijden"
          }
        },
        "required": [
          "afhalen",
          "bezorgen"
        ]
      },
      "Oproep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bron": {
            "type": "string",
            "enum": [
              "webhook",
              "ami",
              "fritzbox",
              "modem",
              "android",
              "test"
            ]
          },
          "nummer": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "lijn": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "ringt",
              "opgenomen",
              "beeindigd",
              "gemist"
            ]
          },
          "op": {
            "type": "string"
          },
          "afgehandeld": {
            "type": "boolean"
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "beller": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Beller"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "bron",
          "nummer",
          "naam",
          "lijn",
          "status",
          "op",
          "afgehandeld",
          "bestellingId",
          "beller"
        ]
      },
      "OproepRegel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bron": {
            "type": "string"
          },
          "nummer": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "lijn": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "ringt",
              "opgenomen",
              "beeindigd",
              "gemist"
            ]
          },
          "op": {
            "type": "string"
          },
          "afgehandeld": {
            "type": "boolean"
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "bekend": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "bron",
          "nummer",
          "naam",
          "lijn",
          "status",
          "op",
          "afgehandeld",
          "bestellingId",
          "bekend"
        ]
      },
      "OproepRij": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "string",
            "description": "wat er op het scherm staat"
          },
          "bestelnummer": {
            "type": "number",
            "description": "bestelnummer in de kassa (voor de bediening)"
          },
          "naam": {
            "type": "string",
            "nullable": true,
            "description": "voornaam (op het scherm alleen als de instelling aan staat)"
          },
          "bron": {
            "type": "string",
            "enum": [
              "thuisbezorgd",
              "webshop",
              "kassa",
              "platform",
              "kiosk"
            ]
          },
          "soort": {
            "type": "string",
            "enum": [
              "afhalen",
              "balie",
              "bezorger"
            ]
          },
          "platform": {
            "type": "string",
            "description": "bij bron platform: Uber Eats, Deliveroo of HubRise"
          },
          "sinds": {
            "type": "string"
          },
          "klaarOp": {
            "type": "string",
            "nullable": true
          },
          "stand": {
            "type": "string",
            "enum": [
              "klaar",
              "weg",
              "bereid"
            ],
            "nullable": true,
            "description": "met de hand gezet in de kassa"
          }
        },
        "required": [
          "id",
          "nummer",
          "bestelnummer",
          "naam",
          "bron",
          "soort",
          "sinds",
          "klaarOp",
          "stand"
        ]
      },
      "OptiegroepInvoer": {
        "type": "object",
        "properties": {
          "artikelId": {
            "type": "string",
            "description": "bij nieuw: bij welk product óf welke productgroep"
          },
          "groepId": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "minimum": {
            "type": "number"
          },
          "maximum": {
            "type": "number",
            "description": "0 = onbeperkt"
          },
          "opties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "naam": {
                  "type": "string"
                },
                "prijsDelta": {
                  "type": "number"
                }
              }
            },
            "description": "in volgorde; met id = bestaande optie wijzigen, zonder id = nieuw"
          }
        }
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "leverancierId": {
            "type": "string",
            "nullable": true
          },
          "leverancierNaam": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "mislukt",
              "concept",
              "verzonden",
              "ontvangen"
            ]
          },
          "wijze": {
            "type": "string",
            "nullable": true
          },
          "leverdatum": {
            "type": "string",
            "nullable": true
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "totaal": {
            "type": "number"
          },
          "automatisch": {
            "type": "boolean"
          },
          "fout": {
            "type": "string",
            "nullable": true
          },
          "referentie": {
            "type": "string",
            "nullable": true
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "verzondenOp": {
            "type": "string",
            "nullable": true
          },
          "ontvangenOp": {
            "type": "string",
            "nullable": true
          },
          "gemaaktDoor": {
            "type": "string",
            "nullable": true
          },
          "regels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderRegel"
            }
          }
        },
        "required": [
          "id",
          "nummer",
          "leverancierId",
          "leverancierNaam",
          "status",
          "wijze",
          "leverdatum",
          "opmerking",
          "totaal",
          "automatisch",
          "fout",
          "referentie",
          "aangemaaktOp",
          "verzondenOp",
          "ontvangenOp",
          "gemaaktDoor",
          "regels"
        ]
      },
      "OrderRegel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "artikel",
              "ingredient"
            ],
            "nullable": true
          },
          "itemId": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string"
          },
          "bestelcode": {
            "type": "string",
            "nullable": true
          },
          "ean": {
            "type": "string",
            "nullable": true
          },
          "aantal": {
            "type": "number"
          },
          "per": {
            "type": "number"
          },
          "eenheid": {
            "type": "string",
            "nullable": true
          },
          "prijs": {
            "type": "number",
            "nullable": true
          },
          "ontvangen": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "id",
          "soort",
          "itemId",
          "naam",
          "bestelcode",
          "ean",
          "aantal",
          "per",
          "eenheid",
          "prijs",
          "ontvangen"
        ]
      },
      "Os6xInstelling": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string",
            "description": "Naam van de weegschaal, bv. \"Kassa 1\" of \"Toonbank\"; elke kassa/tablet kiest welke hij gebruikt."
          },
          "model": {
            "type": "string",
            "description": "Aclas-model (id uit ACLAS_MODELLEN, bv. \"OS6X\", \"PS1CX\", \"TS6X\"); leeg = OS6X."
          },
          "verbinding": {
            "type": "string",
            "enum": [
              "serieel",
              "netwerk",
              "bluetooth",
              "module"
            ],
            "description": "serieel = COM-poort / USB-serieel; netwerk = TCP; bluetooth = SPP; module = Aclas Scale Module op dit apparaat"
          },
          "poort": {
            "type": "string",
            "description": "serieel/bluetooth: bv. COM3 (Windows) of /dev/ttyUSB0, /dev/rfcomm0 (Linux)"
          },
          "btAdres": {
            "type": "string",
            "description": "bluetooth op Android: Bluetooth-adres (MAC) van de weegschaal, bv. 00:11:22:AA:BB:CC"
          },
          "baud": {
            "type": "number",
            "description": "serieel: snelheid zoals ingesteld op de weegschaal (meestal 9600)"
          },
          "host": {
            "type": "string",
            "description": "netwerk: IP-adres of naam van de omzetter"
          },
          "tcpPoort": {
            "type": "number",
            "description": "netwerk: TCP-poort van de omzetter"
          },
          "protocol": {
            "type": "string",
            "enum": [
              "opvragen",
              "continu",
              "dialog06",
              "digi",
              "gram"
            ],
            "description": "opvragen = kassa stuurt \"W\" (Toledo 8217), continu = weegschaal stuurt zelf, dialog06 = Checkout-Dialog 06, digi = DIGI Type B (ENQ)"
          },
          "lijn": {
            "type": "string",
            "enum": [
              "8N1",
              "7E1"
            ],
            "description": "databits/pariteit (serieel en Bluetooth); leeg = 8N1. Mettler Toledo: 7E1. Dialog 06 is altijd 7O1."
          },
          "dialog06Codes": {
            "type": "string",
            "description": "Dialog 06: controlecodes (checksum + correctiewaarde, hexadecimaal) die de\r\nweegschaal af en toe vraagt (record 10). Krijg je van de leverancier van de\r\nweegschaal; leeg = de weegschaal vraagt er niet om."
          }
        },
        "required": [
          "naam",
          "verbinding",
          "poort",
          "baud",
          "host",
          "tcpPoort",
          "protocol"
        ]
      },
      "POverzicht": {
        "type": "object",
        "properties": {
          "bestellingId": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "platform": {
            "type": "string",
            "enum": [
              "ubereats",
              "deliveroo",
              "hubrise"
            ]
          },
          "kanaal": {
            "type": "string",
            "nullable": true
          },
          "referentie": {
            "type": "string",
            "nullable": true
          },
          "levering": {
            "type": "string",
            "enum": [
              "afhalen",
              "platform",
              "zelf_bezorgen"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "nieuw",
              "klaar",
              "onderweg",
              "in_bereiding",
              "bezorgd",
              "opgehaald",
              "geaccepteerd",
              "geweigerd"
            ]
          },
          "statusTekst": {
            "type": "string"
          },
          "bestellingStatus": {
            "type": "string"
          },
          "klant": {
            "type": "object",
            "properties": {
              "naam": {
                "type": "string",
                "nullable": true
              },
              "telefoon": {
                "type": "string",
                "nullable": true
              },
              "adres": {
                "type": "string",
                "nullable": true
              },
              "notitie": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "naam",
              "telefoon",
              "adres",
              "notitie"
            ]
          },
          "klaarOm": {
            "type": "string",
            "nullable": true
          },
          "bezorgenOm": {
            "type": "string",
            "nullable": true
          },
          "betaalwijze": {
            "type": "string",
            "nullable": true
          },
          "onlineBetaald": {
            "type": "boolean"
          },
          "totaal": {
            "type": "number"
          },
          "notitie": {
            "type": "string",
            "nullable": true
          },
          "ontvangenOp": {
            "type": "string"
          },
          "regels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                },
                "opties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "opmerking": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "naam",
                "aantal",
                "opties",
                "opmerking"
              ]
            }
          },
          "tijdlijn": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "soort": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "nullable": true
                },
                "tekst": {
                  "type": "string"
                },
                "op": {
                  "type": "string"
                }
              },
              "required": [
                "soort",
                "code",
                "tekst",
                "op"
              ]
            }
          }
        },
        "required": [
          "bestellingId",
          "nummer",
          "platform",
          "kanaal",
          "referentie",
          "levering",
          "status",
          "statusTekst",
          "bestellingStatus",
          "klant",
          "klaarOm",
          "bezorgenOm",
          "betaalwijze",
          "onlineBetaald",
          "totaal",
          "notitie",
          "ontvangenOp",
          "regels",
          "tijdlijn"
        ]
      },
      "PakketVeld": {
        "type": "object",
        "properties": {
          "veld": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "geheim": {
            "type": "boolean"
          },
          "optioneel": {
            "type": "boolean",
            "description": "leeg laten mag"
          },
          "plaatshouder": {
            "type": "string"
          },
          "keuzes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "waarde": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              },
              "required": [
                "waarde",
                "label"
              ]
            }
          }
        },
        "required": [
          "veld",
          "label"
        ]
      },
      "PlatformKoppeling": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "ubereats",
              "deliveroo",
              "hubrise"
            ]
          },
          "naam": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "fout",
              "uit",
              "wacht",
              "actief"
            ]
          },
          "melding": {
            "type": "string",
            "nullable": true
          },
          "menuOp": {
            "type": "string",
            "nullable": true
          },
          "menuFout": {
            "type": "string",
            "nullable": true
          },
          "geheimIngevuld": {
            "type": "boolean",
            "description": "HubRise: geheim van de app ingevuld (de waarde zelf komt nooit terug)"
          },
          "ingelogd": {
            "type": "boolean",
            "description": "HubRise: ingelogd (toegang bewaard)"
          },
          "verbonden": {
            "type": "boolean"
          },
          "aan": {
            "type": "boolean"
          },
          "extern": {
            "type": "string",
            "nullable": true,
            "description": "Uber Eats: winkel-id (store_id); Deliveroo: site-id (location_id); HubRise: location-id (na het inloggen)"
          },
          "merk": {
            "type": "string",
            "nullable": true,
            "description": "Deliveroo: merk-id (brand_id)"
          },
          "tabletloos": {
            "type": "boolean",
            "description": "Deliveroo: site zonder tablet (de kassa accepteert); met tablet accepteert de zaak op de tablet"
          },
          "autoAccepteren": {
            "type": "boolean",
            "description": "bestelling meteen accepteren zodra hij in de kassa staat"
          },
          "werkbon": {
            "type": "boolean",
            "description": "werkbon meteen naar keuken/bar"
          },
          "menuAuto": {
            "type": "boolean",
            "description": "menu vanzelf naar het platform na een wijziging (Uber Eats en Deliveroo)"
          },
          "clientId": {
            "type": "string",
            "nullable": true,
            "description": "HubRise: client-id van de app"
          }
        },
        "required": [
          "platform",
          "naam",
          "status",
          "melding",
          "menuOp",
          "menuFout",
          "geheimIngevuld",
          "ingelogd",
          "verbonden",
          "aan",
          "extern",
          "merk",
          "tabletloos",
          "autoAccepteren",
          "werkbon",
          "menuAuto",
          "clientId"
        ]
      },
      "PlatformMenu": {
        "type": "object",
        "properties": {
          "groepen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuGroep"
            }
          },
          "artikelen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuArtikel"
            }
          },
          "optiegroepen": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MenuOptiegroep"
            }
          },
          "taal": {
            "type": "string"
          }
        },
        "required": [
          "groepen",
          "artikelen",
          "optiegroepen",
          "taal"
        ]
      },
      "Playlist": {
        "type": "object",
        "properties": {
          "nu": {
            "type": "number",
            "nullable": true
          },
          "nummers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Nummer"
            }
          }
        },
        "required": [
          "nu",
          "nummers"
        ]
      },
      "PortaalBackup": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "gemaaktOp": {
            "type": "string"
          },
          "grootteKb": {
            "type": "number"
          },
          "soort": {
            "type": "string",
            "enum": [
              "handmatig",
              "automatisch",
              "veiligheid"
            ]
          },
          "hier": {
            "type": "boolean",
            "description": "staat deze back-up ook al op dit apparaat?"
          }
        },
        "required": [
          "naam",
          "gemaaktOp",
          "grootteKb",
          "soort",
          "hier"
        ]
      },
      "PrintapparaatGegevens": {
        "description": "Printapparaten (migratie 053): een bedienscherm met de HorecaPOS-app op Android\r\nwaar zelf een printer aan hangt (Bluetooth, USB of ingebouwd), bv. een handterminal\r\nmet een mobiele bonprinter op het terras, of een Sunmi als bedienscherm.\r\n\r\nDe kassaserver kan zo'n printer niet zelf bereiken. Het apparaat haalt daarom zijn\r\nbonnen op bij de kassa (GET /api/printapparaat/opdrachten, wacht tot er iets is)\r\nen meldt daarna of het printen lukte. Geen open poort op het apparaat nodig, en het\r\nwerkt ook als het apparaat via wifi een ander IP-adres krijgt.\r\n\r\nAanmelden doet een beheerder op het apparaat zelf (Instellingen → Printers →\r\n\"Dit apparaat als printapparaat\"). Het apparaat krijgt een eigen sleutel; de kassa\r\nbewaart alleen de hash.\r\n\r\nOpdrachten staan alleen in het geheugen. Lukt het niet binnen de tijd (apparaat uit,\r\nbuiten bereik), dan mislukt het printen en gaat een werkbon naar de printwachtrij,\r\nnet als bij een netwerkprinter die uit staat.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "laatstGezien": {
            "type": "string",
            "nullable": true,
            "description": "laatst opgehaald (ISO) of null"
          },
          "verbonden": {
            "type": "boolean",
            "description": "haalt het nu bonnen op (laatste minuut)?"
          }
        },
        "required": [
          "id",
          "naam",
          "platform",
          "laatstGezien",
          "verbonden"
        ]
      },
      "PrinterInvoer": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "poort": {
            "type": "number"
          },
          "breedte": {
            "type": "number"
          },
          "taal": {
            "type": "string",
            "description": "Taal van de werkbon: 'medewerker' (taal van wie bestelt) of een vaste taal (nl, de, en ...); weglaten = niet wijzigen."
          },
          "verbinding": {
            "type": "string",
            "description": "Hoe de printer aangesloten is (migratie 053); weglaten = netwerk (de oude manier)."
          },
          "adres": {
            "type": "string",
            "description": "usb / serieel / bluetooth / systeem: poort, adres of printernaam"
          },
          "baud": {
            "type": "number",
            "description": "serieel: snelheid (baud), standaard 9600"
          },
          "protocol": {
            "type": "string",
            "description": "escpos (standaard) of star"
          },
          "apparaat": {
            "type": "string",
            "nullable": true,
            "description": "id van het printapparaat (Android-bedienscherm) waar de printer aan hangt; null/leeg = de kassaserver"
          }
        }
      },
      "PrinterZoekResultaat": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "android",
              "windows",
              "linux",
              "macos",
              "anders"
            ]
          },
          "gevonden": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GevondenPrinter"
            }
          },
          "verbindingen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "serieel",
                "netwerk",
                "bluetooth",
                "usb",
                "systeem",
                "ingebouwd"
              ]
            },
            "description": "wat hier kan: welke verbindingen deze kassa(server) zelf kan gebruiken"
          },
          "melding": {
            "type": "string"
          }
        },
        "required": [
          "platform",
          "gevonden",
          "verbindingen"
        ]
      },
      "RapportBonGegevens": {
        "description": "Gegevens van een X- of Z-rapport, zoals de server ze samenstelt.",
        "type": "object",
        "properties": {
          "vanaf": {
            "type": "string"
          },
          "tot": {
            "type": "string"
          },
          "aantalBonnen": {
            "type": "number"
          },
          "omzetIncl": {
            "type": "number"
          },
          "perBtw": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "percentage": {
                  "type": "number"
                },
                "basis": {
                  "type": "number"
                },
                "btw": {
                  "type": "number"
                },
                "totaal": {
                  "type": "number"
                }
              },
              "required": [
                "code",
                "percentage",
                "basis",
                "btw",
                "totaal"
              ]
            }
          },
          "perBetaalwijze": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "methode": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                },
                "bedrag": {
                  "type": "number"
                },
                "fooi": {
                  "type": "number"
                }
              },
              "required": [
                "methode",
                "aantal",
                "bedrag",
                "fooi"
              ]
            }
          },
          "perGroep": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "groep": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                },
                "omzet": {
                  "type": "number"
                }
              },
              "required": [
                "groep",
                "aantal",
                "omzet"
              ]
            }
          },
          "aantalStornos": {
            "type": "number"
          },
          "retour": {
            "type": "object",
            "properties": {
              "aantal": {
                "type": "number"
              },
              "bedrag": {
                "type": "number"
              }
            },
            "required": [
              "aantal",
              "bedrag"
            ],
            "description": "Retouren (creditbonnen) in de periode; bedrag is negatief en zit al in de omzet."
          },
          "gasten": {
            "type": "number",
            "description": "aantal gasten (personen) op de afgerekende bestellingen"
          },
          "kortingen": {
            "type": "object",
            "properties": {
              "aantal": {
                "type": "number"
              },
              "bedrag": {
                "type": "number"
              }
            },
            "required": [
              "aantal",
              "bedrag"
            ],
            "description": "kortingen in de periode; bedrag is negatief en zit al in de omzet"
          },
          "cadeaubonnen": {
            "type": "object",
            "properties": {
              "aantal": {
                "type": "number"
              },
              "bedrag": {
                "type": "number"
              }
            },
            "required": [
              "aantal",
              "bedrag"
            ],
            "description": "verkochte cadeaubonnen (migratie 026): geen omzet, wel ontvangen geld"
          },
          "opRekening": {
            "type": "object",
            "properties": {
              "ontvangen": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "methode": {
                      "type": "string"
                    },
                    "aantal": {
                      "type": "number"
                    },
                    "bedrag": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "methode",
                    "aantal",
                    "bedrag"
                  ]
                }
              }
            },
            "required": [
              "ontvangen"
            ],
            "description": "op rekening (migratie 085): facturen die in de zaak betaald zijn (geen omzet; de omzet was er bij de verkoop)"
          },
          "valuta": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                },
                "valutaBedrag": {
                  "type": "number"
                },
                "bedrag": {
                  "type": "number"
                },
                "wisselgeld": {
                  "type": "number"
                }
              },
              "required": [
                "code",
                "aantal",
                "valutaBedrag",
                "bedrag",
                "wisselgeld"
              ]
            },
            "description": "Vreemde valuta (migratie 116): per munt wat de gasten gaven (centen in die munt), in euro afgerekend, en het wisselgeld in euro."
          },
          "kas": {
            "type": "object",
            "properties": {
              "startgeld": {
                "type": "number"
              },
              "contantOntvangen": {
                "type": "number"
              },
              "verwacht": {
                "type": "number"
              },
              "inLade": {
                "type": "number",
                "description": "kasbeheer: geld in/uit de lade buiten verkopen om (ontbreekt bij oude rapporten)"
              },
              "uitLade": {
                "type": "number"
              },
              "mutaties": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Kasmutatie"
                }
              },
              "wisselgeldValuta": {
                "type": "number",
                "description": "vreemde valuta (migratie 116): wisselgeld in euro uit de lade"
              }
            },
            "required": [
              "startgeld",
              "contantOntvangen",
              "verwacht"
            ]
          },
          "z": {
            "type": "object",
            "properties": {
              "nummer": {
                "type": "number"
              },
              "telling": {
                "type": "number",
                "nullable": true
              },
              "verschil": {
                "type": "number",
                "nullable": true
              },
              "startgeldVolgende": {
                "type": "number"
              },
              "afgeslotenDoor": {
                "type": "string"
              },
              "telDetail": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "waarde": {
                      "type": "number"
                    },
                    "aantal": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "waarde",
                    "aantal"
                  ]
                },
                "description": "telling per munt/biljet (waarde in centen), als de telhulp is gebruikt"
              }
            },
            "required": [
              "nummer",
              "telling",
              "verschil",
              "startgeldVolgende",
              "afgeslotenDoor"
            ]
          },
          "fiscaleRegels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "GKS 2.0 (België): controlegegevens van de zwarte doos voor dit rapport."
          },
          "fooiVerdeling": {
            "type": "object",
            "properties": {
              "methode": {
                "type": "string",
                "enum": [
                  "eigen",
                  "uren",
                  "gelijk"
                ]
              },
              "totaal": {
                "type": "number"
              },
              "regels": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "naam": {
                      "type": "string"
                    },
                    "bedrag": {
                      "type": "number"
                    },
                    "uren": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "naam",
                    "bedrag"
                  ]
                }
              },
              "opmerking": {
                "type": "string"
              }
            },
            "required": [
              "methode",
              "totaal",
              "regels"
            ],
            "description": "Fooi per medewerker (migratie 037); ontbreekt als het uit staat of er geen fooi is."
          }
        },
        "required": [
          "vanaf",
          "tot",
          "aantalBonnen",
          "omzetIncl",
          "perBtw",
          "perBetaalwijze",
          "perGroep",
          "aantalStornos"
        ]
      },
      "Regel": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "Rekening": {
        "type": "object",
        "properties": {
          "sleutel": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "standaard": {
            "type": "string"
          },
          "rekening": {
            "type": "string"
          }
        },
        "required": [
          "sleutel",
          "naam",
          "standaard",
          "rekening"
        ]
      },
      "RekeningKlant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "afnemer": {
            "$ref": "#/components/schemas/FactuurAfnemer"
          },
          "limiet": {
            "type": "number",
            "nullable": true,
            "description": "centen; null = geen grens"
          },
          "betaaltermijn": {
            "type": "number",
            "nullable": true,
            "description": "dagen; null = de betaaltermijn van de facturen"
          },
          "versturen": {
            "type": "boolean"
          },
          "notitie": {
            "type": "string",
            "nullable": true
          },
          "actief": {
            "type": "boolean"
          },
          "openstaand": {
            "type": "number",
            "description": "nu nog open (centen) en op hoeveel facturen"
          },
          "aantalOpen": {
            "type": "number"
          },
          "teLaat": {
            "type": "number",
            "description": "waarvan over de vervaldatum"
          },
          "tegoed": {
            "type": "number",
            "description": "geld vooraf op de rekening gezet en nog niet gebruikt (centen; migratie 131)"
          },
          "verzamelfactuur": {
            "type": "boolean",
            "description": "Verzamelfactuur (migratie 132): verkopen op rekening eerst als openstaande post; later één factuur voor alle\nposten (bv. aan het eind van de maand). false = een factuur per verkoop (zoals altijd)."
          },
          "nietGefactureerd": {
            "type": "number",
            "description": "waarvan nog niet op een factuur (posten, centen) en hoeveel posten"
          },
          "aantalPosten": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "afnemer",
          "limiet",
          "betaaltermijn",
          "versturen",
          "notitie",
          "actief",
          "openstaand",
          "aantalOpen",
          "teLaat",
          "tegoed",
          "verzamelfactuur",
          "nietGefactureerd",
          "aantalPosten"
        ]
      },
      "RekeningPost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "klantId": {
            "type": "string"
          },
          "ticketId": {
            "type": "string"
          },
          "bonnummer": {
            "type": "number",
            "nullable": true
          },
          "soort": {
            "type": "string",
            "enum": [
              "verkoop",
              "retour"
            ],
            "description": "retour = een creditbon terug naar de rekening (negatief bedrag)"
          },
          "bedrag": {
            "type": "number"
          },
          "ontvangen": {
            "type": "number"
          },
          "openstaand": {
            "type": "number"
          },
          "factuur": {
            "type": "string",
            "nullable": true,
            "description": "op deze verzamelfactuur (nummer); null = nog niet gefactureerd"
          },
          "op": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "klantId",
          "ticketId",
          "bonnummer",
          "soort",
          "bedrag",
          "ontvangen",
          "openstaand",
          "factuur",
          "op"
        ]
      },
      "ResOntvangen": {
        "type": "object",
        "properties": {
          "nieuw": {
            "type": "number"
          },
          "bijgewerkt": {
            "type": "number"
          },
          "opTafel": {
            "type": "number"
          },
          "fouten": {
            "type": "number"
          }
        },
        "required": [
          "nieuw",
          "bijgewerkt",
          "opTafel",
          "fouten"
        ]
      },
      "ResPlatform": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "eigen",
              "thefork",
              "formitable",
              "zenchef",
              "resengo",
              "opentable",
              "planpanther",
              "restomanager",
              "aqqo"
            ]
          },
          "naam": {
            "type": "string"
          },
          "landen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "NL",
                "BE"
              ]
            }
          },
          "manier": {
            "type": "string",
            "enum": [
              "webhook",
              "api"
            ],
            "description": "api = de kassa haalt zelf op; webhook = het platform (of een koppeldienst) stuurt naar de kassa"
          },
          "velden": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResPlatformVeld"
            }
          },
          "noot": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "naam",
          "landen",
          "manier",
          "velden",
          "noot"
        ]
      },
      "ResPlatformBron": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "eigen",
              "thefork",
              "formitable",
              "zenchef",
              "resengo",
              "opentable",
              "planpanther",
              "restomanager",
              "aqqo"
            ]
          },
          "naam": {
            "type": "string"
          },
          "actief": {
            "type": "boolean"
          },
          "instellingen": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "geheimIngevuld": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "per geheim veld: is het ingevuld (de waarde zelf nooit)"
          },
          "heeftSleutel": {
            "type": "boolean"
          },
          "laatsteSync": {
            "type": "string",
            "nullable": true
          },
          "laatsteFout": {
            "type": "string",
            "nullable": true
          },
          "aantal": {
            "type": "number",
            "description": "reserveringen van dit platform vanaf vandaag"
          }
        },
        "required": [
          "id",
          "platform",
          "naam",
          "actief",
          "instellingen",
          "geheimIngevuld",
          "heeftSleutel",
          "laatsteSync",
          "laatsteFout",
          "aantal"
        ]
      },
      "ResPlatformVeld": {
        "type": "object",
        "properties": {
          "sleutel": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "geheim": {
            "type": "boolean",
            "description": "geheim: wordt nooit teruggestuurd (alleen \"ingevuld\")"
          },
          "standaard": {
            "type": "string",
            "description": "standaardwaarde (bv. een adres)"
          }
        },
        "required": [
          "sleutel",
          "label"
        ]
      },
      "ReserverenOnline": {
        "description": "Online reserveren (webshop) met de regels van de kassa (migratie 061).",
        "type": "object",
        "properties": {
          "maxPersonen": {
            "type": "number"
          },
          "vooruitDagen": {
            "type": "number"
          },
          "slotMin": {
            "type": "number",
            "description": "tijdslot in minuten: 15, 30 of 60"
          },
          "minVoorafMin": {
            "type": "number",
            "description": "minstens zoveel minuten van tevoren"
          },
          "tijden": {
            "$ref": "#/components/schemas/WeekTijden"
          }
        },
        "required": [
          "maxPersonen",
          "vooruitDagen",
          "slotMin",
          "minVoorafMin",
          "tijden"
        ]
      },
      "ReviewKoppeling": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "google",
              "trustpilot"
            ]
          },
          "manier": {
            "type": "string",
            "enum": [
              "oauth",
              "places",
              "business",
              "publiek"
            ]
          },
          "actief": {
            "type": "boolean"
          },
          "instellingen": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "geheimIngevuld": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "per geheim veld: ingevuld (de waarde nooit)"
          },
          "inEnv": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "velden die al in .env staan (die ziet de beheerder niet)"
          },
          "verbonden": {
            "type": "boolean"
          },
          "locaties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "titel": {
                  "type": "string"
                }
              },
              "required": [
                "naam",
                "titel"
              ]
            },
            "description": "Google: vestigingen in het bedrijfsprofiel om uit te kiezen"
          },
          "kanAntwoorden": {
            "type": "boolean"
          },
          "laatsteSync": {
            "type": "string",
            "nullable": true
          },
          "laatsteFout": {
            "type": "string",
            "nullable": true
          },
          "redirectUri": {
            "type": "string",
            "nullable": true
          },
          "bron": {
            "type": "string",
            "enum": [
              "eigen",
              "portaal"
            ],
            "description": "'portaal' = app van de leverancier (inloggen via het klantportaal), 'eigen' = eigen app of sleutel"
          },
          "wachtOpInlog": {
            "type": "boolean",
            "description": "de kassa wacht op het inloggen (via het portaal)"
          }
        },
        "required": [
          "id",
          "platform",
          "manier",
          "actief",
          "instellingen",
          "geheimIngevuld",
          "inEnv",
          "verbonden",
          "locaties",
          "kanAntwoorden",
          "laatsteSync",
          "laatsteFout",
          "redirectUri",
          "bron",
          "wachtOpInlog"
        ]
      },
      "ReviewLink": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string",
            "enum": [
              "Google",
              "Trustpilot"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "naam",
          "url"
        ]
      },
      "ReviewManierDef": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "oauth",
              "places",
              "business",
              "publiek"
            ]
          },
          "naam": {
            "type": "string"
          },
          "antwoorden": {
            "type": "boolean",
            "description": "antwoorden kan via de kassa"
          },
          "noot": {
            "type": "string"
          },
          "wie": {
            "type": "string",
            "description": "wie wat regelt: de leverancier (een keer voor alle kassa's) of de zaak zelf"
          },
          "portaal": {
            "type": "string",
            "nullable": true,
            "description": "uitleg via de app van de leverancier (inloggen via het klantportaal); null = kan niet via het portaal"
          }
        },
        "required": [
          "code",
          "naam",
          "antwoorden",
          "noot",
          "wie",
          "portaal"
        ]
      },
      "ReviewPlatformDef": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "google",
              "trustpilot"
            ]
          },
          "naam": {
            "type": "string"
          },
          "manieren": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewManierDef"
            }
          },
          "velden": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewVeld"
            }
          },
          "aanmelden": {
            "type": "string",
            "description": "waar de zaak zich zelf aanmeldt (account of bedrijfsprofiel)"
          },
          "abonnementen": {
            "type": "string",
            "nullable": true,
            "description": "abonnementen van het platform (null = gratis)"
          }
        },
        "required": [
          "code",
          "naam",
          "manieren",
          "velden",
          "aanmelden",
          "abonnementen"
        ]
      },
      "ReviewRegel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "google",
              "trustpilot"
            ]
          },
          "auteur": {
            "type": "string"
          },
          "sterren": {
            "type": "number",
            "nullable": true
          },
          "titel": {
            "type": "string",
            "nullable": true
          },
          "tekst": {
            "type": "string",
            "nullable": true
          },
          "taal": {
            "type": "string",
            "nullable": true
          },
          "geplaatstOp": {
            "type": "string",
            "nullable": true
          },
          "antwoord": {
            "type": "string",
            "nullable": true
          },
          "antwoordOp": {
            "type": "string",
            "nullable": true
          },
          "gelezen": {
            "type": "boolean"
          },
          "kanAntwoorden": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "platform",
          "auteur",
          "sterren",
          "titel",
          "tekst",
          "taal",
          "geplaatstOp",
          "antwoord",
          "antwoordOp",
          "gelezen",
          "kanAntwoorden"
        ]
      },
      "ReviewVeld": {
        "type": "object",
        "properties": {
          "sleutel": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "geheim": {
            "type": "boolean"
          },
          "manieren": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "oauth",
                "places",
                "business",
                "publiek"
              ]
            },
            "description": "alleen bij deze manier(en)"
          },
          "env": {
            "type": "string",
            "description": "kan ook in .env (dan ziet de beheerder het niet)"
          },
          "alleenEigen": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "alleen nodig met een eigen app of sleutel (niet via de app van de leverancier)"
          }
        },
        "required": [
          "sleutel",
          "label",
          "manieren"
        ]
      },
      "Rij": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "personen": {
            "type": "number"
          },
          "tijdstip": {
            "type": "string"
          },
          "datum": {
            "type": "string"
          },
          "tijd": {
            "type": "string"
          },
          "duurMin": {
            "type": "number"
          },
          "tafelId": {
            "type": "string",
            "nullable": true
          },
          "tafelNaam": {
            "type": "string",
            "nullable": true
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "klantId": {
            "type": "string",
            "nullable": true
          },
          "gemaildOp": {
            "type": "string",
            "nullable": true
          },
          "platformId": {
            "type": "string",
            "nullable": true,
            "description": "reservering van een platform (migratie 078): id en naam (bv. TheFork)"
          },
          "platformNaam": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "naam",
          "telefoon",
          "email",
          "personen",
          "tijdstip",
          "datum",
          "tijd",
          "duurMin",
          "tafelId",
          "tafelNaam",
          "opmerking",
          "status",
          "bestellingId",
          "klantId",
          "gemaildOp"
        ]
      },
      "Rij2": {
        "type": "object",
        "additionalProperties": {}
      },
      "Rit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "bezorgerId": {
            "type": "string",
            "nullable": true
          },
          "bezorger": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "klaar",
              "onderweg",
              "terug",
              "afgerekend"
            ]
          },
          "wisselgeld": {
            "type": "number"
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "vertrokkenOp": {
            "type": "string",
            "nullable": true
          },
          "terugOp": {
            "type": "string",
            "nullable": true
          },
          "afgerekendOp": {
            "type": "string",
            "nullable": true
          },
          "contantVerwacht": {
            "type": "number",
            "nullable": true
          },
          "contantGeteld": {
            "type": "number",
            "nullable": true
          },
          "verschil": {
            "type": "number",
            "nullable": true
          },
          "locatie": {
            "type": "object",
            "properties": {
              "lat": {
                "type": "number"
              },
              "lon": {
                "type": "number"
              },
              "op": {
                "type": "string"
              }
            },
            "required": [
              "lat",
              "lon",
              "op"
            ],
            "nullable": true
          },
          "afstandKm": {
            "type": "number",
            "nullable": true,
            "description": "ritplanning (migratie 098): geplande afstand en reistijd (heen, adressen, terug)"
          },
          "reistijdMin": {
            "type": "number",
            "nullable": true
          },
          "viaApp": {
            "type": "boolean",
            "description": "bezorgersapp (migratie 099): de bezorger heeft de bestellingen zelf opgepakt in de app"
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stop"
            }
          },
          "contantTeInnen": {
            "type": "number",
            "description": "contant te innen (nog niet afgerekend), voor de kasafdracht"
          }
        },
        "required": [
          "id",
          "nummer",
          "bezorgerId",
          "bezorger",
          "status",
          "wisselgeld",
          "aangemaaktOp",
          "vertrokkenOp",
          "terugOp",
          "afgerekendOp",
          "contantVerwacht",
          "contantGeteld",
          "verschil",
          "locatie",
          "afstandKm",
          "reistijdMin",
          "viaApp",
          "stops",
          "contantTeInnen"
        ]
      },
      "ScanKeuzes": {
        "type": "object",
        "properties": {
          "product": {
            "type": "boolean"
          },
          "kortingscode": {
            "type": "boolean"
          },
          "klantenkaart": {
            "type": "boolean"
          },
          "cadeaubon": {
            "type": "boolean"
          }
        },
        "required": [
          "product",
          "kortingscode",
          "klantenkaart",
          "cadeaubon"
        ]
      },
      "ScannerInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "product": {
            "type": "boolean"
          },
          "kortingscode": {
            "type": "boolean"
          },
          "klantenkaart": {
            "type": "boolean"
          },
          "cadeaubon": {
            "type": "boolean"
          }
        },
        "required": [
          "aan",
          "product",
          "kortingscode",
          "klantenkaart",
          "cadeaubon"
        ]
      },
      "SignaalRegel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "soort": {
            "type": "string",
            "enum": [
              "fraude",
              "afwijking"
            ]
          },
          "regel": {
            "type": "string"
          },
          "tekst": {
            "type": "string"
          },
          "gebruikerId": {
            "type": "string",
            "nullable": true
          },
          "medewerker": {
            "type": "string",
            "nullable": true
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "waarde": {
            "type": "number",
            "nullable": true
          },
          "grens": {
            "type": "number",
            "nullable": true
          },
          "details": {
            "type": "object",
            "additionalProperties": {}
          },
          "gemeldOp": {
            "type": "string"
          },
          "kanalen": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fouten": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "afgehandeldOp": {
            "type": "string",
            "nullable": true
          },
          "afgehandeldDoor": {
            "type": "string",
            "nullable": true
          },
          "notitie": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "soort",
          "regel",
          "tekst",
          "gebruikerId",
          "medewerker",
          "bestellingId",
          "waarde",
          "grens",
          "details",
          "gemeldOp",
          "kanalen",
          "fouten",
          "afgehandeldOp",
          "afgehandeldDoor",
          "notitie"
        ]
      },
      "SignaleringBeheer": {
        "type": "object",
        "properties": {
          "migratie": {
            "type": "boolean"
          },
          "instelling": {
            "$ref": "#/components/schemas/SignaleringInstelling"
          },
          "geheimen": {
            "type": "object",
            "properties": {
              "ntfyToken": {
                "type": "boolean"
              },
              "pushoverToken": {
                "type": "boolean"
              },
              "telegramToken": {
                "type": "boolean"
              },
              "webhookGeheim": {
                "type": "boolean"
              }
            },
            "required": [
              "ntfyToken",
              "pushoverToken",
              "telegramToken",
              "webhookGeheim"
            ],
            "description": "welke geheimen ingevuld zijn (de waarde komt nooit terug)"
          },
          "mail": {
            "type": "boolean"
          },
          "sms": {
            "type": "boolean"
          },
          "laatstOp": {
            "type": "string",
            "nullable": true
          },
          "open": {
            "type": "number"
          }
        },
        "required": [
          "migratie",
          "instelling",
          "geheimen",
          "mail",
          "sms",
          "laatstOp",
          "open"
        ]
      },
      "SignaleringInstelling": {
        "type": "object",
        "properties": {
          "fraudeAan": {
            "type": "boolean"
          },
          "afwijkingAan": {
            "type": "boolean"
          },
          "fraude": {
            "$ref": "#/components/schemas/FraudeRegels"
          },
          "afwijking": {
            "$ref": "#/components/schemas/AfwijkingRegels"
          },
          "kanalen": {
            "$ref": "#/components/schemas/Kanalen"
          }
        },
        "required": [
          "fraudeAan",
          "afwijkingAan",
          "fraude",
          "afwijking",
          "kanalen"
        ]
      },
      "SpaarPlatformDef": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "piggy",
              "joyn"
            ]
          },
          "naam": {
            "type": "string"
          },
          "landen": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "NL",
                "BE"
              ]
            }
          },
          "velden": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaarVeld"
            }
          },
          "noot": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "naam",
          "landen",
          "velden",
          "noot"
        ]
      },
      "SpaarVeld": {
        "type": "object",
        "properties": {
          "sleutel": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "geheim": {
            "type": "boolean"
          },
          "manier": {
            "type": "string",
            "enum": [
              "api",
              "qr"
            ],
            "description": "alleen nodig bij deze manier"
          }
        },
        "required": [
          "sleutel",
          "label"
        ]
      },
      "Stop": {
        "type": "object",
        "properties": {
          "bestellingId": {
            "type": "string"
          },
          "nummer": {
            "type": "number",
            "description": "bonnummer in de kassa"
          },
          "bron": {
            "type": "string",
            "enum": [
              "thuisbezorgd",
              "webshop",
              "kassa",
              "platform"
            ],
            "description": "waar de bestelling vandaan komt"
          },
          "klantNummer": {
            "type": "string",
            "nullable": true,
            "description": "nummer dat de klant kent (webshop, Thuisbezorgd, Uber Eats ...)"
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "adres": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "huisnummer": {
            "type": "string",
            "nullable": true
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "tijd": {
            "type": "string",
            "nullable": true,
            "description": "gewenste tijd (ISO)"
          },
          "totaal": {
            "type": "number"
          },
          "teInnen": {
            "type": "number",
            "description": "nog te innen aan de deur (centen)"
          },
          "ritId": {
            "type": "string",
            "nullable": true
          },
          "volgorde": {
            "type": "number",
            "nullable": true
          },
          "bezorgdOp": {
            "type": "string",
            "nullable": true
          },
          "betaling": {
            "type": "string",
            "enum": [
              "contant",
              "pin",
              "vooraf"
            ],
            "nullable": true
          },
          "volgCode": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "bestellingId",
          "nummer",
          "bron",
          "klantNummer",
          "naam",
          "telefoon",
          "adres",
          "postcode",
          "huisnummer",
          "opmerking",
          "tijd",
          "totaal",
          "teInnen",
          "ritId",
          "volgorde",
          "bezorgdOp",
          "betaling",
          "volgCode"
        ]
      },
      "TabletRij": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "online": {
            "type": "boolean"
          },
          "laatstGezien": {
            "type": "string",
            "nullable": true
          },
          "scherm": {
            "type": "string",
            "enum": [
              "muziek",
              "camera"
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "naam",
          "online",
          "laatstGezien",
          "scherm"
        ]
      },
      "TafelGroep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "groepNummer": {
            "type": "number"
          },
          "groepNaam": {
            "type": "string",
            "nullable": true
          },
          "totaal": {
            "type": "number"
          },
          "aantalRegels": {
            "type": "number"
          },
          "gasten": {
            "type": "number",
            "description": "aantal personen in deze groep"
          },
          "geopendOp": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "nummer",
          "groepNummer",
          "groepNaam",
          "totaal",
          "aantalRegels",
          "gasten",
          "geopendOp"
        ]
      },
      "TafelInvoer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "naam": {
            "type": "string"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "breedte": {
            "type": "number"
          },
          "hoogte": {
            "type": "number"
          },
          "vorm": {
            "type": "string"
          },
          "plaatsen": {
            "type": "number"
          }
        }
      },
      "TapBron": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "merk": {
            "type": "string"
          },
          "koppeling": {
            "type": "string",
            "enum": [
              "webhook",
              "map",
              "serieel",
              "tcp",
              "kegboard"
            ]
          },
          "instellingen": {
            "$ref": "#/components/schemas/TapInstellingen"
          },
          "actief": {
            "type": "boolean"
          },
          "heeftSleutel": {
            "type": "boolean"
          },
          "laatsteTap": {
            "type": "string",
            "nullable": true
          },
          "laatsteFout": {
            "type": "string",
            "nullable": true
          },
          "verbonden": {
            "type": "boolean"
          },
          "koppel": {
            "type": "object",
            "properties": {
              "apparaat": {
                "type": "string",
                "nullable": true
              },
              "status": {
                "type": "string",
                "enum": [
                  "wacht",
                  "geweigerd",
                  "toegestaan"
                ],
                "nullable": true
              },
              "ip": {
                "type": "string",
                "nullable": true
              },
              "gezien": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "apparaat",
              "status",
              "ip",
              "gezien"
            ],
            "nullable": true,
            "description": "Kegboard: koppelen (bord, status, IP, laatst gezien) en wat het bord meldt (firmware, meters, relais)"
          },
          "bord": {
            "allOf": [
              {
                "$ref": "#/components/schemas/KegboardStatus"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "id",
          "naam",
          "merk",
          "koppeling",
          "instellingen",
          "actief",
          "heeftSleutel",
          "laatsteTap",
          "laatsteFout",
          "verbonden",
          "koppel",
          "bord"
        ]
      },
      "TapInstellingen": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "description": "tcp: adres van de tapcomputer (leeg = de kassa luistert zelf op de poort)"
          },
          "poort": {
            "type": "number"
          },
          "com": {
            "type": "string",
            "description": "serieel: COM3 of /dev/ttyUSB0"
          },
          "baud": {
            "type": "number"
          },
          "lijn": {
            "type": "string",
            "enum": [
              "8N1",
              "7E1",
              "7O1"
            ]
          },
          "framing": {
            "type": "string",
            "enum": [
              "regel",
              "stxetx"
            ],
            "description": "regel = één bericht per regel (CR/LF); stxetx = STX … ETX (met optioneel een XOR-byte erna)"
          },
          "xor": {
            "type": "boolean"
          },
          "ack": {
            "type": "boolean",
            "description": "ACK (06) na een goed bericht, NAK (15) na een fout bericht terugsturen"
          },
          "patroon": {
            "type": "string",
            "description": "patroon (reguliere expressie) met benoemde delen: kraan of plu, ml/cl/liter/porties, tafel, bediening, id, terminal"
          },
          "map": {
            "type": "string",
            "description": "map: waar de CSV-bestanden staan (ze gaan na het lezen naar de submap \"verwerkt\")"
          },
          "scheiding": {
            "type": "string",
            "description": "CSV: scheidingsteken (; of ,)"
          },
          "vrijgaveCommando": {
            "type": "string",
            "description": "Gedoseerd tappen (tcp/serieel): opdracht om een kraan vrij te geven, met {kraan}, {ml},\r\n{porties}, {sec} en {id}; wordt verstuurd in de berichtvorm (regel of STX/ETX + XOR)."
          },
          "stopCommando": {
            "type": "string",
            "description": "idem om een vrijgegeven kraan weer te sluiten (bv. storno); leeg = niet sturen"
          },
          "vrijgaveUrl": {
            "type": "string",
            "description": "gedoseerd tappen (webhook-bron): adres van de tapcomputer waar de kassa de vrijgave naartoe POST"
          },
          "kegIdleSec": {
            "type": "number",
            "description": "Kegboard: na zoveel seconden zonder flow sluit de kraan (max_idle_ms; standaard 30)"
          }
        }
      },
      "TapKraan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bronId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "naam": {
            "type": "string",
            "nullable": true
          },
          "artikelId": {
            "type": "string",
            "nullable": true
          },
          "artikelNaam": {
            "type": "string",
            "nullable": true
          },
          "modus": {
            "type": "string",
            "enum": [
              "portie",
              "liter"
            ]
          },
          "portieMl": {
            "type": "number"
          },
          "drempel": {
            "type": "number"
          },
          "vrijgave": {
            "type": "boolean",
            "description": "gedoseerd tappen: pas open na aanslaan op de kassa"
          },
          "relais": {
            "type": "number",
            "nullable": true,
            "description": "Kegboard: relais (magneetventiel)"
          },
          "vrijgaveSec": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "bronId",
          "code",
          "naam",
          "artikelId",
          "artikelNaam",
          "modus",
          "portieMl",
          "drempel",
          "vrijgave",
          "relais",
          "vrijgaveSec"
        ]
      },
      "TapMerk": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "markt": {
            "type": "string",
            "description": "waar het in de markt is (NL/BE bevestigd of elders)"
          },
          "soort": {
            "type": "string",
            "enum": [
              "boeken",
              "analyse"
            ],
            "description": "boeken = taps op de bon; analyse = vergelijkt getapt met verkocht (leest de verkopen uit de kassa)"
          },
          "koppeling": {
            "type": "string",
            "enum": [
              "webhook",
              "map",
              "serieel",
              "tcp",
              "kegboard"
            ]
          },
          "instellingen": {
            "$ref": "#/components/schemas/TapInstellingen"
          },
          "noot": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "naam",
          "markt",
          "soort",
          "koppeling",
          "instellingen",
          "noot"
        ]
      },
      "TapOverzichtRij": {
        "type": "object",
        "properties": {
          "kraan": {
            "type": "string"
          },
          "kraanNaam": {
            "type": "string",
            "nullable": true
          },
          "artikelNaam": {
            "type": "string",
            "nullable": true
          },
          "taps": {
            "type": "number"
          },
          "getaptMl": {
            "type": "number"
          },
          "geboektMl": {
            "type": "number"
          },
          "afgekeurdMl": {
            "type": "number"
          },
          "openMl": {
            "type": "number"
          },
          "geannuleerdMl": {
            "type": "number",
            "description": "op een bon gezet maar daarna geannuleerd (storno): wel getapt, niet verkocht"
          },
          "afgekeurdPerReden": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          }
        },
        "required": [
          "kraan",
          "kraanNaam",
          "artikelNaam",
          "taps",
          "getaptMl",
          "geboektMl",
          "afgekeurdMl",
          "openMl",
          "geannuleerdMl",
          "afgekeurdPerReden"
        ]
      },
      "TapRij": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bronId": {
            "type": "string",
            "nullable": true
          },
          "bronNaam": {
            "type": "string",
            "nullable": true
          },
          "kraan": {
            "type": "string"
          },
          "kraanNaam": {
            "type": "string",
            "nullable": true
          },
          "artikelId": {
            "type": "string",
            "nullable": true
          },
          "artikelNaam": {
            "type": "string",
            "nullable": true
          },
          "ml": {
            "type": "number",
            "nullable": true
          },
          "porties": {
            "type": "number",
            "nullable": true
          },
          "tafel": {
            "type": "string",
            "nullable": true
          },
          "bediening": {
            "type": "string",
            "nullable": true
          },
          "getaptOp": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "geboekt",
              "afgekeurd"
            ]
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "reden": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "bronId",
          "bronNaam",
          "kraan",
          "kraanNaam",
          "artikelId",
          "artikelNaam",
          "ml",
          "porties",
          "tafel",
          "bediening",
          "getaptOp",
          "status",
          "bestellingId",
          "reden"
        ]
      },
      "TapVrijgave": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kraan": {
            "type": "string",
            "nullable": true
          },
          "kraanNaam": {
            "type": "string",
            "nullable": true
          },
          "artikelNaam": {
            "type": "string",
            "nullable": true
          },
          "tafel": {
            "type": "string",
            "nullable": true
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "ml": {
            "type": "number"
          },
          "getaptMl": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "klaar",
              "fout",
              "actief",
              "verzonden",
              "wachtend",
              "verlopen",
              "stoppen",
              "gestopt"
            ]
          },
          "fout": {
            "type": "string",
            "nullable": true
          },
          "aangemaaktOp": {
            "type": "string"
          },
          "geldigTot": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kraan",
          "kraanNaam",
          "artikelNaam",
          "tafel",
          "bestellingId",
          "ml",
          "getaptMl",
          "status",
          "fout",
          "aangemaaktOp",
          "geldigTot"
        ]
      },
      "Tarief": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "percentage": {
            "type": "number"
          },
          "omschrijving": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "percentage",
          "omschrijving"
        ]
      },
      "TbOverzicht": {
        "type": "object",
        "properties": {
          "bestellingId": {
            "type": "string"
          },
          "nummer": {
            "type": "number"
          },
          "referentie": {
            "type": "string",
            "nullable": true
          },
          "levering": {
            "type": "string",
            "enum": [
              "afhalen",
              "bezorger_thuisbezorgd",
              "zelf_bezorgen"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "nieuw",
              "klaar",
              "onderweg",
              "in_bereiding",
              "bezorgd",
              "opgehaald"
            ]
          },
          "statusTekst": {
            "type": "string"
          },
          "bestellingStatus": {
            "type": "string",
            "enum": [
              "open",
              "betaald",
              "geannuleerd"
            ]
          },
          "klant": {
            "type": "object",
            "properties": {
              "naam": {
                "type": "string",
                "nullable": true
              },
              "telefoon": {
                "type": "string",
                "nullable": true
              },
              "maskeercode": {
                "type": "string",
                "nullable": true
              },
              "bedrijf": {
                "type": "string",
                "nullable": true
              },
              "adres": {
                "type": "string",
                "nullable": true
              },
              "notitie": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "naam",
              "telefoon",
              "maskeercode",
              "bedrijf",
              "adres",
              "notitie"
            ]
          },
          "bezorger": {
            "type": "object",
            "properties": {
              "naam": {
                "type": "string",
                "nullable": true
              },
              "telefoon": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "naam",
              "telefoon"
            ],
            "nullable": true
          },
          "klaarOm": {
            "type": "string",
            "nullable": true
          },
          "bezorgenOm": {
            "type": "string",
            "nullable": true
          },
          "betaalwijze": {
            "type": "string",
            "nullable": true
          },
          "onlineBetaald": {
            "type": "boolean"
          },
          "totaal": {
            "type": "number"
          },
          "notitieKeuken": {
            "type": "string",
            "nullable": true
          },
          "ontvangenOp": {
            "type": "string"
          },
          "regels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                },
                "opties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "opmerking": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "naam",
                "aantal",
                "opties",
                "opmerking"
              ]
            }
          },
          "tijdlijn": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "soort": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "nullable": true
                },
                "tekst": {
                  "type": "string"
                },
                "op": {
                  "type": "string"
                }
              },
              "required": [
                "soort",
                "code",
                "tekst",
                "op"
              ]
            }
          }
        },
        "required": [
          "bestellingId",
          "nummer",
          "referentie",
          "levering",
          "status",
          "statusTekst",
          "bestellingStatus",
          "klant",
          "bezorger",
          "klaarOm",
          "bezorgenOm",
          "betaalwijze",
          "onlineBetaald",
          "totaal",
          "notitieKeuken",
          "ontvangenOp",
          "regels",
          "tijdlijn"
        ]
      },
      "TeLaatInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "minuten": {
            "type": "number",
            "description": "zoveel minuten na de beloofde tijd nog niet klaar of onderweg = te laat"
          },
          "bericht": {
            "type": "string",
            "enum": [
              "uit",
              "automatisch",
              "vragen"
            ],
            "description": "excuusbericht aan de klant: uit, na bevestiging in de kassa, of automatisch"
          },
          "tegoed": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TeLaatTegoed"
              }
            ],
            "nullable": true,
            "description": "tegoedbon bij het excuus (kortingscode); null = geen"
          },
          "tekst": {
            "type": "string",
            "nullable": true,
            "description": "eigen tekst van het excuus; leeg = de standaardtekst. {naam}, {zaak}, {code}, {korting} en {geldig} worden ingevuld."
          }
        },
        "required": [
          "aan",
          "minuten",
          "bericht",
          "tegoed",
          "tekst"
        ]
      },
      "TeLaatMelding": {
        "description": "Een te late bestelling, zoals de kassa hem toont.",
        "type": "object",
        "properties": {
          "bestellingId": {
            "type": "string"
          },
          "bron": {
            "type": "string",
            "enum": [
              "thuisbezorgd",
              "webshop",
              "kassa"
            ]
          },
          "soort": {
            "type": "string",
            "enum": [
              "afhalen",
              "bezorgen"
            ]
          },
          "naam": {
            "type": "string",
            "nullable": true,
            "description": "naam van de klant, of de omschrijving van de bestelling"
          },
          "beloofdOp": {
            "type": "string"
          },
          "gemeldOp": {
            "type": "string"
          },
          "klaarOp": {
            "type": "string",
            "nullable": true,
            "description": "wanneer hij alsnog klaar of onderweg was (null = nog niet)"
          },
          "minuten": {
            "type": "number",
            "description": "minuten te laat: tot klaar, of tot nu"
          },
          "bericht": {
            "type": "string",
            "enum": [
              "verstuurd",
              "mislukt",
              "geen",
              "niet_mogelijk"
            ]
          },
          "berichtVia": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sms",
                "email"
              ]
            }
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "de tegoedcode die met het excuus meeging"
          },
          "afgehandeldOp": {
            "type": "string",
            "nullable": true
          },
          "kanBericht": {
            "type": "boolean",
            "description": "kan de kassa de klant een excuus sturen (telefoon of e-mail, en sms of mail ingesteld; niet bij Thuisbezorgd)?"
          }
        },
        "required": [
          "bestellingId",
          "bron",
          "soort",
          "naam",
          "beloofdOp",
          "gemeldOp",
          "klaarOp",
          "minuten",
          "bericht",
          "berichtVia",
          "code",
          "afgehandeldOp",
          "kanBericht"
        ]
      },
      "TeLaatTegoed": {
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "procent",
              "bedrag"
            ]
          },
          "waarde": {
            "type": "number",
            "description": "procent: 1-100; bedrag: centen"
          },
          "dagen": {
            "type": "number",
            "description": "zoveel dagen geldig (vanaf vandaag)"
          }
        },
        "required": [
          "soort",
          "waarde",
          "dagen"
        ]
      },
      "TelefonieBeheer": {
        "type": "object",
        "properties": {
          "migratie": {
            "type": "boolean"
          },
          "land": {
            "type": "string",
            "enum": [
              "NL",
              "BE"
            ]
          },
          "instelling": {
            "$ref": "#/components/schemas/TelefonieInstelling"
          },
          "sleutel": {
            "type": "string",
            "nullable": true,
            "description": "de sleutel van de webhook (de beheerder zet hem in de centrale of op het toestel)"
          },
          "amiWachtwoord": {
            "type": "boolean"
          },
          "adressen": {
            "type": "object",
            "properties": {
              "kassa": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "portaal": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "kassa",
              "portaal"
            ]
          },
          "verbindingen": {
            "type": "object",
            "properties": {
              "ami": {
                "type": "object",
                "properties": {
                  "verbonden": {
                    "type": "boolean"
                  },
                  "fout": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "verbonden",
                  "fout"
                ],
                "nullable": true
              },
              "fritzbox": {
                "type": "object",
                "properties": {
                  "verbonden": {
                    "type": "boolean"
                  },
                  "fout": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "verbonden",
                  "fout"
                ],
                "nullable": true
              },
              "modem": {
                "type": "object",
                "properties": {
                  "verbonden": {
                    "type": "boolean"
                  },
                  "fout": {
                    "type": "string",
                    "nullable": true
                  }
                },
                "required": [
                  "verbonden",
                  "fout"
                ],
                "nullable": true
              }
            },
            "required": [
              "ami",
              "fritzbox",
              "modem"
            ]
          },
          "laatste": {
            "type": "object",
            "properties": {
              "op": {
                "type": "string"
              },
              "bron": {
                "type": "string"
              },
              "nummer": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "op",
              "bron",
              "nummer"
            ],
            "nullable": true
          }
        },
        "required": [
          "migratie",
          "land",
          "instelling",
          "sleutel",
          "amiWachtwoord",
          "adressen",
          "verbindingen",
          "laatste"
        ]
      },
      "TelefonieInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "systeem": {
            "type": "string",
            "nullable": true,
            "description": "gekozen telefoonsysteem (voor de uitleg in het scherm), zie TELEFOONSYSTEMEN"
          },
          "webhook": {
            "type": "boolean"
          },
          "android": {
            "type": "boolean"
          },
          "ami": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "host": {
                "type": "string",
                "nullable": true
              },
              "poort": {
                "type": "number"
              },
              "gebruiker": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "aan",
              "host",
              "poort",
              "gebruiker"
            ]
          },
          "fritzbox": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "host": {
                "type": "string",
                "nullable": true
              },
              "poort": {
                "type": "number"
              }
            },
            "required": [
              "aan",
              "host",
              "poort"
            ]
          },
          "modem": {
            "type": "object",
            "properties": {
              "aan": {
                "type": "boolean"
              },
              "poort": {
                "type": "string",
                "nullable": true
              },
              "baud": {
                "type": "number"
              },
              "init": {
                "type": "string"
              }
            },
            "required": [
              "aan",
              "poort",
              "baud",
              "init"
            ]
          },
          "lijnen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "alleen gesprekken op deze lijnen / toestellen / gebelde nummers; leeg = alle"
          },
          "melding": {
            "type": "boolean",
            "description": "melding met de klant op de schermen bij een inkomend gesprek"
          },
          "zoeken": {
            "type": "boolean",
            "description": "in het bezorg-/afhaalscherm de klant opzoeken bij het intikken van het nummer (los aan te zetten, ook zonder\r\nnummerherkenning; standaard uit)"
          },
          "bewaarDagen": {
            "type": "number",
            "description": "gesprekken bewaren (dagen)"
          }
        },
        "required": [
          "aan",
          "systeem",
          "webhook",
          "android",
          "ami",
          "fritzbox",
          "modem",
          "lijnen",
          "melding",
          "zoeken",
          "bewaarDagen"
        ]
      },
      "TerminalBody": {
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "terminalId": {
            "type": "string"
          },
          "apiSleutel": {
            "type": "string"
          }
        }
      },
      "TfOrder": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string"
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "bestellingNummer": {
            "type": "number",
            "nullable": true
          },
          "bestellingStatus": {
            "type": "string",
            "nullable": true
          },
          "tafel": {
            "type": "string",
            "nullable": true
          },
          "klant": {
            "type": "string",
            "nullable": true
          },
          "gasten": {
            "type": "number",
            "nullable": true
          },
          "reserveringStatus": {
            "type": "string",
            "nullable": true
          },
          "maaltijdStatus": {
            "type": "string",
            "nullable": true
          },
          "rekening": {
            "type": "string",
            "enum": [
              "fout",
              "niet_gestuurd",
              "gestuurd"
            ]
          },
          "rekeningTotaal": {
            "type": "number",
            "nullable": true
          },
          "rekeningFout": {
            "type": "string",
            "nullable": true
          },
          "notitie": {
            "type": "string"
          },
          "ontvangenOp": {
            "type": "string"
          }
        },
        "required": [
          "orderId",
          "bestellingId",
          "bestellingNummer",
          "bestellingStatus",
          "tafel",
          "klant",
          "gasten",
          "reserveringStatus",
          "maaltijdStatus",
          "rekening",
          "rekeningTotaal",
          "rekeningFout",
          "notitie",
          "ontvangenOp"
        ]
      },
      "ThuisbezorgdInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "menuAuto": {
            "type": "boolean"
          },
          "werkbon": {
            "type": "boolean"
          }
        },
        "required": [
          "aan",
          "menuAuto",
          "werkbon"
        ]
      },
      "Tijden": {
        "type": "object",
        "properties": {
          "bezorgen": {
            "type": "object",
            "properties": {
              "monday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "tuesday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "wednesday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "thursday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "friday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "saturday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "sunday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              }
            }
          },
          "afhalen": {
            "type": "object",
            "properties": {
              "monday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "tuesday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "wednesday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "thursday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "friday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "saturday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              },
              "sunday": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "openingTime": {
                      "type": "string"
                    },
                    "closingTime": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "openingTime",
                    "closingTime"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "bezorgen",
          "afhalen"
        ]
      },
      "Tijdvak": {
        "type": "object",
        "properties": {
          "op": {
            "type": "string",
            "description": "begin van het tijdvak (ISO)"
          },
          "tijd": {
            "type": "string",
            "description": "\"18:30\""
          },
          "bezet": {
            "type": "number",
            "description": "bestellingen in dit tijdvak"
          },
          "vol": {
            "type": "boolean",
            "description": "vol (maximum bereikt)"
          }
        },
        "required": [
          "op",
          "tijd",
          "bezet",
          "vol"
        ]
      },
      "Ts6xInstelling": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "Aclas-model van de etiketweegschaal (id uit ACLAS_MODELLEN, bv. \"TS6X\", \"LS6RX\", \"iS6X\"); leeg = TS6X."
          },
          "weegschaal": {
            "type": "string",
            "description": "Dezelfde weegschaal weegt ook aan de kassa: de naam van die weegschaal in os6x\r\n(in het scherm één weegschaal met beide vinkjes). Leeg = alleen etiketten."
          },
          "naam": {
            "type": "string",
            "description": "Naam als de weegschaal alleen etiketten print (bv. \"Toonbank\"); leeg = het model."
          },
          "host": {
            "type": "string",
            "description": "IP-adres van de TS6X (voor het versturen van de PLU's)"
          },
          "poort": {
            "type": "number",
            "description": "TCP-poort van de TS6X (Aclas: 5002)"
          },
          "etiketPrefix": {
            "type": "string",
            "description": "eerste twee cijfers van de streepjescode op het etiket, bv. \"28\""
          },
          "etiketInhoud": {
            "type": "string",
            "enum": [
              "gewicht",
              "prijs"
            ],
            "description": "wat er in de streepjescode staat: gewicht in gram of prijs in centen"
          },
          "pluCijfers": {
            "type": "number",
            "enum": [
              4,
              5,
              6
            ],
            "description": "aantal cijfers voor het PLU-nummer (de rest, tot 10, is gewicht of prijs)"
          }
        },
        "required": [
          "host",
          "poort",
          "etiketPrefix",
          "etiketInhoud",
          "pluCijfers"
        ]
      },
      "Uitkomst": {
        "type": "object",
        "properties": {
          "nieuw": {
            "type": "number"
          },
          "bijgewerkt": {
            "type": "number"
          },
          "overgeslagen": {
            "type": "number"
          },
          "groepenNieuw": {
            "type": "number"
          },
          "meldingen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "hooguit 50 regels \"regel 12: ...\""
          }
        },
        "required": [
          "nieuw",
          "bijgewerkt",
          "overgeslagen",
          "groepenNieuw",
          "meldingen"
        ]
      },
      "UrenRegel": {
        "description": "Bestanden voor salaris en planning (Instellingen → Werktijden →\r\nSalaris en planning; zie personeelcatalogus.ts).\r\n\r\n - Uren: per medewerker per dag de gewerkte minuten (afgesloten diensten,\r\n   dag = de dag van inklokken) en de omzet die hij/zij afrekende (voor\r\n   bonussen of provisie en voor de loonkosten tegenover de omzet).\r\n - Omzet: per dag en uur de omzet excl. en incl. btw (verkoop en retour,\r\n   zonder verkochte cadeaubonnen), zoals het dashboard.\r\n\r\nBedragen in centen, tijden in minuten.",
        "type": "object",
        "properties": {
          "dag": {
            "type": "string"
          },
          "gebruikerId": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "minuten": {
            "type": "number"
          },
          "omzet": {
            "type": "number",
            "description": "omzet excl. btw die deze medewerker die dag afrekende (centen; optioneel)"
          }
        },
        "required": [
          "dag",
          "gebruikerId",
          "naam",
          "minuten"
        ]
      },
      "VerplaatsBody": {
        "description": "Regels naar een andere groep verplaatsen, of de rekening splitsen.\nPer regel mag een deel van het aantal mee (3x Cola -> 1x naar Jansen).\nDoel: een bestaande open bestelling (naar) of een nieuwe groep aan\ndezelfde tafel (nieuweGroep). Raakt de bron leeg, dan vervalt die.",
        "type": "object",
        "properties": {
          "regels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "aantal"
              ]
            }
          },
          "naar": {
            "type": "string"
          },
          "nieuweGroep": {
            "type": "boolean"
          },
          "groepNaam": {
            "type": "string"
          },
          "apart": {
            "type": "boolean"
          },
          "naarTafel": {
            "type": "string",
            "description": "naar een nieuwe groep aan een andere tafel"
          }
        }
      },
      "VerspillingRegel": {
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "product",
              "ingredient"
            ]
          },
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "eenheid": {
            "type": "string"
          },
          "hoeveelheid": {
            "type": "number"
          },
          "waarde": {
            "type": "number",
            "nullable": true,
            "description": "Waarde tegen de kostprijs (centen); null = geen kostprijs bekend."
          },
          "redenen": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "soort",
          "id",
          "naam",
          "eenheid",
          "hoeveelheid",
          "waarde",
          "redenen"
        ]
      },
      "VerstuurResultaat": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "fout": {
            "type": "string"
          },
          "melding": {
            "type": "string"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          }
        },
        "required": [
          "ok",
          "order"
        ]
      },
      "Vestiging": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "land": {
            "type": "string",
            "enum": [
              "NL",
              "BE"
            ]
          },
          "btwNummer": {
            "type": "string",
            "nullable": true
          },
          "vestigingsnummer": {
            "type": "string",
            "nullable": true,
            "description": "België, GKS 2.0 (migratie 119): vestigingseenheidsnummer (KBO) en juridische naam; alleen in Instellingen → Zaak."
          },
          "juridischeNaam": {
            "type": "string",
            "nullable": true
          },
          "gksPlichtig": {
            "type": "boolean",
            "nullable": true,
            "description": "België (migratie 135): GKS-plichtig? null = nog niet gekozen (dan kan de zaak niet afrekenen), true = alleen\r\nafrekenen met een werkende zwarte doos (GKS 2.0), false = niet GKS-plichtig (verklaring van de beheerder)."
          },
          "gksVerklaringOp": {
            "type": "string",
            "nullable": true,
            "description": "Wanneer de keuze (bij \"nee\": de verklaring) is gedaan (ISO); elk jaar opnieuw te bevestigen."
          },
          "fiscaalDemo": {
            "type": "boolean",
            "description": "Demo- of testzaak: de nagebootste zwarte doos (FISCAL_MODE=mock) mag. Nooit bij een echte zaak."
          },
          "gksMaaltijdOmzet": {
            "type": "number",
            "description": "Alleen in Instellingen → Zaak (België): maaltijden ter plaatse (btw 12%) in de laatste 12 maanden, excl. btw, in centen."
          },
          "adres": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "plaats": {
            "type": "string",
            "nullable": true
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "E-mailadres van de zaak (niet op de bon; o.a. voor het beheerportaal van Pin Voordeel)."
          },
          "gksProductienummer": {
            "type": "string",
            "nullable": true
          },
          "bonVoettekst": {
            "type": "string",
            "nullable": true,
            "description": "Tekst onderaan de kassabon (meerdere regels mogen).\r\nnull/undefined = STANDAARD_BONVOETTEKST, '' = geen tekst."
          },
          "bonTaal": {
            "type": "string",
            "nullable": true,
            "description": "Taal van de vaste teksten op de kassabon (migratie 052; alleen Latijns schrift,\r\nzie packages/printing/src/bontaal.ts). null/undefined = Nederlands.\r\nLos van de taal van de schermen."
          },
          "contantAfronden": {
            "type": "boolean",
            "description": "Contante betalingen afronden op 5 cent (standaard uit)."
          },
          "fooi": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FooiInstelling"
              }
            ],
            "description": "Fooiknoppen bij afrekenen (ontbreekt = STANDAARD_FOOI)."
          },
          "klokken": {
            "type": "string",
            "enum": [
              "uit",
              "aan",
              "verplicht"
            ],
            "description": "In- en uitklokken van personeel (ontbreekt = 'uit')."
          },
          "allergenen": {
            "type": "boolean",
            "description": "Allergenen per product tonen en invullen (standaard uit)."
          },
          "happyhour": {
            "type": "boolean",
            "description": "Happy hour gebruiken (standaard uit)."
          },
          "menus": {
            "type": "boolean",
            "description": "Menu's gebruiken (standaard uit)."
          },
          "dagdelen": {
            "type": "boolean",
            "description": "Assortiment per dagdeel en seizoen (migratie 084, standaard uit)."
          },
          "leverwijze": {
            "type": "boolean",
            "description": "Assortiment en prijzen per leverwijze: ter plaatse, afhalen, bezorgen (migratie 084, standaard uit)."
          },
          "cadeaubonBetalen": {
            "type": "boolean",
            "description": "\"Cadeaubon\" als betaalwijze bij afrekenen (ontbreekt = aan, zoals altijd)."
          },
          "cadeaubonSaldo": {
            "type": "boolean",
            "description": "Cadeaubonnen verkopen met code en saldo (standaard uit)."
          },
          "voorraad": {
            "type": "boolean",
            "description": "Voorraad bijhouden (per product of via ingrediënten; standaard uit)."
          },
          "thema": {
            "type": "string",
            "enum": [
              "donker",
              "licht"
            ],
            "description": "Thema van de schermen (ontbreekt = donker, zoals altijd)."
          },
          "afrekenknop": {
            "type": "string",
            "enum": [
              "groot",
              "klein"
            ],
            "description": "Knop \"Afrekenen\" op het bestelscherm: groot onder de bestelde producten of klein onderin (migratie 054; ontbreekt = groot)."
          },
          "bonMailen": {
            "type": "boolean",
            "description": "Bon per e-mail bij afrekenen (standaard uit)."
          },
          "keukenGeluid": {
            "type": "boolean",
            "description": "Piep op de kassa van de bediening als het keukenscherm iets klaar meldt (standaard uit)."
          },
          "zRapportMail": {
            "type": "string",
            "description": "E-mail van de beheerder: Z-rapport na dag afsluiten automatisch mailen (leeg = niet mailen)."
          },
          "fooiVerdelen": {
            "type": "string",
            "enum": [
              "uit",
              "eigen",
              "uren",
              "gelijk"
            ],
            "description": "Fooi per medewerker op X/Z/periode-rapport (ontbreekt = uit)."
          },
          "klantenkaart": {
            "type": "boolean",
            "description": "Klantenkaart / spaarpunten (migratie 038; standaard uit)."
          },
          "gastprofiel": {
            "type": "boolean",
            "description": "Gastprofiel (migratie 115; standaard uit, alleen met de klantenkaart): VIP, dieetwensen en voorkeuren van de klant."
          },
          "spaarPuntenPerEuro": {
            "type": "number",
            "description": "punten per besteedde euro (0 = alleen stempelkaarten)"
          },
          "spaarPuntenNodig": {
            "type": "number",
            "description": "zoveel punten = één beloning"
          },
          "spaarBeloning": {
            "type": "number",
            "description": "beloning in centen korting"
          },
          "marketingSms": {
            "type": "boolean",
            "description": "Sms-marketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met CM_TOKEN)."
          },
          "marketingEmail": {
            "type": "boolean",
            "description": "E-mailmarketing naar klanten van de klantenkaart met toestemming (migratie 056; standaard uit; werkt alleen met SMTP_HOST)."
          },
          "adresZoeken": {
            "type": "boolean",
            "description": "Snel adres invoeren met postcode en huisnummer, Nederland (migratie 057; standaard uit)."
          },
          "importeren": {
            "type": "boolean",
            "description": "Importeren uit een andere kassa: producten en klanten uit CSV/Excel (migratie 058; standaard uit)."
          },
          "exact": {
            "type": "boolean",
            "description": "Koppeling met Exact Online: dagomzet boeken (migratie 059; standaard uit)."
          },
          "exactIngesteld": {
            "type": "boolean",
            "description": "Alleen-lezen: staat de Exact-app in .env (EXACT_CLIENT_ID en EXACT_CLIENT_SECRET)?"
          },
          "boekhoudpakket": {
            "type": "string",
            "enum": [
              "",
              "acumulus",
              "afas",
              "businesscentral",
              "horus",
              "moneybird",
              "odoo",
              "quickbooks",
              "sapb1",
              "silvasoft",
              "snelstart",
              "twinfield",
              "xero",
              "yuki",
              "zoho"
            ],
            "description": "Koppeling met een ander boekhoudpakket: dagomzet zelf boeken in het gekozen pakket ('' = uit; migraties 062/063; standaard uit). Zie boekhoudcatalogus.ts."
          },
          "boekhoudpakketInEnv": {
            "type": "boolean",
            "description": "Alleen-lezen: ligt het pakket vast in .env (BOEKHOUDPAKKET)? Dan geen keuze bij Instellingen → Boekhouding."
          },
          "boekhoudpakketten": {
            "type": "object",
            "properties": {
              "acumulus": {
                "type": "boolean"
              },
              "afas": {
                "type": "boolean"
              },
              "businesscentral": {
                "type": "boolean"
              },
              "horus": {
                "type": "boolean"
              },
              "moneybird": {
                "type": "boolean"
              },
              "odoo": {
                "type": "boolean"
              },
              "quickbooks": {
                "type": "boolean"
              },
              "sapb1": {
                "type": "boolean"
              },
              "silvasoft": {
                "type": "boolean"
              },
              "snelstart": {
                "type": "boolean"
              },
              "twinfield": {
                "type": "boolean"
              },
              "xero": {
                "type": "boolean"
              },
              "yuki": {
                "type": "boolean"
              },
              "zoho": {
                "type": "boolean"
              }
            },
            "description": "Alleen-lezen: welke koppelingen kunnen verbinden (pakketten met inloggen alleen met hun app, in .env of bij Instellingen → Boekhouding)."
          },
          "reserveringen": {
            "type": "boolean",
            "description": "Reserveringen (migratie 039; standaard uit)."
          },
          "reserveringVooraf": {
            "type": "number",
            "description": "zoveel minuten vóór de tijd staat de tafel als gereserveerd op de plattegrond"
          },
          "reserveringDuurMin": {
            "type": "number",
            "description": "standaard duur van een reservering in minuten"
          },
          "wachtlijst": {
            "type": "boolean",
            "description": "Wachtlijst voor walk-ins (migratie 051; standaard uit)."
          },
          "wachtlijstSmsTekst": {
            "type": "string",
            "description": "tekst van de sms \"uw tafel is klaar\" ({naam}, {zaak}, {personen}); leeg = standaardtekst"
          },
          "smsIngesteld": {
            "type": "boolean",
            "description": "Alleen-lezen: is sms ingesteld in .env (CM_TOKEN, CM.com)?"
          },
          "updatemelding": {
            "type": "boolean",
            "description": "Updatemelding in de kassa (migratie 040; standaard uit)."
          },
          "snelleVerkoop": {
            "type": "boolean",
            "description": "Knop \"Snelle verkoop\" (balie, zonder tafel) op het tafelscherm (migratie 041; ontbreekt = aan)."
          },
          "afhalen": {
            "type": "boolean",
            "description": "Knop \"Afhalen\" op het tafelscherm (migratie 041; ontbreekt = aan)."
          },
          "bezorgen": {
            "type": "boolean",
            "description": "Bezorgen en tijdvakken in de kassa (migratie 060): knop \"Bezorgen\" op het tafelscherm (ontbreekt = uit)."
          },
          "bezorgZones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BezorgZone"
            },
            "description": "Bezorggebieden, de eerste die past geldt; leeg = overal, zonder kosten of minimum. Bedragen in centen."
          },
          "bezorgTijdMin": {
            "type": "number",
            "description": "Minuten tot bezorgd / klaar voor afhalen als het zo snel mogelijk moet."
          },
          "afhaalTijdMin": {
            "type": "number"
          },
          "tijdvakMin": {
            "type": "number",
            "description": "Lengte van een tijdvak (minuten) en het maximum aantal bestellingen erin (afhalen + bezorgen; 0 = geen maximum)."
          },
          "perTijdvak": {
            "type": "number"
          },
          "webshopVolgt": {
            "type": "boolean",
            "description": "Kassa en webshop gelijk (migratie 061; alles standaard uit = zoals voorheen).\r\nwebshopVolgt: de webshop gebruikt de bezorggebieden, tijden, het tijdvak, het\r\nmaximum, de openingstijden en gesloten dagen van de kassa en telt de\r\nbestellingen van de kassa mee (de kassa is leidend)."
          },
          "openTijden": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OpenTijden"
              }
            ],
            "nullable": true,
            "description": "Eigen openingstijden voor afhalen en bezorgen (1 = maandag ... 7 = zondag); null = zoals voorheen."
          },
          "geslotenDagen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Gesloten datums (JJJJ-MM-DD) voor afhalen en bezorgen."
          },
          "vooruitDagen": {
            "type": "number",
            "description": "Zoveel dagen vooruit een tijd kiezen (0 = alleen vandaag)."
          },
          "drukteMin": {
            "type": "number",
            "description": "Druk: zoveel minuten extra bij \"zo snel mogelijk\" (kassa en webshop)."
          },
          "bezorgBerichten": {
            "type": "boolean",
            "description": "De klant een sms/e-mail sturen bij aannemen, klaar en onderweg."
          },
          "webshopPauze": {
            "type": "boolean",
            "description": "Webshop vanuit de kassa even dicht (pauze), met een tekst voor de gast."
          },
          "webshopPauzeTekst": {
            "type": "string",
            "nullable": true
          },
          "reserverenOnline": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReserverenOnline"
              }
            ],
            "nullable": true,
            "description": "Online reserveren in de webshop met de regels van de kassa; null = die van de webshop zelf."
          },
          "cadeaubonOnline": {
            "type": "boolean",
            "description": "Cadeaubonnen verkopen in de webshop (online betaald)."
          },
          "kortingscodes": {
            "type": "boolean",
            "description": "Kortingscodes aan de kassa en in de webshop."
          },
          "mailIngesteld": {
            "type": "boolean",
            "description": "Alleen-lezen: is er een mailserver ingesteld in .env (SMTP_HOST)?"
          },
          "favorieten": {
            "type": "string",
            "enum": [
              "uit",
              "auto",
              "zelf"
            ],
            "description": "Favorieten/snelknoppen op het bestelscherm (ontbreekt = uit)."
          },
          "tafelStilMinuten": {
            "type": "number",
            "description": "Tafeltijd: oranje rand na zoveel minuten zonder bestelling (0 = uit; ontbreekt = 20)."
          },
          "ayce": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AyceInstelling"
              }
            ],
            "description": "All-you-can-eat (migratie 042; ontbreekt = uit)."
          },
          "klantscherm": {
            "type": "boolean",
            "description": "Klantscherm: scherm naar de klant toe met bestelling en bedrag (migratie 044; ontbreekt = uit)."
          },
          "klantschermWelkom": {
            "type": "string",
            "nullable": true,
            "description": "Welkomsttekst op het klantscherm als er niemand afrekent (leeg = \"Welkom\")."
          },
          "productfotoKnoppen": {
            "type": "boolean",
            "description": "Productfoto op de productknoppen van het bestelscherm (migratie 045; ontbreekt = uit)."
          },
          "productfotoKlantscherm": {
            "type": "boolean",
            "description": "Productfoto bij de regels op het klantscherm (migratie 045; ontbreekt = uit)."
          },
          "weegschaal": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WeegschaalInstelling"
              }
            ],
            "description": "Weegschaal (migratie 047; ontbreekt of aan = false = uit): producten met een prijs per\r\nkilo, wegen op een Aclas OS6X en etiketten van een Aclas TS6X scannen."
          },
          "leeftijdscheck": {
            "type": "boolean",
            "description": "Leeftijdscheck alcohol (migratie 072; ontbreekt = uit): 18+ in de webshop en op werkbon/bezorgbon."
          },
          "wegwerp": {
            "type": "boolean",
            "description": "Wegwerptoeslag per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
          },
          "statiegeld": {
            "type": "boolean",
            "description": "Statiegeld per product bij afhalen/bezorgen (NL, migratie 072; ontbreekt = uit)."
          },
          "contantLimiet": {
            "type": "boolean",
            "description": "Waarschuwing bij contant € 3.000 of meer voor goederen (NL, migratie 072; ontbreekt = uit)."
          },
          "facturen": {
            "type": "boolean",
            "description": "Facturen (UBL/Peppol) voor zakelijke klanten (migratie 072; ontbreekt = uit)."
          },
          "haccp": {
            "type": "boolean",
            "description": "Digitale HACCP-registratie: temperaturen en schoonmaak (migratie 073; ontbreekt = uit)."
          },
          "tap": {
            "type": "boolean",
            "description": "Tapsysteem / flowmeters (migratie 076): taps op de bon"
          },
          "resplatform": {
            "type": "boolean",
            "description": "Reserveringsplatforms (migratie 078): TheFork, Formitable, Zenchef, Resengo, OpenTable"
          },
          "bi": {
            "type": "boolean",
            "description": "BI en data-export (migratie 079): Power BI, Looker Studio, Excel, datawarehouse"
          },
          "biKeten": {
            "type": "boolean",
            "description": "BI voor ketens: het klantportaal mag de gegevens ophalen (migratie 080)"
          },
          "spaarpartner": {
            "type": "boolean",
            "description": "Spaarprogramma van een ander platform: Piggy of Joyn (migratie 081)"
          },
          "reviews": {
            "type": "boolean",
            "description": "Reviews vragen na het bezoek: Google en/of Trustpilot (migratie 081)"
          },
          "reviewbeheer": {
            "type": "boolean",
            "description": "Reviewbeheer: Google en Trustpilot in de kassa lezen en beantwoorden (migratie 082)"
          },
          "opRekening": {
            "type": "boolean",
            "description": "Betalen op rekening voor zakelijke klanten, met een factuur (migratie 085; alleen met facturen aan)"
          },
          "opRekeningWebshop": {
            "type": "boolean",
            "description": "Op rekening ook in de webshop: zakelijke klanten bestellen online met een eigen klantcode (migratie 108)"
          },
          "ayceWebshop": {
            "type": "boolean",
            "description": "All-you-can-eat ook bij bestellen aan tafel via de QR-code van de webshop (migratie 108)"
          },
          "wachtlijstOnline": {
            "type": "boolean",
            "description": "Gasten zetten zichzelf op de wachtlijst via de webshop (migratie 108; alleen met de wachtlijst aan)"
          },
          "teLaat": {
            "type": "boolean",
            "description": "Melding bij te lange doorlooptijd van afhalen en bezorgen (migratie 088; ontbreekt = uit)"
          },
          "mailingKoppeling": {
            "type": "boolean",
            "description": "Koppeling met Mailchimp of Klaviyo met een gekozen lijst (migratie 089): toestemming voor e-mail vragen"
          },
          "webshopPush": {
            "type": "boolean",
            "description": "Pushberichten met aanbiedingen in de webshop: een actie kan als pushbericht (migratie 095; tabblad Marketing)"
          },
          "muziek": {
            "type": "boolean",
            "description": "Muziek bedienen vanaf de kassa: knop Muziek in de bovenbalk (migratie 091; ontbreekt = uit)"
          },
          "camera": {
            "type": "boolean",
            "description": "Camerabeelden in de kassa: knop Camera's (migratie 092; ontbreekt = uit; bekijken met het recht camera_bekijken)"
          },
          "tablet": {
            "type": "boolean",
            "description": "Tablets als tweede scherm: muziek en camera's met één knop naar een gekoppelde tablet (migratie 094; ontbreekt = uit)"
          },
          "oproep": {
            "type": "boolean",
            "description": "Oproepscherm \"wordt bereid / klaar\" voor afhalers (migratie 096): knop Oproepen in de kassa, ophaalnummer op de kassabon."
          },
          "bezorgers": {
            "type": "boolean",
            "description": "Eigen bezorgers (migratie 097): knop Ritten (rit maken, bezorgerspagina op het portaal, kasafdracht, track & trace)."
          },
          "ritplanning": {
            "type": "boolean",
            "description": "Ritplanning (migratie 098; alleen met eigen bezorgers): ritten voorstellen per gebied, met afstand en reistijd."
          },
          "bezorgersapp": {
            "type": "boolean",
            "description": "Bezorgersapp (migratie 099; alleen met eigen bezorgers): telefoons koppelen, zelf oppakken, live kaart met alle bezorgers."
          }
        },
        "required": [
          "id",
          "naam",
          "land",
          "btwNummer",
          "adres",
          "postcode",
          "plaats",
          "telefoon",
          "gksProductienummer"
        ]
      },
      "VestigingInvoer": {
        "description": "Gegevens van de vestiging die op de kassabon staan: naam, adres,\r\ntelefoon en btw-nummer. Alleen de beheerder mag ze wijzigen.\r\n\r\nHet land (NL/BE) en het GKS-productienummer zijn hier bewust niet te\r\nwijzigen: daar hangt de fiscale registratie aan.",
        "type": "object",
        "properties": {
          "naam": {
            "type": "string"
          },
          "vestigingsnummer": {
            "description": "België, GKS 2.0 (migratie 119): vestigingseenheidsnummer (KBO, 10 cijfers) en juridische naam. Niet meegestuurd = niet wijzigen."
          },
          "juridischeNaam": {},
          "adres": {
            "type": "string",
            "nullable": true
          },
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "plaats": {
            "type": "string",
            "nullable": true
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "description": "E-mailadres van de zaak (niet op de bon). Niet meegestuurd = niet wijzigen."
          },
          "btwNummer": {
            "type": "string",
            "nullable": true
          },
          "bonVoettekst": {
            "type": "string",
            "nullable": true,
            "description": "Tekst onderaan de bon; '' = geen tekst. Niet meegestuurd = niet wijzigen."
          },
          "bonTaal": {
            "description": "Taal van de kassabon (migratie 052): 'nl' (standaard) of een andere taal in Latijns schrift. Niet meegestuurd = niet wijzigen."
          },
          "contantAfronden": {
            "type": "boolean",
            "description": "Contant afronden op 5 cent. Niet meegestuurd = niet wijzigen."
          },
          "fooi": {
            "type": "object",
            "properties": {
              "aan": {},
              "procenten": {},
              "afronden": {},
              "betaalwijzen": {}
            },
            "description": "Fooiknoppen bij afrekenen. Niet meegestuurd = niet wijzigen."
          },
          "klokken": {
            "description": "In- en uitklokken: 'uit' | 'aan' | 'verplicht'. Niet meegestuurd = niet wijzigen."
          },
          "allergenen": {
            "description": "Allergenen per product aan/uit. Niet meegestuurd = niet wijzigen."
          },
          "happyhour": {
            "description": "Happy hour en menu's aan/uit. Niet meegestuurd = niet wijzigen."
          },
          "menus": {},
          "dagdelen": {
            "description": "Assortiment per dagdeel en per leverwijze (migratie 084). Niet meegestuurd = niet wijzigen."
          },
          "leverwijze": {},
          "cadeaubonBetalen": {
            "description": "Cadeaubon als betaalwijze / cadeaubonnen met saldo (migratie 026). Niet meegestuurd = niet wijzigen."
          },
          "cadeaubonSaldo": {},
          "voorraad": {
            "description": "Voorraad bijhouden aan/uit (migratie 027). Niet meegestuurd = niet wijzigen."
          },
          "thema": {
            "description": "Thema van de schermen: 'donker' | 'licht' (migratie 029). Niet meegestuurd = niet wijzigen."
          },
          "afrekenknop": {
            "description": "Knop \"Afrekenen\" op het bestelscherm: 'groot' | 'klein' (migratie 054). Niet meegestuurd = niet wijzigen."
          },
          "bonMailen": {
            "description": "Bon per e-mail aan/uit (migratie 031). Niet meegestuurd = niet wijzigen."
          },
          "keukenGeluid": {
            "description": "Piep op de kassa bij klaar van het keukenscherm (migratie 035). Niet meegestuurd = niet wijzigen."
          },
          "zRapportMail": {
            "description": "E-mail van de beheerder voor het Z-rapport (migratie 036); leeg = niet mailen. Niet meegestuurd = niet wijzigen."
          },
          "fooiVerdelen": {
            "description": "Fooi per medewerker: 'uit' | 'eigen' | 'uren' | 'gelijk' (migratie 037). Niet meegestuurd = niet wijzigen."
          },
          "klantenkaart": {
            "description": "Klantenkaart / spaarpunten (migratie 038). Niet meegestuurd = niet wijzigen."
          },
          "spaarPuntenPerEuro": {},
          "spaarPuntenNodig": {},
          "spaarBeloning": {},
          "marketingSms": {
            "description": "Sms-marketing / e-mailmarketing (migratie 056), elk apart; alleen met de klantenkaart. Niet meegestuurd = niet wijzigen."
          },
          "marketingEmail": {},
          "adresZoeken": {
            "description": "Adres opzoeken met postcode en huisnummer (migratie 057). Niet meegestuurd = niet wijzigen."
          },
          "importeren": {
            "description": "Importeren uit een andere kassa (migratie 058). Niet meegestuurd = niet wijzigen."
          },
          "leeftijdscheck": {
            "description": "Wettelijk (migratie 072): leeftijdscheck alcohol, wegwerptoeslag, statiegeld en de waarschuwing\r\nbij contant € 3.000 of meer (die drie alleen in Nederland), facturen (UBL/Peppol). Niet meegestuurd = niet wijzigen."
          },
          "wegwerp": {},
          "statiegeld": {},
          "contantLimiet": {},
          "facturen": {},
          "haccp": {
            "description": "Digitale HACCP-registratie (migratie 073). Niet meegestuurd = niet wijzigen."
          },
          "tap": {},
          "resplatform": {
            "description": "Reserveringsplatforms (migratie 078). Niet meegestuurd = niet wijzigen."
          },
          "bi": {
            "description": "BI en data-export (migratie 079). Niet meegestuurd = niet wijzigen."
          },
          "biKeten": {
            "description": "BI voor ketens via het klantportaal (migratie 080). Niet meegestuurd = niet wijzigen."
          },
          "spaarpartner": {
            "description": "Spaarprogramma van een ander platform en reviews (migratie 081). Niet meegestuurd = niet wijzigen."
          },
          "reviews": {},
          "reviewbeheer": {
            "description": "Reviewbeheer: Google en Trustpilot lezen en beantwoorden (migratie 082). Niet meegestuurd = niet wijzigen."
          },
          "opRekening": {
            "description": "Betalen op rekening voor zakelijke klanten (migratie 085; alleen met facturen aan). Niet meegestuurd = niet wijzigen."
          },
          "opRekeningWebshop": {},
          "ayceWebshop": {},
          "wachtlijstOnline": {},
          "exact": {
            "description": "Koppeling met Exact Online (migratie 059); aanzetten alleen met de app in .env. Niet meegestuurd = niet wijzigen."
          },
          "boekhoudpakket": {
            "description": "Koppeling met AFAS, SnelStart, Twinfield of Yuki (migratie 062): '' = uit. Twinfield alleen met de app in .env. Niet meegestuurd = niet wijzigen."
          },
          "reserveringen": {
            "description": "Reserveringen (migratie 039). Niet meegestuurd = niet wijzigen."
          },
          "reserveringVooraf": {},
          "reserveringDuurMin": {},
          "wachtlijst": {
            "description": "Wachtlijst voor walk-ins (migratie 051). Niet meegestuurd = niet wijzigen."
          },
          "wachtlijstSmsTekst": {
            "description": "tekst van de sms \"uw tafel is klaar\"; leeg = standaardtekst"
          },
          "updatemelding": {
            "description": "Updatemelding (migratie 040). Niet meegestuurd = niet wijzigen."
          },
          "snelleVerkoop": {
            "description": "Knoppen Snelle verkoop en Afhalen op het tafelscherm (migratie 041). Niet meegestuurd = niet wijzigen."
          },
          "afhalen": {},
          "favorieten": {
            "description": "Favorieten: 'uit' | 'auto' | 'zelf' (migratie 032). Niet meegestuurd = niet wijzigen."
          },
          "tafelStilMinuten": {
            "description": "Tafeltijd: oranje rand na zoveel minuten, 0 = uit (migratie 034). Niet meegestuurd = niet wijzigen."
          },
          "ayce": {
            "description": "All-you-can-eat (migraties 042/043): { aan, arrangementen: [{ id?, naam, prijsVolwassen, prijsKind, btwCode,\r\ngroepen, artikelen, minuten, rondeMax, rondeMinuten, toeslag }] }. Niet meegestuurd = niet wijzigen."
          },
          "klantscherm": {
            "description": "Klantscherm aan/uit en welkomsttekst (migratie 044). Niet meegestuurd = niet wijzigen."
          },
          "klantschermWelkom": {},
          "productfotoKnoppen": {
            "description": "Productfoto op de knoppen van het bestelscherm / op het klantscherm (migratie 045). Niet meegestuurd = niet wijzigen."
          },
          "productfotoKlantscherm": {},
          "bezorgen": {
            "description": "Bezorgen en tijdvakken in de kassa (migratie 060): knop \"Bezorgen\" aan/uit, bezorggebieden\r\n[{ naam, soort: 'postcode' | 'straal', postcodes, straalKm, minimum, kosten, gratisVanaf, extraMin, uit }]\r\n(bedragen in centen), bezorg- en afhaaltijd, tijdvak en maximum per tijdvak (0 = geen).\r\nNiet meegestuurd = niet wijzigen."
          },
          "bezorgZones": {},
          "bezorgTijdMin": {},
          "afhaalTijdMin": {},
          "tijdvakMin": {},
          "perTijdvak": {},
          "webshopVolgt": {
            "description": "Kassa en webshop gelijk (migratie 061). Niet meegestuurd = niet wijzigen.\r\nwebshopVolgt, openTijden ({ afhalen, bezorgen } per weekdag of null), geslotenDagen,\r\nvooruitDagen (0-14), drukteMin (0-240), bezorgBerichten; webshopPauze(+Tekst);\r\nreserverenOnline ({ maxPersonen, vooruitDagen, slotMin, minVoorafMin, tijden } of null);\r\ncadeaubonOnline; kortingscodes."
          },
          "openTijden": {},
          "geslotenDagen": {},
          "vooruitDagen": {},
          "drukteMin": {},
          "bezorgBerichten": {},
          "webshopPauze": {},
          "webshopPauzeTekst": {},
          "reserverenOnline": {},
          "cadeaubonOnline": {},
          "kortingscodes": {}
        }
      },
      "VinifyArtikel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "vinify_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "vat": {
            "type": "number"
          },
          "group_id": {
            "type": "string",
            "nullable": true
          },
          "group_name": {
            "type": "string",
            "nullable": true
          },
          "glass": {
            "type": "boolean"
          },
          "quantity": {
            "type": "number",
            "nullable": true
          },
          "purchase_price": {
            "type": "number",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "vinify_id",
          "name",
          "price",
          "vat",
          "group_id",
          "group_name",
          "glass",
          "quantity",
          "purchase_price",
          "active",
          "updated_at"
        ]
      },
      "VinifyInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean"
          },
          "aanmelden": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sleutel",
                "jwt",
                "handtekening"
              ]
            },
            "description": "welke aanmeldwijzen Vinify mag gebruiken"
          },
          "apiId": {
            "type": "string",
            "nullable": true
          },
          "gebruikersnaam": {
            "type": "string",
            "nullable": true
          },
          "groepen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "groepen waarvan de producten wijn zijn (naast wat Vinify zelf aanmaakt); leeg = alleen de wijnen van Vinify"
          },
          "push": {
            "type": "boolean",
            "description": "verkopen ook naar Vinify sturen (push)"
          },
          "pushUrl": {
            "type": "string",
            "nullable": true
          },
          "vanaf": {
            "type": "string",
            "nullable": true,
            "description": "alleen verkopen vanaf (JJJJ-MM-DD); leeg = vanaf het aanzetten"
          }
        },
        "required": [
          "aan",
          "aanmelden",
          "apiId",
          "gebruikersnaam",
          "groepen",
          "push",
          "pushUrl",
          "vanaf"
        ]
      },
      "VinifyTransactie": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "article_id": {
            "type": "string"
          },
          "vinify_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "glass": {
            "type": "boolean"
          },
          "time": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "total_price": {
            "type": "number"
          },
          "type": {
            "type": "string",
            "enum": [
              "sale",
              "refund"
            ]
          },
          "receipt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "article_id",
          "vinify_id",
          "name",
          "glass",
          "time",
          "quantity",
          "total_price",
          "type",
          "receipt"
        ]
      },
      "Voorstel": {
        "type": "object",
        "properties": {
          "stops": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "afstandKm": {
            "type": "number"
          },
          "reistijdMin": {
            "type": "number"
          },
          "aankomst": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "op": {
                  "type": "string"
                },
                "teLaat": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "op",
                "teLaat"
              ]
            },
            "description": "per adres (zelfde volgorde): verwachte aankomst bij vertrek op `vanaf`, en of dat later is dan de gewenste tijd"
          }
        },
        "required": [
          "stops",
          "afstandKm",
          "reistijdMin",
          "aankomst"
        ]
      },
      "VoorstelRegel": {
        "type": "object",
        "properties": {
          "soort": {
            "type": "string",
            "enum": [
              "artikel",
              "ingredient"
            ]
          },
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "eenheid": {
            "type": "string",
            "description": "voorraadeenheid (st, kg, l ...)"
          },
          "voorraad": {
            "type": "number"
          },
          "minimum": {
            "type": "number",
            "nullable": true
          },
          "aanvullenTot": {
            "type": "number",
            "nullable": true
          },
          "onderweg": {
            "type": "number",
            "description": "besteld en nog niet ontvangen (voorraadeenheden)"
          },
          "bestelcode": {
            "type": "string",
            "nullable": true
          },
          "ean": {
            "type": "string",
            "nullable": true
          },
          "per": {
            "type": "number"
          },
          "besteleenheid": {
            "type": "string",
            "nullable": true
          },
          "prijs": {
            "type": "number",
            "nullable": true
          },
          "aantal": {
            "type": "number",
            "description": "voorstel in besteleenheden (0 = niet nodig)"
          },
          "nodig": {
            "type": "boolean",
            "description": "zit op of onder het meldniveau (met onderweg erbij)"
          }
        },
        "required": [
          "soort",
          "id",
          "naam",
          "eenheid",
          "voorraad",
          "minimum",
          "aanvullenTot",
          "onderweg",
          "bestelcode",
          "ean",
          "per",
          "besteleenheid",
          "prijs",
          "aantal",
          "nodig"
        ]
      },
      "Wachtende": {
        "description": "Iemand op de wachtlijst.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "naam": {
            "type": "string"
          },
          "telefoon": {
            "type": "string",
            "nullable": true
          },
          "personen": {
            "type": "number"
          },
          "wens": {
            "type": "string",
            "nullable": true,
            "description": "bv. terras, kinderstoel"
          },
          "wachttijdMin": {
            "type": "number",
            "nullable": true,
            "description": "genoemde verwachte wachttijd (minuten)"
          },
          "status": {
            "type": "string",
            "enum": [
              "wacht",
              "opgeroepen",
              "geplaatst",
              "weg"
            ]
          },
          "aangemeldOp": {
            "type": "string"
          },
          "opgeroepenOp": {
            "type": "string",
            "nullable": true
          },
          "smsStatus": {
            "type": "string",
            "nullable": true,
            "description": "'verstuurd' of de foutmelding van de laatste sms"
          },
          "smsOp": {
            "type": "string",
            "nullable": true
          },
          "geplaatstOp": {
            "type": "string",
            "nullable": true
          },
          "tafelId": {
            "type": "string",
            "nullable": true
          },
          "tafelNaam": {
            "type": "string",
            "nullable": true
          },
          "bestellingId": {
            "type": "string",
            "nullable": true
          },
          "wachtMin": {
            "type": "number",
            "description": "hoe lang (minuten) aan het wachten, of hoe lang gewacht tot geplaatst/weg"
          },
          "bron": {
            "type": "string",
            "enum": [
              "webshop",
              "kassa"
            ],
            "description": "aangemeld aan de deur (kassa) of online via de webshop (migratie 108)"
          }
        },
        "required": [
          "id",
          "naam",
          "telefoon",
          "personen",
          "wens",
          "wachttijdMin",
          "status",
          "aangemeldOp",
          "opgeroepenOp",
          "smsStatus",
          "smsOp",
          "geplaatstOp",
          "tafelId",
          "tafelNaam",
          "bestellingId",
          "wachtMin",
          "bron"
        ]
      },
      "WachtendeInvoer": {
        "type": "object",
        "properties": {
          "naam": {},
          "telefoon": {},
          "personen": {},
          "wens": {},
          "wachttijdMin": {}
        }
      },
      "WachtendeWerkbon": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "printer": {
            "type": "string",
            "description": "printernaam, bv. \"keuken\""
          },
          "omschrijving": {
            "type": "string",
            "description": "\"Tafel 5\", \"AFHALEN – Jansen\" ... en hoeveel regels"
          },
          "regels": {
            "type": "number"
          },
          "bestelnummer": {
            "type": "number"
          },
          "sinds": {
            "type": "string",
            "description": "wanneer het eerste printen mislukte (ISO)"
          },
          "pogingen": {
            "type": "number"
          },
          "laatsteFout": {
            "type": "string"
          },
          "opgegeven": {
            "type": "boolean",
            "description": "na OPGEVEN_NA_MS: niet meer vanzelf, alleen nog met \"Opnieuw printen\""
          }
        },
        "required": [
          "id",
          "printer",
          "omschrijving",
          "regels",
          "bestelnummer",
          "sinds",
          "pogingen",
          "laatsteFout",
          "opgegeven"
        ]
      },
      "WebshopInstelling": {
        "type": "object",
        "properties": {
          "werkbon": {
            "type": "boolean"
          }
        },
        "required": [
          "werkbon"
        ]
      },
      "WeegschaalInstelling": {
        "type": "object",
        "properties": {
          "aan": {
            "type": "boolean",
            "description": "Producten met een prijs per kilo en wegen (Instellingen → Weegschaal)."
          },
          "handmatig": {
            "type": "boolean",
            "description": "Gewicht met de hand intikken mag (altijd mogelijk als er geen OS6X is)."
          },
          "os6x": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Os6xInstelling"
            },
            "description": "Aclas OS6X-weegschalen (meerdere kan: elk aan een eigen COM-/USB-poort van de\r\nkassaserver of via een eigen netwerkomzetter). Leeg = geen."
          },
          "ts6x": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Ts6xInstelling"
              }
            ],
            "nullable": true,
            "description": "Aclas TS6X etiketweegschaal; null = geen."
          }
        },
        "required": [
          "aan",
          "handmatig",
          "os6x",
          "ts6x"
        ]
      },
      "WeekTijden": {
        "description": "Openingstijden per weekdag (\"1\" = maandag ... \"7\" = zondag); \"tot\" vóór \"van\" = na middernacht.",
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "van": {
                "type": "string"
              },
              "tot": {
                "type": "string"
              }
            },
            "required": [
              "van",
              "tot"
            ]
          }
        }
      },
      "WsOverzicht": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "bestellingId": {
            "type": "string"
          },
          "bonnummer": {
            "type": "number"
          },
          "nummer": {
            "type": "string",
            "nullable": true
          },
          "soort": {
            "type": "string",
            "enum": [
              "afhalen",
              "bezorgen",
              "tafel"
            ]
          },
          "tafel": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "geannuleerd",
              "nieuw",
              "klaar",
              "onderweg",
              "in_bereiding",
              "afgerond"
            ]
          },
          "statusTekst": {
            "type": "string"
          },
          "bestellingStatus": {
            "type": "string",
            "enum": [
              "open",
              "betaald",
              "geannuleerd"
            ]
          },
          "klant": {
            "type": "object",
            "properties": {
              "naam": {
                "type": "string",
                "nullable": true
              },
              "telefoon": {
                "type": "string",
                "nullable": true
              },
              "email": {
                "type": "string",
                "nullable": true
              },
              "adres": {
                "type": "string",
                "nullable": true
              }
            },
            "required": [
              "naam",
              "telefoon",
              "email",
              "adres"
            ]
          },
          "tijdstip": {
            "type": "string",
            "nullable": true
          },
          "zsm": {
            "type": "boolean"
          },
          "betaalwijze": {
            "type": "string",
            "nullable": true
          },
          "onlineBetaald": {
            "type": "boolean"
          },
          "fooi": {
            "type": "number"
          },
          "totaal": {
            "type": "number"
          },
          "opmerking": {
            "type": "string",
            "nullable": true
          },
          "ontvangenOp": {
            "type": "string"
          },
          "opRekening": {
            "type": "string",
            "nullable": true,
            "description": "migratie 108: op rekening, de naam van de zakelijke klant (afronden = afrekenen op rekening)"
          },
          "opKamer": {
            "type": "object",
            "properties": {
              "kamer": {
                "type": "string"
              },
              "naam": {
                "type": "string"
              }
            },
            "required": [
              "kamer",
              "naam"
            ],
            "nullable": true,
            "description": "migratie 133: op de kamer (hotelkoppeling), kamer en naam van de gast (afronden = afrekenen op de kamer)"
          },
          "regels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "naam": {
                  "type": "string"
                },
                "aantal": {
                  "type": "number"
                },
                "opties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "opmerking": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "naam",
                "aantal",
                "opties",
                "opmerking"
              ]
            }
          },
          "tijdlijn": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "soort": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "nullable": true
                },
                "tekst": {
                  "type": "string"
                },
                "op": {
                  "type": "string"
                }
              },
              "required": [
                "soort",
                "code",
                "tekst",
                "op"
              ]
            }
          }
        },
        "required": [
          "id",
          "bestellingId",
          "bonnummer",
          "nummer",
          "soort",
          "tafel",
          "status",
          "statusTekst",
          "bestellingStatus",
          "klant",
          "tijdstip",
          "zsm",
          "betaalwijze",
          "onlineBetaald",
          "fooi",
          "totaal",
          "opmerking",
          "ontvangenOp",
          "opRekening",
          "opKamer",
          "regels",
          "tijdlijn"
        ]
      },
      "Zelfbediening": {
        "type": "object",
        "properties": {
          "kiosk": {
            "type": "boolean"
          },
          "webshop": {
            "type": "boolean"
          },
          "maxBedrag": {
            "type": "number"
          }
        },
        "required": [
          "kiosk",
          "webshop",
          "maxBedrag"
        ]
      },
      "ZoekResultaat": {
        "type": "object",
        "properties": {
          "apparaat": {
            "$ref": "#/components/schemas/Apparaat"
          },
          "module": {
            "type": "boolean",
            "description": "de Aclas Scale Module antwoordt (wegen \"op dit apparaat\" kan)"
          },
          "gevonden": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GevondenWeegschaal"
            }
          },
          "doorzocht": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "voorstel": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WeegschaalInstelling"
              }
            ],
            "description": "instelling met wat gevonden is erbij (nog niet opgeslagen; de beheerder zet hem aan)"
          },
          "nieuw": {
            "type": "boolean",
            "description": "iets nieuws gevonden dat nog niet in de instelling stond"
          },
          "tekst": {
            "type": "string"
          }
        },
        "required": [
          "apparaat",
          "module",
          "gevonden",
          "doorzocht",
          "voorstel",
          "nieuw",
          "tekst"
        ]
      },
      "WebsocketMelding": {
        "description": "Melding via de WebSocket /ws (JSON). Het veld `soort` zegt wat er veranderd is.",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "tafels_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "bestelling_gewijzigd"
                ]
              },
              "bestellingId": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "bestellingId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "bestelling_afgerekend"
                ]
              },
              "bestellingId": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "bestellingId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "fiscale_storing"
                ]
              },
              "melding": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "melding"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "catalogus_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "keuken_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "rechten_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "keuken_klaar"
                ]
              },
              "bestellingId": {
                "type": "string"
              },
              "waar": {
                "type": "string"
              },
              "station": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "bestellingId",
              "waar",
              "station"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "klantscherm_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "thuisbezorgd"
                ]
              },
              "gebeurtenis": {
                "type": "string"
              },
              "tekst": {
                "type": "string"
              },
              "bestellingId": {
                "type": "string"
              },
              "geluid": {
                "type": "boolean"
              }
            },
            "required": [
              "soort",
              "gebeurtenis",
              "tekst"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "webshop"
                ]
              },
              "gebeurtenis": {
                "type": "string"
              },
              "tekst": {
                "type": "string"
              },
              "bestellingId": {
                "type": "string"
              },
              "geluid": {
                "type": "boolean"
              }
            },
            "required": [
              "soort",
              "gebeurtenis",
              "tekst"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "bezorgplatform"
                ]
              },
              "gebeurtenis": {
                "type": "string"
              },
              "tekst": {
                "type": "string"
              },
              "bestellingId": {
                "type": "string"
              },
              "geluid": {
                "type": "boolean"
              }
            },
            "required": [
              "soort",
              "gebeurtenis",
              "tekst"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "apicbase"
                ]
              },
              "tekst": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "tekst"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "signalering"
                ]
              },
              "nieuw": {
                "type": "number"
              },
              "aantal": {
                "type": "number"
              }
            },
            "required": [
              "soort",
              "nieuw",
              "aantal"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "gang_gevraagd"
                ]
              },
              "bestellingId": {
                "type": "string"
              },
              "gang": {
                "type": "number"
              },
              "waar": {
                "type": "string"
              },
              "station": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "bestellingId",
              "gang",
              "waar",
              "station"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "vinify"
                ]
              },
              "tekst": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "tekst"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "oproep"
                ]
              },
              "oproep": {
                "$ref": "#/components/schemas/Oproep"
              }
            },
            "required": [
              "soort",
              "oproep"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "oproep_status"
                ]
              },
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "id",
              "status"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "telefonie"
                ]
              },
              "tekst": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "tekst"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "printwachtrij_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "lade"
                ]
              },
              "open": {
                "type": "boolean"
              },
              "seconden": {
                "type": "number"
              },
              "tekst": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "open"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "haccp_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "tap_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "tablet_scherm"
                ]
              },
              "tabletId": {
                "type": "string"
              }
            },
            "required": [
              "soort",
              "tabletId"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "tablet_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "oproep_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "kiosk_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "bezorgers_gewijzigd"
                ]
              }
            },
            "required": [
              "soort"
            ]
          },
          {
            "type": "object",
            "properties": {
              "soort": {
                "type": "string",
                "enum": [
                  "te_laat"
                ]
              },
              "bestellingId": {
                "type": "string"
              },
              "nieuw": {
                "type": "object",
                "properties": {
                  "soort": {
                    "type": "string",
                    "enum": [
                      "afhalen",
                      "bezorgen"
                    ]
                  },
                  "naam": {
                    "type": "string",
                    "nullable": true
                  },
                  "minuten": {
                    "type": "number"
                  },
                  "excuus": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "soort",
                  "naam",
                  "minuten",
                  "excuus"
                ]
              }
            },
            "required": [
              "soort",
              "bestellingId"
            ]
          }
        ]
      }
    },
    "responses": {
      "Serverfout": {
        "description": "Er ging iets mis op de kassaserver (of de database is niet bijgewerkt: draai `npm run db:migrate`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Fout"
            }
          }
        }
      },
      "DatabaseOmzetten": {
        "description": "De database wordt omgezet (Instellingen → Database). Probeer het over een minuut opnieuw.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Fout"
            },
            "example": {
              "fout": "De database wordt omgezet. Een ogenblik geduld, dit duurt meestal minder dan een minuut.",
              "code": "DATABASE_OMZETTEN"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "token": []
    }
  ],
  "x-rechten": [
    {
      "code": "storno",
      "naam": "Regels schrappen na bestellen (storno)",
      "groep": "Bestellen",
      "standaard": {
        "bediening": true,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "korting",
      "naam": "Korting geven",
      "groep": "Bestellen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "korting_weghalen",
      "naam": "Korting weghalen",
      "groep": "Bestellen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "uitverkocht",
      "naam": "Product op \"op\" zetten (uitverkocht)",
      "groep": "Bestellen",
      "standaard": {
        "bediening": true,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "bon_kopie",
      "naam": "Kopie van een bon printen",
      "groep": "Bonnen",
      "standaard": {
        "bediening": true,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "retour",
      "naam": "Retour doen (creditbon)",
      "groep": "Bonnen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "onbetaald",
      "naam": "Afsluiten zonder betaling (gast vertrokken zonder te betalen)",
      "groep": "Bonnen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "bon_verbeteren",
      "naam": "Prijs van een bon verbeteren (nieuwe bon met de juiste prijs)",
      "groep": "Bonnen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "op_rekening",
      "naam": "Op rekening afrekenen en betalingen op rekening ontvangen (zakelijke klanten)",
      "groep": "Bonnen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "x_rapport",
      "naam": "Tussenstand (X-rapport) bekijken",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": true,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "dag_afsluiten",
      "naam": "Dag afsluiten (Z-rapport)",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "omzet_periode",
      "naam": "Omzet per periode",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "kassalade",
      "naam": "Kassalade beheren (geld in/uit, lade openen, startgeld)",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "cadeaubonnen_beheren",
      "naam": "Cadeaubonnen beheren (saldo corrigeren, blokkeren)",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "reviews_beantwoorden",
      "naam": "Reviews lezen en beantwoorden (Google, Trustpilot)",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "klanten_beheren",
      "naam": "Klantenkaart beheren (klanten wijzigen/verwijderen, punten corrigeren, stempelkaarten)",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "logboek",
      "naam": "Logboek bekijken",
      "groep": "Rapporten en kas",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "voorraad_beheren",
      "naam": "Voorraad beheren (ontvangst, telling, afboeken, ingrediënten)",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "producten_beheren",
      "naam": "Producten, groepen en keuzeopties beheren",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": false,
        "beheerder": true
      }
    },
    {
      "code": "plattegronden_beheren",
      "naam": "Plattegronden en tafels beheren",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": false,
        "beheerder": true
      }
    },
    {
      "code": "instellingen_beheren",
      "naam": "Zaak, betalen en printers instellen",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": false,
        "beheerder": true
      }
    },
    {
      "code": "werktijden_beheren",
      "naam": "Werktijden bekijken en aanpassen",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": false,
        "beheerder": true
      }
    },
    {
      "code": "signalering_instellen",
      "naam": "Signalering instellen (fraude en afwijkingen: drempels en meldingen)",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    },
    {
      "code": "ritplanning_instellen",
      "naam": "Ritplanning instellen (adressen per rit, reistijd, tijdvenster, snelheid)",
      "groep": "Instellingen",
      "standaard": {
        "bediening": false,
        "manager": true,
        "beheerder": true
      }
    }
  ]
}
