{"openapi":"3.1.0","info":{"title":"Zahlfuchs API","version":"1.0.0","description":"REST-API für Zahlfuchs. Anmeldung mit einem API-Schlüssel der Firma (Einstellungen → API) im Header `Authorization: Bearer zf_live_…` oder als Partner-App über OAuth 2.1 (`Bearer zf_oat_…`). Beträge sind Cent als Ganzzahl-String, Daten ISO 8601. Doku: https://staging.zahlfuchs.de/api/docs"},"servers":[{"url":"https://api.staging.zahlfuchs.de/v1"}],"security":[{"apiKey":[]},{"oauth2":[]}],"tags":[{"name":"Allgemein"},{"name":"Firma"},{"name":"Kunden"},{"name":"Artikel"},{"name":"Angebote"},{"name":"Aufträge"},{"name":"Rechnungen"},{"name":"Wiederkehrende Rechnungen"},{"name":"Zahlungen"},{"name":"Mahnungen"},{"name":"Eingangsbelege"},{"name":"Bank"},{"name":"Buchhaltung"},{"name":"Kasse"},{"name":"Kasse mit TSE"},{"name":"Umsatzsteuer"},{"name":"Auswertungen"},{"name":"Exporte"},{"name":"Rückfragen"},{"name":"Webhooks"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API-Schlüssel der Firma. Rechte: company:read, customers:read, customers:write, articles:read, articles:write, sales:read, sales:write, sales:finalize, sales:send, payments:read, payments:write, incoming:read, incoming:write, banking:read, banking:write, ledger:read, ledger:write, exports:read, exports:write, comments:read, comments:write, pos:read, pos:write, webhooks:manage"},"oauth2":{"type":"oauth2","description":"Partner-Apps: Authorization Code mit PKCE (S256). Access-Token zf_oat_… (1 Stunde), Refresh-Token zf_ort_… (60 Tage, rotierend). Gilt je Firma, Zustimmung nur durch den Inhaber.","flows":{"authorizationCode":{"authorizationUrl":"https://staging.zahlfuchs.de/oauth/authorize","tokenUrl":"https://api.staging.zahlfuchs.de/oauth/token","refreshUrl":"https://api.staging.zahlfuchs.de/oauth/token","scopes":{"company:read":"Firmenprofil und Steuerprofile lesen","customers:read":"Kunden lesen","customers:write":"Kunden anlegen und ändern","articles:read":"Artikel lesen","articles:write":"Artikel anlegen und ändern","sales:read":"Angebote, Aufträge und Rechnungen lesen","sales:write":"Entwürfe von Angeboten, Aufträgen und Rechnungen anlegen und ändern","sales:finalize":"Belege festschreiben und stornieren (nicht umkehrbar)","sales:send":"Belege per E-Mail versenden","payments:read":"Zahlungen, offene Posten und Mahnungen lesen","payments:write":"Zahlungen erfassen und zurücknehmen","incoming:read":"Eingangsbelege lesen","incoming:write":"Eingangsbelege hochladen","banking:read":"Bankkonten und Umsätze lesen","banking:write":"Kontoauszüge importieren","ledger:read":"Konten, Buchungen, Kasse, Umsatzsteuer und Auswertungen lesen","ledger:write":"Buchungen und Kassenbuch-Einträge erfassen","exports:read":"Exporte herunterladen","exports:write":"Exporte anstoßen (PDF-Paket, GDPdU, DATEV)","comments:read":"Rückfragen lesen","comments:write":"Auf Rückfragen antworten","pos:read":"Kasse mit TSE lesen: Kassen, Vorgänge, Abschlüsse","pos:write":"Kassenvorgänge erfassen (mit TSE-Signatur, nicht umkehrbar)","webhooks:manage":"Webhooks einrichten"}}}}},"schemas":{"Problem":{"type":"object","description":"Fehler nach RFC 9457 (application/problem+json).","required":["type","title","status","code","detail","request_id"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string","description":"Stabiler Fehlercode für Programme"},"detail":{"type":"string","description":"Erklärung auf Deutsch"},"request_id":{"type":"string","description":"Bei Rückfragen an den Support angeben"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}},"Company":{"type":"object","properties":{"legal_name":{"type":"string","description":"Name der Firma laut Register oder Gewerbeanmeldung"},"address":{"type":"object","properties":{"street":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string","description":"ISO 3166-1 alpha-2, z. B. DE"}},"required":["street","postal_code","city","country_code"],"additionalProperties":false},"tax_number":{"type":["string","null"]},"vat_id":{"description":"USt-IdNr.","type":["string","null"]},"tax_office":{"type":["string","null"]},"register":{"type":"object","properties":{"court":{"type":["string","null"]},"number":{"type":["string","null"]},"seat":{"type":["string","null"]}},"required":["court","number","seat"],"additionalProperties":false},"managing_directors":{"type":"array","items":{"type":"string"}},"contact":{"type":"object","properties":{"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]}},"required":["email","phone","website"],"additionalProperties":false},"bank":{"type":"object","properties":{"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["iban","bic","name"],"additionalProperties":false},"complete":{"type":"boolean","description":"Reichen die Angaben, um Rechnungen zu schreiben?"}},"required":["legal_name","address","tax_number","vat_id","tax_office","register","managing_directors","contact","bank","complete"],"additionalProperties":false},"TaxProfile":{"type":"object","properties":{"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Gilt ab diesem Tag bis zum Beginn des nächsten Profils"},"legal_form":{"type":"string","enum":["sole_proprietor","partnership","corporation"]},"vat_scheme":{"type":"string","enum":["small_business","standard"],"description":"small_business = § 19 UStG"},"bookkeeping":{"type":"string","enum":["cash_basis","double_entry"],"description":"cash_basis = EÜR"},"vat_basis":{"type":"string","enum":["accrual","cash"],"description":"Soll- oder Ist-Versteuerung"},"chart_of_accounts":{"type":"string","enum":["skr03","skr04"]},"default_vat_rate":{"type":"string","enum":["standard","reduced"]},"price_entry":{"type":"string","enum":["net","gross"]},"vat_return_period":{"type":"string","enum":["monthly","quarterly","yearly"]},"permanent_extension":{"type":"boolean","description":"Dauerfristverlängerung"},"fiscal_year_start_month":{"type":"integer","minimum":1,"maximum":12}},"required":["valid_from","legal_form","vat_scheme","bookkeeping","vat_basis","chart_of_accounts","default_vat_rate","price_entry","vat_return_period","permanent_extension","fiscal_year_start_month"],"additionalProperties":false},"Customer":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"string","description":"Kundennummer aus dem Nummernkreis"},"kind":{"type":"string","enum":["business","consumer"],"description":"Firma oder Privatperson"},"name":{"type":"string"},"contact_person":{"type":["string","null"]},"street":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string","description":"ISO 3166-1 alpha-2"},"vat_id":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"notes":{"type":["string","null"]},"buyer_reference":{"description":"Leitweg-ID oder Kundenreferenz (BT-10), Vorschlag für Rechnungen","type":["string","null"]},"tax_number":{"description":"Steuernummer (für Gutschriften an diesen Kontakt)","type":["string","null"]},"small_business":{"type":"boolean","description":"Kleinunternehmer nach § 19 UStG (Gutschriften ohne USt)"},"self_billing_agreed_on":{"description":"Gutschriftverfahren vereinbart seit (JJJJ-MM-TT); Voraussetzung für Gutschriften an ihn","type":["string","null"]},"archived":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","number","kind","name","contact_person","street","postal_code","city","country_code","vat_id","email","phone","notes","buyer_reference","tax_number","small_business","self_billing_agreed_on","archived","created_at","updated_at"],"additionalProperties":false},"CustomerCreate":{"type":"object","properties":{"kind":{"type":"string","enum":["business","consumer"]},"name":{"type":"string","maxLength":500},"contact_person":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"street":{"type":"string","maxLength":500},"postal_code":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":500},"country_code":{"description":"Standard DE","type":"string","minLength":2,"maxLength":2},"vat_id":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"buyer_reference":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"tax_number":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"small_business":{"type":"boolean"},"self_billing_agreed_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["kind","name","street","postal_code","city"]},"CustomerUpdate":{"type":"object","properties":{"kind":{"type":"string","enum":["business","consumer"]},"name":{"type":"string","maxLength":500},"contact_person":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"street":{"type":"string","maxLength":500},"postal_code":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":500},"country_code":{"description":"Standard DE","type":"string","minLength":2,"maxLength":2},"vat_id":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"buyer_reference":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"tax_number":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"small_business":{"type":"boolean"},"self_billing_agreed_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}}},"Article":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"description":"Eigene Artikelnummer, eindeutig je Firma","type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"unit_code":{"type":"string"},"unit_price":{"description":"Einzelpreis netto","$ref":"#/components/schemas/Money"},"service_type":{"type":"string"},"exemption_reason":{"type":["string","null"]},"barcode":{"description":"Barcode (EAN/GTIN oder eigener Code) für die Kasse","type":["string","null"]},"archived":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","number","name","description","unit_code","unit_price","service_type","exemption_reason","barcode","archived","created_at","updated_at"],"additionalProperties":false},"Money":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d{1,15}$","description":"Betrag in Cent als Ganzzahl-String, z. B. \"8500\" = 85,00 €"},"currency":{"type":"string","const":"EUR"}},"required":["amount","currency"],"additionalProperties":false},"ArticleCreate":{"type":"object","properties":{"number":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"name":{"type":"string","maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"unit_code":{"type":"string","enum":["H87","HUR","DAY","LS","MTR","MTK","MTQ","KMT","KGM","LTR","MON"],"description":"Einheit nach UN/ECE Rec. 20, z. B. H87 (Stück), HUR (Stunde)"},"unit_price":{"description":"Einzelpreis netto","$ref":"#/components/schemas/Money"},"service_type":{"description":"Standard: standard (Regelsatz)","type":"string","enum":["standard","reduced_culture","reduced_food","reduced_books","reduced_transport","reduced_accommodation","reduced_showman","zero_solar","exempt","reverse_charge_construction","reverse_charge_eu_service","triangular_supply","intra_community_supply","export"]},"exemption_reason":{"description":"Pflicht bei service_type exempt","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"barcode":{"description":"Barcode für die Kasse, eindeutig je Firma","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["name","unit_code","unit_price"]},"ArticleUpdate":{"type":"object","properties":{"number":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"name":{"type":"string","maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"unit_code":{"type":"string","enum":["H87","HUR","DAY","LS","MTR","MTK","MTQ","KMT","KGM","LTR","MON"],"description":"Einheit nach UN/ECE Rec. 20, z. B. H87 (Stück), HUR (Stunde)"},"unit_price":{"description":"Einzelpreis netto","$ref":"#/components/schemas/Money"},"service_type":{"description":"Standard: standard (Regelsatz)","type":"string","enum":["standard","reduced_culture","reduced_food","reduced_books","reduced_transport","reduced_accommodation","reduced_showman","zero_solar","exempt","reverse_charge_construction","reverse_charge_eu_service","triangular_supply","intra_community_supply","export"]},"exemption_reason":{"description":"Pflicht bei service_type exempt","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"barcode":{"description":"Barcode für die Kasse, eindeutig je Firma","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}}},"SalesDocumentSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer","order","invoice"]},"status":{"type":"string","enum":["draft","open","accepted","rejected","superseded","cancelled"]},"display_status":{"type":"string","enum":["draft","open","expired","accepted","rejected","superseded","cancelled"]},"number":{"type":["string","null"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customer_name":{"type":"string"},"subject":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"valid_until":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"invoice_type":{"anyOf":[{"type":"string","enum":["standard","partial","final","cancellation","credit_note","self_billed","self_billing"],"description":"standard, partial = Abschlagsrechnung, final = Schlussrechnung, cancellation = Stornorechnung, credit_note = Rechnungskorrektur (Gutschrift an den Kunden, Mengen und Beträge negativ), self_billed = vom Kunden ausgestellte Gutschrift (Gutschriftverfahren; unser Umsatz, Nummer des Kunden, kein Versand, keine E-Rechnung), self_billing = von uns an einen Lieferanten ausgestellte Gutschrift (Ausgabe, Nummer GS-…, E-Rechnung 389; mit corrected_document ihr Storno)"},{"type":"null"}]},"net":{"$ref":"#/components/schemas/Money"},"gross":{"$ref":"#/components/schemas/Money"},"amount_due":{"$ref":"#/components/schemas/Money"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","status","display_status","number","version","customer_id","customer_name","subject","issue_date","valid_until","due_date","invoice_type","net","gross","amount_due","updated_at"],"additionalProperties":false},"SalesDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer","order","invoice"]},"status":{"type":"string","enum":["draft","open","accepted","rejected","superseded","cancelled"]},"display_status":{"type":"string","enum":["draft","open","expired","accepted","rejected","superseded","cancelled"],"description":"Wie status, offene Angebote nach valid_until: expired"},"number":{"description":"Erst nach dem Abschließen/Festschreiben gesetzt","type":["string","null"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"root_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source_document_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customer":{"type":"object","properties":{"number":{"type":"string"},"name":{"type":"string"},"contact_person":{"type":["string","null"]},"street":{"type":"string"},"postal_code":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"vat_id":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["number","name","contact_person","street","postal_code","city","country_code","vat_id","email"],"additionalProperties":false},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"valid_until":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"service_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"service_period_from":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string"},"head_text":{"type":["string","null"]},"foot_text":{"type":["string","null"]},"price_mode":{"type":"string","enum":["net","gross"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["item","text"]},"article_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string"},"description":{"type":["string","null"]},"quantity":{"type":"string","description":"Dezimalzahl mit Punkt, bis 3 Nachkommastellen"},"unit_code":{"type":["string","null"]},"unit_price":{"description":"Einzelpreis in der Preisart des Belegs (price_mode)","$ref":"#/components/schemas/Money"},"discount_percent":{"type":"string"},"service_type":{"type":["string","null"]},"exemption_reason":{"type":["string","null"]},"vat_category":{"type":["string","null"]},"vat_rate_percent":{"type":"string"},"amount":{"description":"Positionsbetrag nach Rabatt, in der Preisart des Belegs","$ref":"#/components/schemas/Money"}},"required":["id","position","kind","article_id","title","description","quantity","unit_code","unit_price","discount_percent","service_type","exemption_reason","vat_category","vat_rate_percent","amount"],"additionalProperties":false}},"installments":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"kind":{"type":"string","enum":["percent","fixed"]},"percent":{"type":["string","null"]},"amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"due_days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"gross":{"$ref":"#/components/schemas/Money"}},"required":["position","label","kind","percent","amount","due_days","gross"],"additionalProperties":false}},"totals":{"type":"object","properties":{"net":{"$ref":"#/components/schemas/Money"},"vat":{"$ref":"#/components/schemas/Money"},"gross":{"$ref":"#/components/schemas/Money"},"breakdown":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","description":"Steuerkategorie nach EN 16931 (S, Z, E, AE, K, G …)"},"rate_percent":{"type":"string","description":"Steuersatz in Prozent, z. B. \"19\""},"net":{"$ref":"#/components/schemas/Money"},"vat":{"$ref":"#/components/schemas/Money"},"gross":{"$ref":"#/components/schemas/Money"}},"required":["category","rate_percent","net","vat","gross"],"additionalProperties":false}}},"required":["net","vat","gross","breakdown"],"additionalProperties":false},"small_business":{"type":"boolean","description":"Kleinunternehmer (§ 19 UStG) am Belegdatum"},"invoice_type":{"anyOf":[{"type":"string","enum":["standard","partial","final","cancellation","credit_note","self_billed","self_billing"],"description":"standard, partial = Abschlagsrechnung, final = Schlussrechnung, cancellation = Stornorechnung, credit_note = Rechnungskorrektur (Gutschrift an den Kunden, Mengen und Beträge negativ), self_billed = vom Kunden ausgestellte Gutschrift (Gutschriftverfahren; unser Umsatz, Nummer des Kunden, kein Versand, keine E-Rechnung), self_billing = von uns an einen Lieferanten ausgestellte Gutschrift (Ausgabe, Nummer GS-…, E-Rechnung 389; mit corrected_document ihr Storno)"},{"type":"null"}]},"buyer_reference":{"type":["string","null"]},"source":{"anyOf":[{"$ref":"#/components/schemas/DocumentRef"},{"type":"null"}]},"corrected_document":{"anyOf":[{"$ref":"#/components/schemas/DocumentRef"},{"type":"null"}]},"external_number":{"description":"Nur self_billed: Gutschrift-Nummer des Kunden","type":["string","null"]},"incoming_document_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Nur self_billed: Original im Rechnungseingang"},"installment_index":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"prepayments":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"net":{"$ref":"#/components/schemas/Money"},"vat":{"$ref":"#/components/schemas/Money"},"gross":{"$ref":"#/components/schemas/Money"}},"required":["invoice_id","number","issue_date","net","vat","gross"],"additionalProperties":false}},"amount_due":{"description":"Brutto abzüglich abgezogener Abschlagsrechnungen","$ref":"#/components/schemas/Money"},"invoice_issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"message":{"type":"string"}},"required":["code","line","message"],"additionalProperties":false},"description":"Fehlende Pflichtangaben eines Rechnungsentwurfs (sonst leer)"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finalized_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"decided_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","kind","status","display_status","number","version","root_id","source_document_id","customer_id","customer","issue_date","valid_until","service_date","service_period_from","due_date","subject","head_text","foot_text","price_mode","lines","installments","totals","small_business","invoice_type","buyer_reference","source","corrected_document","external_number","incoming_document_id","installment_index","prepayments","amount_due","invoice_issues","created_at","updated_at","finalized_at","decided_at"],"additionalProperties":false},"DocumentRef":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer","order","invoice"]},"number":{"type":["string","null"]},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["id","kind","number","issue_date"],"additionalProperties":false},"OfferCreate":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issue_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"service_date":{"description":"Leistungsdatum; bestimmt den Steuersatz. Leer = issue_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string","maxLength":500},"head_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"foot_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"price_mode":{"description":"Standard: net","type":"string","enum":["net","gross"]},"lines":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/SalesLineInput"}},"installments":{"description":"Abschlagsplan (Angebote und Aufträge)","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/InstallmentInput"}},"valid_until":{"description":"Standard: issue_date + 30 Tage","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["customer_id","subject","lines"]},"SalesLineInput":{"type":"object","properties":{"kind":{"description":"Standard: item","type":"string","enum":["item","text"]},"article_id":{"description":"Artikel aus dem Stamm. Fehlende Felder (Titel, Beschreibung, Einheit, Leistungsart, bei price_mode net auch der Preis) kommen aus dem Artikel.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string","maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"quantity":{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,3})?$","description":"Menge, z. B. \"1.5\". Standard 1"},"unit_code":{"anyOf":[{"type":"string","enum":["H87","HUR","DAY","LS","MTR","MTK","MTQ","KMT","KGM","LTR","MON"],"description":"Einheit nach UN/ECE Rec. 20, z. B. H87 (Stück), HUR (Stunde)"},{"type":"null"}]},"unit_price":{"description":"Einzelpreis netto oder brutto je nach price_mode","anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"discount_percent":{"anyOf":[{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,2})?$","description":"Rabatt in Prozent, z. B. \"2.5\""},{"type":"null"}]},"service_type":{"anyOf":[{"type":"string","enum":["standard","reduced_culture","reduced_food","reduced_books","reduced_transport","reduced_accommodation","reduced_showman","zero_solar","exempt","reverse_charge_construction","reverse_charge_eu_service","triangular_supply","intra_community_supply","export"],"description":"Leistungsart; bestimmt Steuerkategorie und Satz am Leistungsdatum"},{"type":"null"}]},"exemption_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}}},"InstallmentInput":{"type":"object","properties":{"label":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["percent","fixed"]},"percent":{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,2})?$","description":"Bei kind percent: Anteil am Brutto in Prozent"},"amount":{"description":"Bei kind fixed: Bruttobetrag","$ref":"#/components/schemas/Money"},"due_days":{"description":"Zahlungsziel in Tagen","anyOf":[{"type":"integer","minimum":0,"maximum":3650},{"type":"null"}]}},"required":["label","kind"]},"OfferUpdate":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issue_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"service_date":{"description":"Leistungsdatum; bestimmt den Steuersatz. Leer = issue_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string","maxLength":500},"head_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"foot_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"price_mode":{"description":"Standard: net","type":"string","enum":["net","gross"]},"lines":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/SalesLineInput"}},"installments":{"description":"Abschlagsplan (Angebote und Aufträge)","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/InstallmentInput"}},"valid_until":{"description":"Standard: issue_date + 30 Tage","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}}},"SentEmail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"attachments":{"type":"array","items":{"type":"string"},"description":"Dateinamen der Anhänge"},"sent_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","to","cc","subject","attachments","sent_at"],"additionalProperties":false},"SendDocument":{"type":"object","properties":{"to":{"description":"Standard: E-Mail-Adresse des Kunden","minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"cc":{"maxItems":20,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subject":{"description":"Standard: Textbaustein der Firma","type":"string","maxLength":200},"text":{"description":"Standard: Textbaustein der Firma","type":"string","maxLength":20000},"attach_xrechnung":{"description":"Nur Rechnungen mit Leitweg-ID: XRechnung-XML zusätzlich anhängen","type":"boolean"}}},"InvoicingState":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/SalesDocumentSummary"}},"can_standard":{"type":"boolean","description":"Normale Rechnung möglich"},"installments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"gross":{"$ref":"#/components/schemas/Money"},"invoice_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["index","label","gross","invoice_id"],"additionalProperties":false}},"can_final":{"type":"boolean","description":"Schlussrechnung möglich"}},"required":["invoices","can_standard","installments","can_final"],"additionalProperties":false},"InvoiceFromSource":{"type":"object","properties":{"type":{"type":"string","enum":["standard","partial","final"],"description":"standard = normale Rechnung, partial = Abschlagsrechnung, final = Schlussrechnung"},"installment_index":{"description":"Bei partial: Index des Abschlags im Plan (0-basiert)","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type"]},"OrderCreate":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issue_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"service_date":{"description":"Leistungsdatum; bestimmt den Steuersatz. Leer = issue_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string","maxLength":500},"head_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"foot_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"price_mode":{"description":"Standard: net","type":"string","enum":["net","gross"]},"lines":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/SalesLineInput"}},"installments":{"description":"Abschlagsplan (Angebote und Aufträge)","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/InstallmentInput"}}},"required":["customer_id","subject","lines"]},"OrderUpdate":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issue_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"service_date":{"description":"Leistungsdatum; bestimmt den Steuersatz. Leer = issue_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string","maxLength":500},"head_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"foot_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"price_mode":{"description":"Standard: net","type":"string","enum":["net","gross"]},"lines":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/SalesLineInput"}},"installments":{"description":"Abschlagsplan (Angebote und Aufträge)","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/InstallmentInput"}}}},"InvoiceCreate":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issue_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"service_date":{"description":"Leistungsdatum; bestimmt den Steuersatz. Leer = issue_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string","maxLength":500},"head_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"foot_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"price_mode":{"description":"Standard: net","type":"string","enum":["net","gross"]},"lines":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/SalesLineInput"}},"installments":{"description":"Abschlagsplan (Angebote und Aufträge)","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/InstallmentInput"}},"due_date":{"description":"Standard: issue_date + 14 Tage","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"service_period_from":{"description":"Beginn des Leistungszeitraums bis service_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"buyer_reference":{"description":"Leitweg-ID/Referenz (BT-10). Weglassen = Wert des Kunden","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"invoice_type":{"description":"Standard: standard. credit_note = Rechnungskorrektur ohne Bezug auf eine Rechnung (Bonus, Kulanz): Mengen positiv angeben, gespeichert und ausgegeben werden sie negativ. Mit Bezug: POST /invoices/{id}/credit-notes. self_billed = Gutschrift, die der Kunde ausgestellt hat (z. B. Provisionsabrechnung): external_number ist Pflicht und wird beim Festschreiben zur Belegnummer. self_billing = Gutschrift an einen Lieferanten (Gutschriftverfahren): customer_id ist der Lieferant (mit vereinbartem Gutschriftverfahren und Steuernummer oder USt-IdNr.); Umsatzsteuer nach seinem Status. Beim Festschreiben entsteht ein Eingangsbeleg, über den die Ausgabe gebucht und ausgezahlt wird.","type":"string","enum":["standard","credit_note","self_billed","self_billing"]},"incoming_document_id":{"description":"Nur self_billed: Eingangsbeleg mit dem Original. Er darf nicht kontiert sein und wird beim Festschreiben erledigt.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["customer_id","subject","lines"]},"InvoiceUpdate":{"type":"object","properties":{"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"issue_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"service_date":{"description":"Leistungsdatum; bestimmt den Steuersatz. Leer = issue_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"subject":{"type":"string","maxLength":500},"head_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"foot_text":{"description":"Weglassen = Standard-Textbaustein","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"price_mode":{"description":"Standard: net","type":"string","enum":["net","gross"]},"lines":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/SalesLineInput"}},"installments":{"description":"Abschlagsplan (Angebote und Aufträge)","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/InstallmentInput"}},"due_date":{"description":"Standard: issue_date + 14 Tage","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"service_period_from":{"description":"Beginn des Leistungszeitraums bis service_date","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"buyer_reference":{"description":"Leitweg-ID/Referenz (BT-10). Weglassen = Wert des Kunden","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}}},"InvoiceCorrection":{"type":"object","properties":{"cancellation":{"$ref":"#/components/schemas/SalesDocument"},"draft":{"$ref":"#/components/schemas/SalesDocument"}},"required":["cancellation","draft"],"additionalProperties":false},"RecurringInvoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"template_invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Festgeschriebene Rechnung, die als Vorlage dient"},"template_number":{"type":["string","null"]},"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customer_name":{"type":"string"},"template_subject":{"type":"string"},"amount":{"description":"Zahlbetrag der Vorlage","$ref":"#/components/schemas/Money"},"interval":{"type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"next_issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"mode":{"type":"string","enum":["draft","finalize","finalize_and_send"],"description":"draft = nur Entwurf, finalize = festschreiben, finalize_and_send = festschreiben und per Mail senden"},"subject_template":{"description":"Betreff mit Platzhaltern {zeitraum}, {monat}, {quartal}, {jahr}","type":["string","null"]},"active":{"type":"boolean"},"running":{"type":"boolean","description":"Aktiv, nicht beendet und nächster Termin vor dem Enddatum"},"ended_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"last_error":{"type":["string","null"]},"upcoming_dates":{"type":"array","items":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":"Die nächsten Termine (höchstens 6)"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","template_invoice_id","template_number","customer_id","customer_name","template_subject","amount","interval","next_issue_date","end_date","mode","subject_template","active","running","ended_at","last_run_at","last_error","upcoming_dates","created_at"],"additionalProperties":false},"RecurringInvoiceCreate":{"type":"object","properties":{"template_invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Erster Termin. Liegt er in der Vergangenheit, holt der nächste Lauf nach."},"interval":{"type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"end_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"mode":{"description":"Standard: draft","type":"string","enum":["draft","finalize","finalize_and_send"]},"subject_template":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["template_invoice_id","start_date","interval"]},"RecurringInvoiceUpdate":{"type":"object","properties":{"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Erster Termin. Liegt er in der Vergangenheit, holt der nächste Lauf nach."},"interval":{"type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"end_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"mode":{"description":"Standard: draft","type":"string","enum":["draft","finalize","finalize_and_send"]},"subject_template":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}}},"Payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"payment_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["payment","discount","write_off","offset"],"description":"payment = Zahlung (bei Rechnungskorrekturen: Erstattung), discount = gewährter Skonto, write_off = Forderungsausfall, offset = Verrechnung Rechnungskorrektur ↔ Rechnung"},"amount":{"description":"Negativ bei Gegenbuchungen sowie bei Erstattung und Verrechnung auf Rechnungskorrekturen","$ref":"#/components/schemas/Money"},"method":{"type":"string","enum":["bank","cash","card","paypal","other"]},"reference":{"type":["string","null"]},"note":{"type":["string","null"]},"reverses_payment_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Gegenbuchung: die aufgehobene Zahlung"},"offset_document_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Nur Verrechnung: der andere Beleg (Rechnung bzw. Rechnungskorrektur)"},"reversed_by_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Aufgehoben durch diese Gegenbuchung"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","invoice_id","payment_date","kind","amount","method","reference","note","reverses_payment_id","offset_document_id","reversed_by_id","created_at"],"additionalProperties":false},"PaymentState":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["unpaid","partial","paid","written_off","overpaid","void"],"description":"void = Entwurf, storniert oder Stornorechnung; written_off = ausgeglichen mit Forderungsausfall"},"amount_due":{"$ref":"#/components/schemas/Money"},"paid":{"description":"Summe der Zahlungen (ohne Skonto und Ausfall)","$ref":"#/components/schemas/Money"},"discount":{"description":"Gewährter Skonto","$ref":"#/components/schemas/Money"},"written_off":{"description":"Als Forderungsausfall ausgebucht","$ref":"#/components/schemas/Money"},"credited":{"description":"Mit Rechnungskorrekturen verrechnet (auf Rechnungskorrekturen negativ)","$ref":"#/components/schemas/Money"},"outstanding":{"description":"Offener Betrag; negativ = Guthaben des Kunden (Rechnungskorrektur noch nicht erstattet)","$ref":"#/components/schemas/Money"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"overdue":{"type":"boolean"},"days_overdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_payment_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"refund_check":{"type":"boolean","description":"Stornierte Rechnung mit Zahlungseingang: Erstattung prüfen"}},"required":["invoice_id","status","amount_due","paid","discount","written_off","credited","outstanding","due_date","overdue","days_overdue","last_payment_date","refund_check"],"additionalProperties":false},"PaymentResult":{"type":"object","properties":{"payment":{"$ref":"#/components/schemas/Payment"},"state":{"$ref":"#/components/schemas/PaymentState"},"warning":{"anyOf":[{"type":"string","enum":["overpaid"]},{"type":"null"}],"description":"Überzahlung ist erlaubt, wird aber gemeldet"}},"required":["payment","state","warning"],"additionalProperties":false},"PaymentCreate":{"type":"object","properties":{"payment_date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"amount":{"description":"Positiver Betrag","$ref":"#/components/schemas/Money"},"method":{"description":"Standard: bank","type":"string","enum":["bank","cash","card","paypal","other"]},"reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["amount"]},"PaymentAdjustmentCreate":{"type":"object","properties":{"kind":{"type":"string","enum":["discount","write_off"],"description":"discount = gewährter Skonto, write_off = Forderungsausfall (uneinbringlich)"},"date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"amount":{"description":"Standard: der ganze offene Betrag","$ref":"#/components/schemas/Money"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["kind"]},"CreditNoteOffset":{"type":"object","properties":{"invoice_payment":{"$ref":"#/components/schemas/Payment"},"credit_note_payment":{"$ref":"#/components/schemas/Payment"},"invoice_state":{"$ref":"#/components/schemas/PaymentState"},"credit_note_state":{"$ref":"#/components/schemas/PaymentState"}},"required":["invoice_payment","credit_note_payment","invoice_state","credit_note_state"],"additionalProperties":false},"CreditNoteOffsetCreate":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Offene normale oder Schlussrechnung desselben Kunden"},"date":{"description":"Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"amount":{"description":"Positiver Betrag; Standard: so viel wie möglich (kleinerer offener Betrag)","$ref":"#/components/schemas/Money"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["invoice_id"]},"PaymentReverse":{"type":"object","properties":{"payment_date":{"description":"Datum der Gegenbuchung, Standard: heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}},"Receivable":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":["string","null"]},"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customer_name":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"status":{"type":"string","enum":["unpaid","partial","paid","written_off","overpaid","void"]},"amount_due":{"$ref":"#/components/schemas/Money"},"paid":{"$ref":"#/components/schemas/Money"},"outstanding":{"$ref":"#/components/schemas/Money"},"overdue":{"type":"boolean"},"days_overdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["invoice_id","number","customer_id","customer_name","issue_date","due_date","status","amount_due","paid","outstanding","overdue","days_overdue"],"additionalProperties":false},"ReceivablesSummary":{"type":"object","properties":{"open_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open_total":{"$ref":"#/components/schemas/Money"},"overdue_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overdue_total":{"$ref":"#/components/schemas/Money"}},"required":["open_count","open_total","overdue_count","overdue_total"],"additionalProperties":false},"DunningProposal":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"string"},"customer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"customer_name":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"outstanding":{"$ref":"#/components/schemas/Money"},"days_overdue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"due_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Seit wann diese Stufe fällig ist"},"last_notice":{"anyOf":[{"type":"object","properties":{"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["level","title","issue_date","due_date"],"additionalProperties":false},{"type":"null"}]}},"required":["invoice_id","number","customer_id","customer_name","issue_date","due_date","outstanding","days_overdue","level","title","due_from","last_notice"],"additionalProperties":false},"DunningPreview":{"type":"object","properties":{"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paid":{"$ref":"#/components/schemas/Money"},"outstanding":{"$ref":"#/components/schemas/Money"},"previous_fees":{"$ref":"#/components/schemas/Money"},"fee":{"$ref":"#/components/schemas/Money"},"interest":{"$ref":"#/components/schemas/Money"},"interest_rate_percent":{"type":["string","null"]},"total":{"$ref":"#/components/schemas/Money"},"text":{"type":"string"},"due_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"is_due":{"type":"boolean"}},"required":["invoice_id","level","title","issue_date","due_date","paid","outstanding","previous_fees","fee","interest","interest_rate_percent","total","text","due_from","is_due"],"additionalProperties":false},"DunningNotice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"invoice_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 = Zahlungserinnerung, 2 = 1. Mahnung, 3 = 2. Mahnung"},"title":{"type":"string"},"issue_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"outstanding":{"$ref":"#/components/schemas/Money"},"fee":{"$ref":"#/components/schemas/Money"},"previous_fees":{"$ref":"#/components/schemas/Money"},"interest":{"$ref":"#/components/schemas/Money"},"interest_rate_percent":{"type":["string","null"]},"total":{"$ref":"#/components/schemas/Money"},"sent_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"sent_to":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","invoice_id","level","title","issue_date","due_date","outstanding","fee","previous_fees","interest","interest_rate_percent","total","sent_at","sent_to","created_at"],"additionalProperties":false},"IncomingDocumentSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"source":{"type":"string","enum":["email","upload","self_billing"],"description":"self_billing = aus einer eigenen Gutschrift an einen Lieferanten erzeugt"},"kind":{"type":"string","enum":["xrechnung","zugferd","pdf","image","other"]},"status":{"type":"string","enum":["new","done","rejected"],"description":"new = neu, done = erledigt, rejected = abgelehnt"},"status_reason":{"type":["string","null"]},"note":{"type":["string","null"]},"mail":{"anyOf":[{"type":"object","properties":{"from":{"type":["string","null"]},"subject":{"type":["string","null"]},"received_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["from","subject","received_at"],"additionalProperties":false},{"type":"null"}]},"received_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"supplier_name":{"type":["string","null"]},"invoice_number":{"type":["string","null"]},"invoice_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"gross":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["id","file_name","mime_type","size","sha256","source","kind","status","status_reason","note","mail","received_at","created_at","supplier_name","invoice_number","invoice_date","gross"],"additionalProperties":false},"IncomingDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"source":{"type":"string","enum":["email","upload","self_billing"],"description":"self_billing = aus einer eigenen Gutschrift an einen Lieferanten erzeugt"},"kind":{"type":"string","enum":["xrechnung","zugferd","pdf","image","other"]},"status":{"type":"string","enum":["new","done","rejected"],"description":"new = neu, done = erledigt, rejected = abgelehnt"},"status_reason":{"type":["string","null"]},"note":{"type":["string","null"]},"mail":{"anyOf":[{"type":"object","properties":{"from":{"type":["string","null"]},"subject":{"type":["string","null"]},"received_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["from","subject","received_at"],"additionalProperties":false},{"type":"null"}]},"received_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"einvoice":{"anyOf":[{"type":"object","properties":{"number":{"type":["string","null"]},"issue_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"currency":{"type":["string","null"]},"seller":{"type":"object","properties":{"name":{"type":["string","null"]},"vat_id":{"type":["string","null"]},"tax_number":{"type":["string","null"]}},"required":["name","vat_id","tax_number"],"additionalProperties":false},"net":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"vat":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"gross":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"amount_due":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"iban":{"type":["string","null"]},"payment_reference":{"type":["string","null"]}},"required":["number","issue_date","due_date","currency","seller","net","vat","gross","amount_due","iban","payment_reference"],"additionalProperties":false},{"type":"null"}],"description":"Ausgelesene E-Rechnung (XRechnung, ZUGFeRD); sonst null"},"parse_error":{"type":["string","null"]},"validation":{"anyOf":[{"type":"object","properties":{"validator":{"type":"string","enum":["kosit","verapdf","zugferd"]},"valid":{"type":"boolean"},"messages":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","information"]},"code":{"type":["string","null"]},"text":{"type":"string"}},"required":["severity","code","text"],"additionalProperties":false}},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["validator","valid","messages","checked_at"],"additionalProperties":false},{"type":"null"}],"description":"Prüfung durch den KoSIT-Validator; null = noch nicht geprüft"}},"required":["id","file_name","mime_type","size","sha256","source","kind","status","status_reason","note","mail","received_at","created_at","einvoice","parse_error","validation"],"additionalProperties":false},"IncomingDocumentUploadResult":{"type":"object","properties":{"result":{"type":"string","enum":["created","duplicate"]},"document":{"$ref":"#/components/schemas/IncomingDocument"}},"required":["result","document"],"additionalProperties":false},"IncomingDocumentUpload":{"type":"object","properties":{"file":{}},"required":["file"]},"IncomingDocumentStatus":{"type":"object","properties":{"status":{"type":"string","enum":["new","done","rejected"]},"reason":{"description":"Pflicht bei rejected","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["status"]},"IncomingDocumentUpdate":{"type":"object","properties":{"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}}},"BankAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["giro","savings","paypal","credit_card","other"]},"name":{"type":"string"},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"bank_name":{"type":["string","null"]},"currency":{"type":"string"},"ledger_account":{"type":"string","description":"Sachkonto im aktuellen Kontenrahmen"},"opening_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"opening_balance":{"$ref":"#/components/schemas/Money"},"bank_balance":{"description":"Anfangssaldo plus importierte Umsätze","$ref":"#/components/schemas/Money"},"ledger_balance":{"description":"Saldo des Sachkontos laut Buchhaltung","$ref":"#/components/schemas/Money"},"last_statement":{"anyOf":[{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"balance":{"$ref":"#/components/schemas/Money"}},"required":["date","balance"],"additionalProperties":false},{"type":"null"}]},"transactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open_transactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Umsätze mit noch nicht zugeordnetem Rest"},"archived":{"type":"boolean"}},"required":["id","kind","name","iban","bic","bank_name","currency","ledger_account","opening_date","opening_balance","bank_balance","ledger_balance","last_statement","transactions","open_transactions","archived"],"additionalProperties":false},"BankImport":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"file_name":{"type":"string"},"format":{"type":"string","enum":["camt053","mt940","csv","api"],"description":"api = automatischer Abruf über Online-Banking"},"profile":{"type":["string","null"]},"period_from":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"period_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"opening_balance":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"closing_balance":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"balance_difference":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"0 = Salden stimmig, null = nicht prüfbar"},"count_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count_new":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count_duplicate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count_skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","file_name","format","profile","period_from","period_to","opening_balance","closing_balance","balance_difference","count_total","count_new","count_duplicate","count_skipped","created_at"],"additionalProperties":false},"BankImportResult":{"type":"object","properties":{"import_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"format":{"type":"string","enum":["camt053","mt940","csv"]},"profile":{"type":["string","null"]},"count_total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count_new":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count_duplicate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"count_skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance_difference":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"auto_confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Über Regeln sofort gebuchte Umsätze"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["import_id","format","profile","count_total","count_new","count_duplicate","count_skipped","balance_difference","auto_confirmed","warnings"],"additionalProperties":false},"BankStatementUpload":{"type":"object","properties":{"file":{},"profile":{"description":"Nur CSV: Bankprofil; leer = erkennen","type":"string","enum":["sparkasse","volksbank","dkb","ing","generic"]}},"required":["file"]},"BankTransaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bank_account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"booking_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"value_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"amount":{"description":"Eingang positiv, Ausgang negativ","$ref":"#/components/schemas/Money"},"open":{"description":"Noch nicht zugeordneter Rest","$ref":"#/components/schemas/Money"},"counterparty_name":{"type":["string","null"]},"counterparty_iban":{"type":["string","null"]},"counterparty_bic":{"type":["string","null"]},"purpose":{"type":["string","null"]},"booking_text":{"type":["string","null"]},"end_to_end_id":{"type":["string","null"]},"mandate_id":{"type":["string","null"]},"creditor_id":{"type":["string","null"]},"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["invoice","incoming","entry"]},"amount":{"$ref":"#/components/schemas/Money"},"sales_document_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"incoming_document_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"journal_entry_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"label":{"type":["string","null"]},"reversed":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","amount","sales_document_id","incoming_document_id","journal_entry_id","label","reversed","created_at"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","bank_account_id","booking_date","value_date","amount","open","counterparty_name","counterparty_iban","counterparty_bic","purpose","booking_text","end_to_end_id","mandate_id","creditor_id","matches","created_at"],"additionalProperties":false},"LedgerAccount":{"type":"object","properties":{"chart":{"type":"string","enum":["skr03","skr04"]},"number":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["asset","liability","equity","revenue","expense","private","tax","neutral"]},"role":{"description":"Systemrolle, z. B. bank, receivables, vat_output","type":["string","null"]},"vat_code":{"description":"Vorbelegter Steuerschlüssel","type":["string","null"]},"automatic":{"type":"boolean","description":"DATEV-Automatikkonto (Steuer wird herausgerechnet)"},"standard":{"type":"boolean","description":"Aus dem Standard-Kontenrahmen (false = eigenes Konto)"},"archived":{"type":"boolean"}},"required":["chart","number","name","kind","role","vat_code","automatic","standard","archived"],"additionalProperties":false},"AccountLines":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/LedgerAccount"},"lines":{"type":"array","items":{"type":"object","properties":{"entry_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entry_number":{"type":"string"},"entry_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":{"type":"string"},"document_ref":{"type":["string","null"]},"debit":{"$ref":"#/components/schemas/Money"},"credit":{"$ref":"#/components/schemas/Money"},"balance":{"description":"Saldo im Zeitraum nach dieser Zeile (Soll − Haben)","$ref":"#/components/schemas/Money"},"vat_code":{"type":["string","null"]},"text":{"type":["string","null"]}},"required":["entry_id","entry_number","entry_date","period","description","document_ref","debit","credit","balance","vat_code","text"],"additionalProperties":false}},"totals":{"type":"object","properties":{"debit":{"$ref":"#/components/schemas/Money"},"credit":{"$ref":"#/components/schemas/Money"},"balance":{"$ref":"#/components/schemas/Money"}},"required":["debit","credit","balance"],"additionalProperties":false}},"required":["account","lines","totals"],"additionalProperties":false},"VatCode":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"direction":{"type":"string","enum":["output","input","none"]},"rate":{"type":"string","enum":["standard","reduced","zero","none"]},"datev_bu":{"type":["string","null"]},"kz_base":{"type":["string","null"]},"kz_tax":{"type":["string","null"]},"kz_input_tax":{"type":["string","null"]}},"required":["code","label","direction","rate","datev_bu","kz_base","kz_tax","kz_input_tax"],"additionalProperties":false},"CostCenter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"}},"required":["id","code","name","active"],"additionalProperties":false},"LedgerPeriod":{"type":"object","properties":{"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"status":{"type":"string","enum":["open","closed"]},"closed_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"entries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["period","status","closed_at","entries"],"additionalProperties":false},"JournalEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"string","description":"Buchungsnummer \"Wirtschaftsjahr/laufende Nummer\", z. B. 2026/15"},"fiscal_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"entry_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"entry_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Belegdatum"},"period":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat (später, wenn der Monat festgeschrieben war)"},"chart":{"type":"string","enum":["skr03","skr04"]},"description":{"type":"string"},"document_ref":{"type":["string","null"]},"source_type":{"type":"string","description":"Herkunft: manual, sales_invoice, invoice_payment, incoming_document, bank, cash, …"},"source_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reverses_entry_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reversed_by_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"account":{"type":"string"},"debit":{"$ref":"#/components/schemas/Money"},"credit":{"$ref":"#/components/schemas/Money"},"vat_code":{"type":["string","null"]},"vat_role":{"anyOf":[{"type":"string","enum":["base","output_tax","input_tax","deferred_output_tax"]},{"type":"null"}]},"vat_rate":{"description":"Steuersatz in Prozent, z. B. \"19\"","type":["string","null"]},"vat_base":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Bei Steuerzeilen: Bemessungsgrundlage"},"party_kind":{"anyOf":[{"type":"string","enum":["customer","supplier"]},{"type":"null"}]},"party_id":{"type":["string","null"]},"open_item_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Rechnung bzw. Eingangsbeleg des offenen Postens"},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"text":{"type":["string","null"]}},"required":["line_no","account","debit","credit","vat_code","vat_role","vat_rate","vat_base","party_kind","party_id","open_item_id","cost_center_id","text"],"additionalProperties":false}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","number","fiscal_year","entry_number","entry_date","period","chart","description","document_ref","source_type","source_id","reverses_entry_id","reversed_by_id","lines","created_at"],"additionalProperties":false},"JournalEntryCreate":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Belegdatum; liegt der Monat schon fest, bucht Zahlfuchs in den nächsten offenen"},"description":{"type":"string","minLength":1,"maxLength":300},"document_ref":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"amount_mode":{"description":"Beträge mit Steuerschlüssel brutto (Standard) oder netto","type":"string","enum":["gross","net"]},"lines":{"minItems":2,"maxItems":50,"type":"array","items":{"type":"object","properties":{"account":{"type":"string","pattern":"^\\d{4,8}$","description":"Sachkonto im Kontenrahmen am Belegdatum"},"debit":{"type":"string","pattern":"^[1-9]\\d{0,14}$","description":"Betrag in Cent, z. B. \"8500\" = 85,00 €"},"credit":{"type":"string","pattern":"^[1-9]\\d{0,14}$","description":"Betrag in Cent, z. B. \"8500\" = 85,00 €"},"vat_code":{"description":"Steuerschlüssel; die Steuerzeile bildet Zahlfuchs selbst (Betrag brutto oder netto laut amount_mode)","type":"string","enum":["none","ust_standard","ust_reduced","ust_zero","ust_free","ust_igl","ust_export","ust_rc_out","ust_eu_service","ust_triangular","ust_not_taxable","vst_standard","vst_reduced","vst_ig_acquisition_standard","vst_ig_acquisition_reduced","vst_rc13b_eu","vst_rc13b_foreign","vst_rc13b_standard","vst_rc13b_reduced","vst_import"]},"cost_center_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["account"]}}},"required":["date","description","lines"]},"JournalEntryReverse":{"type":"object","properties":{"date":{"description":"Datum der Gegenbuchung; Standard: Datum der Buchung","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}}},"LedgerScheme":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"chart":{"type":"string","enum":["skr03","skr04"]},"bookkeeping":{"type":"string","enum":["cash_basis","double_entry"]},"vat_basis":{"type":"string","enum":["accrual","cash"]},"small_business":{"type":"boolean"},"fiscal_year_start_month":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","chart","bookkeeping","vat_basis","small_business","fiscal_year_start_month"],"additionalProperties":false},"CashRegister":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"account":{"description":"Eigenes Kassenkonto; null = Standard-Kasse des Kontenrahmens","type":["string","null"]},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"opening_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"opening_balance":{"$ref":"#/components/schemas/Money"},"balance":{"description":"Bestand laut Kassenbuch","$ref":"#/components/schemas/Money"},"last_entry_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"last_report_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"entries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","name","account","cost_center_id","opening_date","opening_balance","balance","last_entry_date","last_report_date","entries","active","created_at"],"additionalProperties":false},"CashEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"register_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Laufende Nummer je Kasse, lückenlos"},"entry_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"kind":{"type":"string","enum":["opening","revenue","receipt","expense","deposit_bank","deposit_private","withdrawal_bank","withdrawal_private","difference","invoice_payment","incoming_payment"]},"amount":{"description":"Einnahme/Einlage positiv, Ausgabe/Entnahme negativ","$ref":"#/components/schemas/Money"},"balance_after":{"$ref":"#/components/schemas/Money"},"account":{"type":["string","null"]},"vat_code":{"type":["string","null"]},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"document_ref":{"type":["string","null"]},"reverses_entry_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reversed_by_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reason":{"description":"Begründung bei Storno und Kassendifferenz","type":["string","null"]},"report_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Tageskassenbericht, aus dem die Zeile stammt"},"invoice_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"incoming_document_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"journal_entry_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","register_id","number","entry_date","kind","amount","balance_after","account","vat_code","cost_center_id","description","document_ref","reverses_entry_id","reversed_by_id","reason","report_id","invoice_id","incoming_document_id","journal_entry_id","created_at"],"additionalProperties":false},"CashEntryCreate":{"type":"object","properties":{"kind":{"type":"string","enum":["receipt","expense","deposit_bank","deposit_private","withdrawal_bank","withdrawal_private"],"description":"receipt = Einnahme, expense = Ausgabe, deposit_bank/deposit_private = Einlage, withdrawal_bank/withdrawal_private = Entnahme"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"amount":{"type":"string","pattern":"^[1-9]\\d{0,14}$","description":"Betrag in Cent, positiv; die Richtung ergibt sich aus kind"},"account":{"description":"Gegenkonto bei Einnahme und Ausgabe; bei Bank und Privat vorgegeben","anyOf":[{"type":"string","pattern":"^\\d{4,8}$"},{"type":"null"}]},"vat_code":{"anyOf":[{"type":"string","enum":["none","ust_standard","ust_reduced","ust_zero","ust_free","ust_igl","ust_export","ust_rc_out","ust_eu_service","ust_triangular","ust_not_taxable","vst_standard","vst_reduced","vst_ig_acquisition_standard","vst_ig_acquisition_reduced","vst_rc13b_eu","vst_rc13b_foreign","vst_rc13b_standard","vst_rc13b_reduced","vst_import"],"description":"Steuerschlüssel (siehe GET /vat-codes)"},{"type":"null"}]},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string","minLength":1,"maxLength":500},"document_ref":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["kind","date","amount","description"]},"CashEntryReverse":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Pflicht: warum storniert wird"},"date":{"description":"Datum des Stornos; Standard heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["reason"]},"PosRegister":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cash_register_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Kasse im Kassenbuch (GET /cash-registers/{id})"},"cash_register_name":{"type":"string"},"serial_number":{"type":"string","description":"Seriennummer der Kasse (Kassen-ID)"},"status":{"type":"string","enum":["active","decommissioned"]},"location":{"type":"object","properties":{"name":{"type":"string"},"street":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"}},"required":["name","street","zip","city"],"additionalProperties":false},"tse":{"type":"object","properties":{"provider":{"type":"string"},"certified":{"type":"boolean","description":"false = Test-TSE, nicht für den Echtbetrieb"},"serial_number":{"type":"string"},"public_key":{"type":"string"},"certificate":{"type":["string","null"]},"signature_algorithm":{"type":"string"},"time_format":{"type":"string"},"certification_id":{"type":["string","null"]}},"required":["provider","certified","serial_number","public_key","certificate","signature_algorithm","time_format","certification_id"],"additionalProperties":false},"software_name":{"type":"string"},"software_version":{"type":"string"},"commissioned_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"decommissioned_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"decommission_reason":{"type":["string","null"]},"reported_commission_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Mitteilung an das Finanzamt (§ 146a Abs. 4 AO) als erledigt markiert"},"reported_decommission_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"outage_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Offener TSE-Ausfall seit, sonst null"}},"required":["id","cash_register_id","cash_register_name","serial_number","status","location","tse","software_name","software_version","commissioned_at","decommissioned_at","decommission_reason","reported_commission_at","reported_decommission_at","outage_since"],"additionalProperties":false},"PosTransaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"register_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Vorgangsnummer je Kasse, lückenlos"},"status":{"type":"string","enum":["open","finished"]},"kind":{"type":"string","enum":["receipt","cancellation","abort","training","transfer"],"description":"receipt = Beleg, cancellation = Storno, abort = Abbruch, training = Training, transfer = Einlage/Entnahme"},"started_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finished_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"receipt_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"operator_name":{"type":"string"},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"customer_name":{"type":["string","null"]},"cancels_transaction_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cancelled_by_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"total":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Summe brutto; null bei offenem Vorgang"},"note":{"type":["string","null"]},"tse":{"type":"object","properties":{"transaction_id":{"type":"string"},"transaction_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"signature_counter":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"start":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"end":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"signature":{"type":["string","null"]},"process_type":{"type":["string","null"]},"process_data":{"type":["string","null"]},"failed":{"type":"boolean","description":"TSE ausgefallen: Beleg ohne Signatur"},"error":{"type":["string","null"]}},"required":["transaction_id","transaction_number","signature_counter","start","end","signature","process_type","process_data","failed","error"],"additionalProperties":false},"qr_payload":{"description":"Inhalt des QR-Codes nach DSFinV-K; null bei TSE-Ausfall","type":["string","null"]},"receipt_url":{"description":"Digitaler Beleg zum Weitergeben (ohne Anmeldung)","type":["string","null"]},"journal_entry_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/PosLine"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PosPayment"}},"issued_vouchers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"}},"required":["id","code","amount"],"additionalProperties":false}}},"required":["id","register_id","number","status","kind","started_at","finished_at","receipt_date","operator_name","customer_id","customer_name","cancels_transaction_id","cancelled_by_id","total","note","tse","qr_payload","receipt_url","journal_entry_id","lines","payments","issued_vouchers"],"additionalProperties":false},"PosLine":{"type":"object","properties":{"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"business_case":{"type":"string","description":"Geschäftsvorfall nach DSFinV-K, z. B. Umsatz"},"article_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"article_number":{"type":["string","null"]},"text":{"type":"string"},"quantity":{"type":"string","description":"Dezimalzahl mit Punkt, bis 3 Nachkommastellen"},"unit_price":{"description":"Einzelpreis brutto","$ref":"#/components/schemas/Money"},"discount":{"description":"Rabatt brutto","$ref":"#/components/schemas/Money"},"gross":{"$ref":"#/components/schemas/Money"},"net":{"$ref":"#/components/schemas/Money"},"vat":{"$ref":"#/components/schemas/Money"},"vat_code":{"type":"string","enum":["ust_standard","ust_reduced","ust_free","none"],"description":"ust_standard = Regelsatz, ust_reduced = ermäßigt, ust_free = steuerfrei, none = ohne"},"vat_rate":{"type":"string","description":"Steuersatz in Prozent, z. B. \"19\""},"order_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"invoice_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"voucher_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["position","business_case","article_id","article_number","text","quantity","unit_price","discount","gross","net","vat","vat_code","vat_rate","order_id","invoice_id","voucher_id"],"additionalProperties":false},"PosPayment":{"type":"object","properties":{"method":{"type":"string","enum":["cash","card","transfer","other","voucher"],"description":"cash = bar, card = Karte, transfer = Überweisung, other = sonstige unbar, voucher = Gutschein"},"amount":{"$ref":"#/components/schemas/Money"},"tendered":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Bei Bar: gegeben (Rückgeld = tendered − amount)"},"voucher_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"voucher_code":{"type":["string","null"]}},"required":["method","amount","tendered","voucher_id","voucher_code"],"additionalProperties":false},"PosSaleCreate":{"type":"object","properties":{"lines":{"minItems":1,"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/PosSaleLineInput"}},"payments":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/PosSalePaymentInput"}},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"customer_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["lines","payments"]},"PosSaleLineInput":{"type":"object","properties":{"kind":{"description":"sale = Verkauf (Standard), voucher_sale = Mehrzweckgutschein verkaufen, deposit = Anzahlung auf einen Kassenauftrag, order_settlement = Restzahlung eines Kassenauftrags, invoice_payment = Zahlung auf eine Rechnung","type":"string","enum":["sale","voucher_sale","deposit","order_settlement","invoice_payment"]},"article_id":{"description":"Artikel; Text, Preis und Steuer kommen aus ihm","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"text":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"quantity":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,3})?$","description":"Menge, z. B. \"1.5\". Standard 1"},{"type":"null"}]},"unit_price":{"description":"Einzelpreis brutto","anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"discount":{"description":"Rabatt auf die Position, brutto","anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"vat_code":{"anyOf":[{"type":"string","enum":["ust_standard","ust_reduced","ust_free","none"],"description":"ust_standard = Regelsatz, ust_reduced = ermäßigt, ust_free = steuerfrei, none = ohne"},{"type":"null"}]},"order_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"invoice_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}}},"PosSalePaymentInput":{"type":"object","properties":{"method":{"type":"string","enum":["cash","card","transfer","other","voucher"],"description":"cash = bar, card = Karte, transfer = Überweisung, other = sonstige unbar, voucher = Gutschein"},"amount":{"description":"Bei Bar: Betrag ohne Rückgeld","$ref":"#/components/schemas/Money"},"tendered":{"description":"Bei Bar: gegeben (für Rückgeld auf dem Beleg)","anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"voucher_code":{"description":"Bei Gutschein: Code","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["method","amount"]},"PosTransactionCancel":{"type":"object","properties":{"reason":{"type":"string","minLength":3,"maxLength":500,"description":"Pflicht: warum storniert wird"}},"required":["reason"]},"PosClosing":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"register_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"first_transaction_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_transaction_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"totals":{"$ref":"#/components/schemas/PosClosingTotals"},"expected_cash":{"$ref":"#/components/schemas/Money"},"counted":{"$ref":"#/components/schemas/Money"},"difference":{"description":"Gezählt minus Soll","$ref":"#/components/schemas/Money"},"count_protocol":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}],"description":"Zählprotokoll: Nennwert in Cent → Stück"},"difference_reason":{"type":["string","null"]},"closed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","register_id","number","date","first_transaction_number","last_transaction_number","totals","expected_cash","counted","difference","count_protocol","difference_reason","closed_at"],"additionalProperties":false},"PosClosingTotals":{"type":"object","properties":{"total":{"$ref":"#/components/schemas/Money"},"by_vat":{"type":"array","items":{"type":"object","properties":{"vat_code":{"type":"string","enum":["ust_standard","ust_reduced","ust_free","none"],"description":"ust_standard = Regelsatz, ust_reduced = ermäßigt, ust_free = steuerfrei, none = ohne"},"vat_rate":{"type":"string"},"gross":{"$ref":"#/components/schemas/Money"},"net":{"$ref":"#/components/schemas/Money"},"vat":{"$ref":"#/components/schemas/Money"}},"required":["vat_code","vat_rate","gross","net","vat"],"additionalProperties":false}},"by_payment":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["cash","card","transfer","other","voucher"],"description":"cash = bar, card = Karte, transfer = Überweisung, other = sonstige unbar, voucher = Gutschein"},"amount":{"$ref":"#/components/schemas/Money"}},"required":["method","amount"],"additionalProperties":false}},"by_business_case":{"type":"array","items":{"type":"object","properties":{"business_case":{"type":"string"},"vat_code":{"type":"string","enum":["ust_standard","ust_reduced","ust_free","none"],"description":"ust_standard = Regelsatz, ust_reduced = ermäßigt, ust_free = steuerfrei, none = ohne"},"gross":{"$ref":"#/components/schemas/Money"}},"required":["business_case","vat_code","gross"],"additionalProperties":false}},"transactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancellations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aborted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"training":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tse_failures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","by_vat","by_payment","by_business_case","transactions","cancellations","aborted","training","tse_failures"],"additionalProperties":false},"PosClosingPreview":{"type":"object","properties":{"register_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"first_transaction_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_transaction_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"open_transactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Offene Vorgänge; vor dem Abschluss beenden"},"totals":{"$ref":"#/components/schemas/PosClosingTotals"},"expected_cash":{"description":"Soll-Bestand laut Kassenbuch","$ref":"#/components/schemas/Money"}},"required":["register_id","date","first_transaction_number","last_transaction_number","open_transactions","totals","expected_cash"],"additionalProperties":false},"PosOrder":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"customer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"customer_name":{"type":"string"},"description":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"vat_code":{"type":"string","enum":["ust_standard","ust_reduced","ust_free","none"],"description":"ust_standard = Regelsatz, ust_reduced = ermäßigt, ust_free = steuerfrei, none = ohne"},"status":{"type":"string","enum":["open","completed","cancelled"]},"paid":{"description":"Summe der Anzahlungen","$ref":"#/components/schemas/Money"},"remaining":{"$ref":"#/components/schemas/Money"},"completed_transaction_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","number","customer_id","customer_name","description","total","vat_code","status","paid","remaining","completed_transaction_id","created_at"],"additionalProperties":false},"PosVoucher":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"amount":{"description":"Ausgegebener Wert","$ref":"#/components/schemas/Money"},"balance":{"description":"Restwert","$ref":"#/components/schemas/Money"},"valid":{"type":"boolean","description":"false, wenn der Verkauf des Gutscheins storniert ist"},"issued_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"issued_transaction_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","code","amount","balance","valid","issued_at","issued_transaction_id"],"additionalProperties":false},"VatReturnOverview":{"type":"object","properties":{"period":{"$ref":"#/components/schemas/VatPeriod"},"state":{"type":"string","enum":["open","draft","submitted","overdue","future"]},"computed_payable":{"description":"Kz 83 aus den aktuellen Buchungen","$ref":"#/components/schemas/Money"},"submitted":{"anyOf":[{"$ref":"#/components/schemas/StoredVatReturn"},{"type":"null"}]},"differs":{"type":"boolean","description":"Die Buchungen ergeben heute andere Werte als die abgegebene Meldung"}},"required":["period","state","computed_payable","submitted","differs"],"additionalProperties":false},"VatPeriod":{"type":"object","properties":{"key":{"type":"string","description":"2026-11 (Monat) oder 2026-Q4 (Quartal)"},"label":{"type":"string"},"from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"frequency":{"type":"string","enum":["monthly","quarterly"]},"permanent_extension":{"type":"boolean","description":"Dauerfristverlängerung"},"due_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["key","label","from","to","frequency","permanent_extension","due_date"],"additionalProperties":false},"StoredVatReturn":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","submitted"]},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Kennzahl → Betrag in Cent als Ganzzahl-String, z. B. {\"81\": \"1000000\", \"83\": \"190000\"}. Bemessungsgrundlagen in vollen Euro (Cent 00)."},"submitted_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"submitted_via":{"anyOf":[{"type":"string","enum":["tax_advisor","my_elster","paper"]},{"type":"null"}]},"transfer_ticket":{"type":["string","null"]},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","version","status","values","submitted_on","submitted_via","transfer_ticket","note","created_at"],"additionalProperties":false},"VatReturn":{"type":"object","properties":{"period":{"$ref":"#/components/schemas/VatPeriod"},"computed":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Kennzahl → Betrag in Cent als Ganzzahl-String, z. B. {\"81\": \"1000000\", \"83\": \"190000\"}. Bemessungsgrundlagen in vollen Euro (Cent 00)."},"booked_tax":{"description":"Steuer laut Buchungen (Saldo der Steuerkonten)","$ref":"#/components/schemas/Money"},"rounding_difference":{"$ref":"#/components/schemas/Money"},"special_prepayment":{"anyOf":[{"type":"object","properties":{"amount":{"$ref":"#/components/schemas/Money"},"source":{"type":"string","enum":["submitted","computed","manual"]}},"required":["amount","source"],"additionalProperties":false},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["values","booked_tax","rounding_difference","special_prepayment","warnings"],"additionalProperties":false},"form":{"type":"array","items":{"type":"object","properties":{"line":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"section":{"type":"string"},"label":{"type":"string"},"kz":{"type":["string","null"]},"tax_kz":{"description":"Schlüssel des Steuerbetrags in values","type":["string","null"]}},"required":["line","section","label","kz","tax_kz"],"additionalProperties":false}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/StoredVatReturn"},"description":"Neueste Version zuerst"}},"required":["period","computed","form","versions"],"additionalProperties":false},"EurReport":{"type":"object","properties":{"fiscal_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"form_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"form_exact":{"type":"boolean","description":"false: Vordruck des Jahres noch nicht hinterlegt"},"applicable":{"type":"boolean"},"small_business":{"type":"string","enum":["all","partly","none"]},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"section":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"kz":{"description":"Kennzahl im Formular Anlage EÜR","type":["string","null"]},"line_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"amount":{"description":"Betrag; bei beschränkt abziehbaren Ausgaben der abziehbare Teil","$ref":"#/components/schemas/Money"},"non_deductible":{"$ref":"#/components/schemas/Money"},"accounts":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string"},"name":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"},"non_deductible":{"$ref":"#/components/schemas/Money"}},"required":["account","name","amount","non_deductible"],"additionalProperties":false}}},"required":["key","section","kind","label","kz","line_number","amount","non_deductible","accounts"],"additionalProperties":false}},"totals":{"type":"object","properties":{"income":{"$ref":"#/components/schemas/Money"},"expenses":{"$ref":"#/components/schemas/Money"},"profit":{"$ref":"#/components/schemas/Money"}},"required":["income","expenses","profit"],"additionalProperties":false},"hints":{"type":"array","items":{"type":"object","properties":{"level":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["level","code","message"],"additionalProperties":false}}},"required":["fiscal_year","from","to","form_year","form_exact","applicable","small_business","lines","totals","hints"],"additionalProperties":false},"OpenItemsReport":{"type":"object","properties":{"party":{"type":"string","enum":["customer","supplier"]},"until":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"total":{"$ref":"#/components/schemas/Money"},"buckets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Money"},"description":"not_due, 1_30, 31_60, 61_90, over_90, no_due_date"},"items":{"type":"array","items":{"type":"object","properties":{"open_item_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source":{"type":"string","enum":["sales_invoice","incoming_document"]},"party_id":{"type":["string","null"]},"party_name":{"type":"string"},"document_ref":{"type":["string","null"]},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"days_overdue":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"bucket":{"type":"string"},"amount":{"$ref":"#/components/schemas/Money"}},"required":["open_item_id","source","party_id","party_name","document_ref","date","due_date","days_overdue","bucket","amount"],"additionalProperties":false}}},"required":["party","until","total","buckets","items"],"additionalProperties":false},"CostCenterReport":{"type":"object","properties":{"fiscal_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"period_from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"period_to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"cost_centers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"revenue":{"$ref":"#/components/schemas/Money"},"costs":{"$ref":"#/components/schemas/Money"},"result":{"$ref":"#/components/schemas/Money"},"accounts":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string"},"name":{"type":"string"},"revenue":{"$ref":"#/components/schemas/Money"},"costs":{"$ref":"#/components/schemas/Money"}},"required":["account","name","revenue","costs"],"additionalProperties":false}}},"required":["id","code","name","active","revenue","costs","result","accounts"],"additionalProperties":false}},"unassigned":{"type":"object","properties":{"revenue":{"$ref":"#/components/schemas/Money"},"costs":{"$ref":"#/components/schemas/Money"},"result":{"$ref":"#/components/schemas/Money"}},"required":["revenue","costs","result"],"additionalProperties":false}},"required":["fiscal_year","period_from","period_to","cost_centers","unassigned"],"additionalProperties":false},"ReportTableResult":{"type":"object","properties":{"fiscal_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"period_from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"period_to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"table":{"$ref":"#/components/schemas/ReportTable"},"balanced":{"description":"Soll = Haben bzw. Aktiva = Passiva; sonst null","type":["boolean","null"]}},"required":["fiscal_year","period_from","period_to","table","balanced"],"additionalProperties":false},"ReportTable":{"type":"object","properties":{"title":{"type":"string"},"subtitle":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string"}},"required":["label","kind"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["heading","item","account","subtotal","total"]},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cells":{"type":"array","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Money"},{"type":"object","properties":{"percent":{"type":"string"}},"required":["percent"],"additionalProperties":false},{"type":"null"}],"description":"Text, Betrag (Money), Prozent ({percent: \"12.5\"}) oder leer"}},"account":{"type":["string","null"]},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"entry_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["kind","level","cells","account","cost_center_id","entry_id"],"additionalProperties":false}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","subtitle","columns","rows","notes"],"additionalProperties":false},"DataExport":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"contents":{"type":"array","items":{"type":"string","enum":["sales_documents","incoming_documents","payments","dunning","audit_log","gdpdu"]}},"include_offers":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","done","failed"]},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Größe des ZIP in Bytes"},"file_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"file_name":{"type":"string"},"error":{"type":["string","null"]},"downloadable":{"type":"boolean","description":"Fertig und noch nicht nach 30 Tagen gelöscht"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finished_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["id","from","to","contents","include_offers","status","size","file_count","file_name","error","downloadable","expires_at","created_at","finished_at"],"additionalProperties":false},"DataExportCreate":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Belegdatum ab (einschließlich)"},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Belegdatum bis (einschließlich); höchstens elf Kalenderjahre"},"contents":{"minItems":1,"type":"array","items":{"type":"string","enum":["sales_documents","incoming_documents","payments","dunning","audit_log","gdpdu"]},"description":"sales_documents (Rechnungen als ZUGFeRD-PDF und XRechnung), incoming_documents, payments, dunning, audit_log, gdpdu (Datenträgerüberlassung)"},"include_offers":{"description":"Angebote und Auftragsbestätigungen zusätzlich (nur mit sales_documents)","type":"boolean"}},"required":["from","to","contents"]},"DatevSettings":{"anyOf":[{"type":"object","properties":{"advisor_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"client_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"account_length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lock_entries":{"type":"boolean"},"include_documents":{"type":"boolean"}},"required":["advisor_number","client_number","account_length","lock_entries","include_documents"],"additionalProperties":false},{"type":"null"}],"description":"null: Berater- und Mandantennummer fehlen (Einstellungen in der App)"},"DatevExport":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"period_from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"period_to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"advisor_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"client_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"locked":{"type":"boolean","description":"Mit Festschreibungskennzeichen exportiert"},"all_closed":{"type":"boolean","description":"Alle Monate des Zeitraums waren festgeschrieben"},"entry_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"document_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"file_name":{"type":"string"},"sha256":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warnings":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","period_from","period_to","advisor_number","client_number","locked","all_closed","entry_count","row_count","document_count","file_name","sha256","size","warnings","created_at"],"additionalProperties":false},"DatevExportCreate":{"type":"object","properties":{"period_from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"period_to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"}},"required":["period_from","period_to"]},"DatevExportPreview":{"type":"object","properties":{"period_from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"period_to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"entry_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open_periods":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"}},"settings_missing":{"type":"boolean"}},"required":["period_from","period_to","entry_count","open_periods","settings_missing"],"additionalProperties":false},"CommentThread":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"target":{"type":"object","properties":{"type":{"type":"string","enum":["sales_document","incoming_document","payment","dunning_notice","journal_entry","vat_return","cash_entry","cash_report"],"description":"sales_document, incoming_document, payment, dunning_notice, journal_entry, cash_entry, cash_report oder vat_return"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["type","id"],"additionalProperties":false},"resolved":{"type":"boolean"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"waiting_for":{"type":"string","enum":["advisor","company"],"description":"Wer als Nächstes antworten sollte (Gegenseite des letzten Beitrags)"},"last_activity_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_name":{"type":"string"},"side":{"type":"string","enum":["advisor","company"],"description":"advisor = Steuerkanzlei, company = Firma"},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","author_name","side","body","created_at"],"additionalProperties":false}}},"required":["id","target","resolved","resolved_at","waiting_for","last_activity_at","posts"],"additionalProperties":false},"CommentReply":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":4000}},"required":["body"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["invoice.finalized","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","offer.accepted","offer.rejected","payment.recorded","payment.reversed","incoming_document.received","incoming_document.checked","dunning_notice.created","export.ready","comment.created","pos.transaction.finished","pos.transaction.cancelled","pos.closing.closed","pos.register.commissioned","pos.register.decommissioned"],"description":"Ereignisart, siehe GET /webhook-event-types"}},"active":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","paused"],"description":"paused = nach 3 Tagen ohne erfolgreiche Zustellung angehalten; mit active=true wieder einschalten"},"paused_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"pause_reason":{"type":["string","null"]},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"previous_secret_expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Bis dahin wird nach einem Wechsel zusätzlich mit dem alten Geheimnis signiert"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","url","description","events","active","status","paused_at","pause_reason","failing_since","last_success_at","previous_secret_expires_at","created_at","updated_at"],"additionalProperties":false},"WebhookWithSecret":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["invoice.finalized","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","offer.accepted","offer.rejected","payment.recorded","payment.reversed","incoming_document.received","incoming_document.checked","dunning_notice.created","export.ready","comment.created","pos.transaction.finished","pos.transaction.cancelled","pos.closing.closed","pos.register.commissioned","pos.register.decommissioned"],"description":"Ereignisart, siehe GET /webhook-event-types"}},"active":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","paused"],"description":"paused = nach 3 Tagen ohne erfolgreiche Zustellung angehalten; mit active=true wieder einschalten"},"paused_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"pause_reason":{"type":["string","null"]},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"last_success_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"previous_secret_expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Bis dahin wird nach einem Wechsel zusätzlich mit dem alten Geheimnis signiert"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"secret":{"type":"string","description":"Signatur-Geheimnis (whsec_…). Wird nur bei Anlegen und Wechsel einmal angezeigt."}},"required":["id","url","description","events","active","status","paused_at","pause_reason","failing_since","last_success_at","previous_secret_expires_at","created_at","updated_at","secret"],"additionalProperties":false},"WebhookCreate":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"HTTPS-Adresse, öffentlich erreichbar"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["invoice.finalized","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","offer.accepted","offer.rejected","payment.recorded","payment.reversed","incoming_document.received","incoming_document.checked","dunning_notice.created","export.ready","comment.created","pos.transaction.finished","pos.transaction.cancelled","pos.closing.closed","pos.register.commissioned","pos.register.decommissioned"],"description":"Ereignisart, siehe GET /webhook-event-types"}}},"required":["url","events"]},"WebhookUpdate":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["invoice.finalized","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","offer.accepted","offer.rejected","payment.recorded","payment.reversed","incoming_document.received","incoming_document.checked","dunning_notice.created","export.ready","comment.created","pos.transaction.finished","pos.transaction.cancelled","pos.closing.closed","pos.register.commissioned","pos.register.decommissioned"],"description":"Ereignisart, siehe GET /webhook-event-types"}},"active":{"description":"false = ausschalten; true = einschalten und Pause aufheben","type":"boolean"}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"webhook_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Gleich dem Header webhook-id; bleibt bei Wiederholungen gleich"},"event_type":{"type":"string"},"resource_type":{"type":"string"},"resource_id":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"last_status_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"last_duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","webhook_id","event_id","event_type","resource_type","resource_id","status","attempts","next_attempt_at","last_attempt_at","last_status_code","last_error","last_duration_ms","created_at"],"additionalProperties":false}}},"paths":{"/":{"get":{"operationId":"get","tags":["Allgemein"],"summary":"Übersicht","description":"Version der API und Links zur Doku. Ohne Schlüssel erreichbar.","security":[],"parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"documentation":{"type":"string"},"openapi":{"type":"string"}},"required":["name","version","documentation","openapi"],"additionalProperties":false}}}}}}},"/company":{"get":{"operationId":"getCompany","tags":["Firma"],"summary":"Firmenprofil lesen","description":"Name, Anschrift, Steuer- und Registerangaben, Kontakt und Bankverbindung der Firma.","security":[{"apiKey":["company:read"]},{"oauth2":["company:read"]}],"x-zahlfuchs-scope":"company:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht company:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/tax-profiles":{"get":{"operationId":"getTaxProfiles","tags":["Firma"],"summary":"Steuerprofile lesen","description":"Alle gültigen Steuerprofile, ältestes zuerst. Für einen Beleg gilt das Profil, dessen valid_from am Belegdatum zuletzt begonnen hat.","security":[{"apiKey":["company:read"]},{"oauth2":["company:read"]}],"x-zahlfuchs-scope":"company:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxProfile"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht company:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/customers":{"get":{"operationId":"getCustomers","tags":["Kunden"],"summary":"Kunden auflisten","description":"Älteste zuerst. Archivierte Kunden nur mit include_archived=true.","security":[{"apiKey":["customers:read"]},{"oauth2":["customers:read"]}],"x-zahlfuchs-scope":"customers:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Name, Nummer und Ort","type":"string","maxLength":200},"description":"Sucht in Name, Nummer und Ort"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht customers:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postCustomers","tags":["Kunden"],"summary":"Kunden anlegen","description":"Vergibt die nächste Kundennummer.","security":[{"apiKey":["customers:write"]},{"oauth2":["customers:write"]}],"x-zahlfuchs-scope":"customers:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht customers:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/customers/{id}":{"get":{"operationId":"getCustomersById","tags":["Kunden"],"summary":"Kunden lesen","security":[{"apiKey":["customers:read"]},{"oauth2":["customers:read"]}],"x-zahlfuchs-scope":"customers:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht customers:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchCustomersById","tags":["Kunden"],"summary":"Kunden ändern","description":"Nur die gesendeten Felder ändern sich; null leert ein optionales Feld.","security":[{"apiKey":["customers:write"]},{"oauth2":["customers:write"]}],"x-zahlfuchs-scope":"customers:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht customers:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/customers/{id}/archive":{"post":{"operationId":"postCustomersByIdArchive","tags":["Kunden"],"summary":"Kunden archivieren","description":"Kunden werden nie gelöscht, damit Belege ihnen zugeordnet bleiben. Archivierte Kunden lassen sich nicht in neuen Belegen verwenden.","security":[{"apiKey":["customers:write"]},{"oauth2":["customers:write"]}],"x-zahlfuchs-scope":"customers:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht customers:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/customers/{id}/restore":{"post":{"operationId":"postCustomersByIdRestore","tags":["Kunden"],"summary":"Kunden wiederherstellen","description":"Holt einen archivierten Kunden zurück.","security":[{"apiKey":["customers:write"]},{"oauth2":["customers:write"]}],"x-zahlfuchs-scope":"customers:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht customers:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/articles":{"get":{"operationId":"getArticles","tags":["Artikel"],"summary":"Artikel auflisten","description":"Älteste zuerst. Archivierte Artikel nur mit include_archived=true.","security":[{"apiKey":["articles:read"]},{"oauth2":["articles:read"]}],"x-zahlfuchs-scope":"articles:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Name und Nummer","type":"string","maxLength":200},"description":"Sucht in Name und Nummer"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Article"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht articles:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postArticles","tags":["Artikel"],"summary":"Artikel anlegen","security":[{"apiKey":["articles:write"]},{"oauth2":["articles:write"]}],"x-zahlfuchs-scope":"articles:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Article"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht articles:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/articles/{id}":{"get":{"operationId":"getArticlesById","tags":["Artikel"],"summary":"Artikel lesen","security":[{"apiKey":["articles:read"]},{"oauth2":["articles:read"]}],"x-zahlfuchs-scope":"articles:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Article"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht articles:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchArticlesById","tags":["Artikel"],"summary":"Artikel ändern","description":"Nur die gesendeten Felder ändern sich. Bestehende Belege behalten ihre Werte.","security":[{"apiKey":["articles:write"]},{"oauth2":["articles:write"]}],"x-zahlfuchs-scope":"articles:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Article"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht articles:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/articles/{id}/archive":{"post":{"operationId":"postArticlesByIdArchive","tags":["Artikel"],"summary":"Artikel archivieren","security":[{"apiKey":["articles:write"]},{"oauth2":["articles:write"]}],"x-zahlfuchs-scope":"articles:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Article"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht articles:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/articles/{id}/restore":{"post":{"operationId":"postArticlesByIdRestore","tags":["Artikel"],"summary":"Artikel wiederherstellen","security":[{"apiKey":["articles:write"]},{"oauth2":["articles:write"]}],"x-zahlfuchs-scope":"articles:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Article"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht articles:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers":{"get":{"operationId":"getOffers","tags":["Angebote"],"summary":"Angebote auflisten","description":"Neueste zuerst (nach Belegdatum).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","open","expired","accepted","rejected","superseded","cancelled"]}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Nummer, Betreff und Kundenname","type":"string","maxLength":200},"description":"Sucht in Nummer, Betreff und Kundenname"},{"name":"include_superseded","in":"query","required":false,"schema":{"description":"Ersetzte Versionen mitliefern","type":"string","enum":["true","false"]},"description":"Ersetzte Versionen mitliefern"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SalesDocumentSummary"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postOffers","tags":["Angebote"],"summary":"Angebot als Entwurf anlegen","description":"Legt einen Entwurf an. Ohne Angabe gelten die Standardwerte wie in der Web-App (Datum heute, Textbausteine, Zahlungsziel). Beträge kommen als Cent, Mengen und Prozente als Dezimaltext mit Punkt.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}":{"get":{"operationId":"getOffersById","tags":["Angebote"],"summary":"Angebot lesen","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchOffersById","tags":["Angebote"],"summary":"Entwurf ändern","description":"Nur Entwürfe. Gesendete Felder ersetzen die bisherigen; lines und installments werden als Ganzes ersetzt.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteOffersById","tags":["Angebote"],"summary":"Entwurf löschen","description":"Nur Entwürfe. Abgeschlossene Belege werden nie gelöscht.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Erfolg, ohne Inhalt"},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/finalize":{"post":{"operationId":"postOffersByIdFinalize","tags":["Angebote"],"summary":"Angebot abschließen","description":"Vergibt die Nummer; danach ist der Inhalt unveränderlich. Das PDF wird archiviert.","security":[{"apiKey":["sales:finalize"]},{"oauth2":["sales:finalize"]}],"x-zahlfuchs-scope":"sales:finalize","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:finalize","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/duplicate":{"post":{"operationId":"postOffersByIdDuplicate","tags":["Angebote"],"summary":"Als neuen Entwurf kopieren","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/send":{"post":{"operationId":"postOffersByIdSend","tags":["Angebote"],"summary":"Angebot per E-Mail senden","description":"Über das Postfach der Firma (Einstellungen → E-Mail). Anhang ist das archivierte PDF. Nur abgeschlossene Belege. Ohne Angaben gelten Empfänger, Betreff und Text wie im Versanddialog der Web-App.","security":[{"apiKey":["sales:send"]},{"oauth2":["sales:send"]}],"x-zahlfuchs-scope":"sales:send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDocument"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentEmail"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:send","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/pdf":{"get":{"operationId":"getOffersByIdPdf","tags":["Angebote"],"summary":"PDF herunterladen","description":"Abgeschlossene Belege: das archivierte PDF. Entwürfe: frisch erzeugt mit Wasserzeichen. letterhead=false ohne Briefpapier (für vorgedrucktes Papier, immer frisch erzeugt).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"letterhead","in":"query","required":false,"schema":{"description":"Standard true","type":"string","enum":["true","false"]},"description":"Standard true"}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/invoicing":{"get":{"operationId":"getOffersByIdInvoicing","tags":["Angebote"],"summary":"Abrechnungsstand","description":"Welche Rechnungen es zum Beleg gibt und welche noch möglich sind (normal, Abschläge, Schluss).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicingState"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/invoices":{"post":{"operationId":"postOffersByIdInvoices","tags":["Angebote"],"summary":"Rechnung erstellen","description":"Legt einen Rechnungsentwurf aus dem Beleg an: normale Rechnung, Abschlagsrechnung zu einem Abschlag oder Schlussrechnung (zieht festgeschriebene Abschlagsrechnungen ab).","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceFromSource"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/accept":{"post":{"operationId":"postOffersByIdAccept","tags":["Angebote"],"summary":"Angebot angenommen","description":"Entscheidung des Kunden festhalten. Nur offene (auch abgelaufene) Angebote.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/reject":{"post":{"operationId":"postOffersByIdReject","tags":["Angebote"],"summary":"Angebot abgelehnt","description":"Entscheidung des Kunden festhalten. Nur offene (auch abgelaufene) Angebote.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/new-version":{"post":{"operationId":"postOffersByIdNewVersion","tags":["Angebote"],"summary":"Neue Version","description":"Neue Version eines abgeschlossenen Angebots als Entwurf (gleiche Nummer, version + 1).","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/offers/{id}/convert-to-order":{"post":{"operationId":"postOffersByIdConvertToOrder","tags":["Angebote"],"summary":"In Auftrag umwandeln","description":"Erstellt eine Auftragsbestätigung als Entwurf; das Angebot gilt dann als angenommen.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders":{"get":{"operationId":"getOrders","tags":["Aufträge"],"summary":"Aufträge auflisten","description":"Neueste zuerst (nach Belegdatum).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","open","expired","accepted","rejected","superseded","cancelled"]}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Nummer, Betreff und Kundenname","type":"string","maxLength":200},"description":"Sucht in Nummer, Betreff und Kundenname"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SalesDocumentSummary"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postOrders","tags":["Aufträge"],"summary":"Auftrag als Entwurf anlegen","description":"Legt einen Entwurf an. Ohne Angabe gelten die Standardwerte wie in der Web-App (Datum heute, Textbausteine, Zahlungsziel). Beträge kommen als Cent, Mengen und Prozente als Dezimaltext mit Punkt.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}":{"get":{"operationId":"getOrdersById","tags":["Aufträge"],"summary":"Auftrag lesen","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchOrdersById","tags":["Aufträge"],"summary":"Entwurf ändern","description":"Nur Entwürfe. Gesendete Felder ersetzen die bisherigen; lines und installments werden als Ganzes ersetzt.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteOrdersById","tags":["Aufträge"],"summary":"Entwurf löschen","description":"Nur Entwürfe. Abgeschlossene Belege werden nie gelöscht.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Erfolg, ohne Inhalt"},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/finalize":{"post":{"operationId":"postOrdersByIdFinalize","tags":["Aufträge"],"summary":"Auftrag abschließen","description":"Vergibt die Nummer; danach ist der Inhalt unveränderlich. Das PDF wird archiviert.","security":[{"apiKey":["sales:finalize"]},{"oauth2":["sales:finalize"]}],"x-zahlfuchs-scope":"sales:finalize","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:finalize","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/duplicate":{"post":{"operationId":"postOrdersByIdDuplicate","tags":["Aufträge"],"summary":"Als neuen Entwurf kopieren","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/send":{"post":{"operationId":"postOrdersByIdSend","tags":["Aufträge"],"summary":"Auftrag per E-Mail senden","description":"Über das Postfach der Firma (Einstellungen → E-Mail). Anhang ist das archivierte PDF. Nur abgeschlossene Belege. Ohne Angaben gelten Empfänger, Betreff und Text wie im Versanddialog der Web-App.","security":[{"apiKey":["sales:send"]},{"oauth2":["sales:send"]}],"x-zahlfuchs-scope":"sales:send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDocument"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentEmail"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:send","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/pdf":{"get":{"operationId":"getOrdersByIdPdf","tags":["Aufträge"],"summary":"PDF herunterladen","description":"Abgeschlossene Belege: das archivierte PDF. Entwürfe: frisch erzeugt mit Wasserzeichen. letterhead=false ohne Briefpapier (für vorgedrucktes Papier, immer frisch erzeugt).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"letterhead","in":"query","required":false,"schema":{"description":"Standard true","type":"string","enum":["true","false"]},"description":"Standard true"}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/invoicing":{"get":{"operationId":"getOrdersByIdInvoicing","tags":["Aufträge"],"summary":"Abrechnungsstand","description":"Welche Rechnungen es zum Beleg gibt und welche noch möglich sind (normal, Abschläge, Schluss).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicingState"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/invoices":{"post":{"operationId":"postOrdersByIdInvoices","tags":["Aufträge"],"summary":"Rechnung erstellen","description":"Legt einen Rechnungsentwurf aus dem Beleg an: normale Rechnung, Abschlagsrechnung zu einem Abschlag oder Schlussrechnung (zieht festgeschriebene Abschlagsrechnungen ab).","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceFromSource"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{id}/cancel":{"post":{"operationId":"postOrdersByIdCancel","tags":["Aufträge"],"summary":"Auftrag stornieren","description":"Nur offene Aufträge.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices":{"get":{"operationId":"getInvoices","tags":["Rechnungen"],"summary":"Rechnungen auflisten","description":"Neueste zuerst (nach Belegdatum).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","open","expired","accepted","rejected","superseded","cancelled"]}},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Nummer, Betreff und Kundenname","type":"string","maxLength":200},"description":"Sucht in Nummer, Betreff und Kundenname"},{"name":"invoice_type","in":"query","required":false,"schema":{"type":"string","enum":["standard","partial","final","cancellation","credit_note","self_billed","self_billing"],"description":"standard, partial = Abschlagsrechnung, final = Schlussrechnung, cancellation = Stornorechnung, credit_note = Rechnungskorrektur (Gutschrift an den Kunden, Mengen und Beträge negativ), self_billed = vom Kunden ausgestellte Gutschrift (Gutschriftverfahren; unser Umsatz, Nummer des Kunden, kein Versand, keine E-Rechnung), self_billing = von uns an einen Lieferanten ausgestellte Gutschrift (Ausgabe, Nummer GS-…, E-Rechnung 389; mit corrected_document ihr Storno)"},"description":"standard, partial = Abschlagsrechnung, final = Schlussrechnung, cancellation = Stornorechnung, credit_note = Rechnungskorrektur (Gutschrift an den Kunden, Mengen und Beträge negativ), self_billed = vom Kunden ausgestellte Gutschrift (Gutschriftverfahren; unser Umsatz, Nummer des Kunden, kein Versand, keine E-Rechnung), self_billing = von uns an einen Lieferanten ausgestellte Gutschrift (Ausgabe, Nummer GS-…, E-Rechnung 389; mit corrected_document ihr Storno)"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SalesDocumentSummary"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postInvoices","tags":["Rechnungen"],"summary":"Rechnung als Entwurf anlegen","description":"Legt einen Entwurf an. Ohne Angabe gelten die Standardwerte wie in der Web-App (Datum heute, Textbausteine, Zahlungsziel). Beträge kommen als Cent, Mengen und Prozente als Dezimaltext mit Punkt.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}":{"get":{"operationId":"getInvoicesById","tags":["Rechnungen"],"summary":"Rechnung lesen","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchInvoicesById","tags":["Rechnungen"],"summary":"Entwurf ändern","description":"Nur Entwürfe. Gesendete Felder ersetzen die bisherigen; lines und installments werden als Ganzes ersetzt.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteInvoicesById","tags":["Rechnungen"],"summary":"Entwurf löschen","description":"Nur Entwürfe. Abgeschlossene Belege werden nie gelöscht.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Erfolg, ohne Inhalt"},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/finalize":{"post":{"operationId":"postInvoicesByIdFinalize","tags":["Rechnungen"],"summary":"Rechnung festschreiben","description":"Prüft die Pflichtangaben (§ 14 UStG), vergibt die Rechnungsnummer und schreibt die Rechnung fest. Danach ist sie unveränderlich (GoBD); Änderungen nur per Storno oder Korrektur. Eine Rechnungskorrektur mit Bezug wird dabei mit dem offenen Betrag ihrer Rechnung verrechnet (siehe /invoices/{id}/payments). Das PDF wird archiviert (ZUGFeRD, bei Leitweg-ID zusätzlich XRechnung).","security":[{"apiKey":["sales:finalize"]},{"oauth2":["sales:finalize"]}],"x-zahlfuchs-scope":"sales:finalize","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:finalize","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/duplicate":{"post":{"operationId":"postInvoicesByIdDuplicate","tags":["Rechnungen"],"summary":"Als neuen Entwurf kopieren","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/send":{"post":{"operationId":"postInvoicesByIdSend","tags":["Rechnungen"],"summary":"Rechnung per E-Mail senden","description":"Über das Postfach der Firma (Einstellungen → E-Mail). Anhang ist das archivierte PDF. Nur abgeschlossene Belege. Ohne Angaben gelten Empfänger, Betreff und Text wie im Versanddialog der Web-App.","security":[{"apiKey":["sales:send"]},{"oauth2":["sales:send"]}],"x-zahlfuchs-scope":"sales:send","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDocument"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentEmail"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:send","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/pdf":{"get":{"operationId":"getInvoicesByIdPdf","tags":["Rechnungen"],"summary":"PDF herunterladen","description":"Festgeschriebene Rechnungen: das archivierte ZUGFeRD-PDF (PDF/A-3b mit factur-x.xml). Entwürfe: frisch erzeugt mit Wasserzeichen. letterhead=false ohne Briefpapier (für vorgedrucktes Papier, immer frisch erzeugt).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"letterhead","in":"query","required":false,"schema":{"description":"Standard true","type":"string","enum":["true","false"]},"description":"Standard true"}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/cancel":{"post":{"operationId":"postInvoicesByIdCancel","tags":["Rechnungen"],"summary":"Rechnung stornieren","description":"Erstellt eine festgeschriebene Stornorechnung mit eigener Nummer (Rückgabe); die Rechnung wird cancelled. Das PDF der Stornorechnung wird archiviert.","security":[{"apiKey":["sales:finalize"]},{"oauth2":["sales:finalize"]}],"x-zahlfuchs-scope":"sales:finalize","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:finalize","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/correct":{"post":{"operationId":"postInvoicesByIdCorrect","tags":["Rechnungen"],"summary":"Rechnung korrigieren","description":"Storno wie bei cancel plus ein neuer Rechnungsentwurf als Kopie, den du ändern und festschreiben kannst.","security":[{"apiKey":["sales:finalize"]},{"oauth2":["sales:finalize"]}],"x-zahlfuchs-scope":"sales:finalize","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCorrection"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:finalize","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/credit-notes":{"post":{"operationId":"postInvoicesByIdCreditNotes","tags":["Rechnungen"],"summary":"Rechnungskorrektur zu einer Rechnung anlegen","description":"Legt den Entwurf einer Rechnungskorrektur (Gutschrift an den Kunden, E-Rechnung Typ 381) zu einer offenen normalen oder Schlussrechnung an: Positionen wie auf der Rechnung, Datum heute. Per PATCH auf das gutzuschreibende anpassen (Mengen positiv angeben), dann festschreiben; dabei wird mit dem offenen Betrag der Rechnung verrechnet. Alle Korrekturen zusammen dürfen den Rechnungsbetrag nicht übersteigen (exceeds_invoice).","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/xrechnung":{"get":{"operationId":"getInvoicesByIdXrechnung","tags":["Rechnungen"],"summary":"XRechnung herunterladen","description":"Archivierte XRechnung-XML (CII). Nur festgeschriebene Rechnungen mit Leitweg-ID (buyer_reference).","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"XRechnung (UN/CEFACT CII)","content":{"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/recurring-invoices":{"get":{"operationId":"getRecurringInvoices","tags":["Wiederkehrende Rechnungen"],"summary":"Serien auflisten","description":"Älteste zuerst.","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoice"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postRecurringInvoices","tags":["Wiederkehrende Rechnungen"],"summary":"Serie anlegen","description":"Aus einer festgeschriebenen normalen Rechnung entsteht zu jedem Termin eine neue Rechnung. mode finalize braucht zusätzlich sales:finalize, finalize_and_send auch sales:send.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/recurring-invoices/{id}":{"get":{"operationId":"getRecurringInvoicesById","tags":["Wiederkehrende Rechnungen"],"summary":"Serie lesen","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchRecurringInvoicesById","tags":["Wiederkehrende Rechnungen"],"summary":"Serie ändern","description":"Nur die gesendeten Felder ändern sich. start_date setzt den nächsten Termin.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoiceUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/recurring-invoices/{id}/runs":{"get":{"operationId":"getRecurringInvoicesByIdRuns","tags":["Wiederkehrende Rechnungen"],"summary":"Protokoll der Läufe","description":"Die letzten 100 Schritte, neueste zuerst.","security":[{"apiKey":["sales:read"]},{"oauth2":["sales:read"]}],"x-zahlfuchs-scope":"sales:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scheduled_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"step":{"type":"string","enum":["created","finalized","sent","failed"]},"invoice_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"invoice_number":{"type":["string","null"]},"message":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","scheduled_date","step","invoice_id","invoice_number","message","created_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/recurring-invoices/{id}/pause":{"post":{"operationId":"postRecurringInvoicesByIdPause","tags":["Wiederkehrende Rechnungen"],"summary":"Serie pausieren","description":"Bis zum Fortsetzen entstehen keine Rechnungen.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/recurring-invoices/{id}/resume":{"post":{"operationId":"postRecurringInvoicesByIdResume","tags":["Wiederkehrende Rechnungen"],"summary":"Serie fortsetzen","description":"Verpasste Termine holt der nächste Lauf nach.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/recurring-invoices/{id}/end":{"post":{"operationId":"postRecurringInvoicesByIdEnd","tags":["Wiederkehrende Rechnungen"],"summary":"Serie beenden","description":"Endgültig; eine beendete Serie lässt sich nicht fortsetzen.","security":[{"apiKey":["sales:write"]},{"oauth2":["sales:write"]}],"x-zahlfuchs-scope":"sales:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInvoice"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht sales:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/payments":{"get":{"operationId":"getInvoicesByIdPayments","tags":["Zahlungen"],"summary":"Zahlungen einer Rechnung","description":"Alle Zahlungen und Gegenbuchungen, älteste zuerst, dazu der abgeleitete Zahlungsstatus.","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"state":{"$ref":"#/components/schemas/PaymentState"}},"required":["data","state"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postInvoicesByIdPayments","tags":["Zahlungen"],"summary":"Zahlung erfassen","description":"Zahlungseingang auf eine festgeschriebene Rechnung. Teilzahlungen und Überzahlungen sind möglich. Zahlungen sind unveränderlich; Fehler korrigiert eine Gegenbuchung (reverse). Bei einer Rechnungskorrektur ist es die Erstattung an den Kunden: Betrag positiv angeben, gespeichert wird er negativ.","security":[{"apiKey":["payments:write"]},{"oauth2":["payments:write"]}],"x-zahlfuchs-scope":"payments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/adjustments":{"post":{"operationId":"postInvoicesByIdAdjustments","tags":["Zahlungen"],"summary":"Rest ausbuchen (Skonto oder Forderungsausfall)","description":"Gleicht den offenen Betrag ohne Geldfluss aus: Skonto als Erlösschmälerung, Forderungsausfall als Forderungsverlust, jeweils mit Umsatzsteuer-Korrektur. Höchstens der offene Betrag, nicht bei Abschlagsrechnungen. Aufheben über /payments/{id}/reverse.","security":[{"apiKey":["payments:write"]},{"oauth2":["payments:write"]}],"x-zahlfuchs-scope":"payments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentAdjustmentCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/offsets":{"post":{"operationId":"postInvoicesByIdOffsets","tags":["Zahlungen"],"summary":"Rechnungskorrektur mit einer Rechnung verrechnen","description":"{id} ist die Rechnungskorrektur. Legt zwei Einträge der Art offset an (positiv auf der Rechnung, negativ auf der Korrektur). Aufheben über /payments/{id}/reverse mit einem der beiden Einträge; das hebt beide auf.","security":[{"apiKey":["payments:write"]},{"oauth2":["payments:write"]}],"x-zahlfuchs-scope":"payments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteOffsetCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteOffset"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/payments/{id}/reverse":{"post":{"operationId":"postPaymentsByIdReverse","tags":["Zahlungen"],"summary":"Zahlung aufheben","description":"Legt eine Gegenbuchung über den vollen Betrag an. Die ursprüngliche Zahlung bleibt erhalten (GoBD).","security":[{"apiKey":["payments:write"]},{"oauth2":["payments:write"]}],"x-zahlfuchs-scope":"payments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentReverse"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/receivables":{"get":{"operationId":"getReceivables","tags":["Zahlungen"],"summary":"Offene Posten","description":"Festgeschriebene Rechnungen mit Zahlungsstatus, neueste zuerst (nach Rechnungsdatum).","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"description":"open (Standard) = unbezahlt oder teilweise; all = alle festgeschriebenen","type":"string","enum":["open","overdue","paid","written_off","overpaid","all"]},"description":"open (Standard) = unbezahlt oder teilweise; all = alle festgeschriebenen"},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Receivable"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/receivables/summary":{"get":{"operationId":"getReceivablesSummary","tags":["Zahlungen"],"summary":"Summe offener Posten","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivablesSummary"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dunning-proposals":{"get":{"operationId":"getDunningProposals","tags":["Mahnungen"],"summary":"Mahnvorschläge","description":"Rechnungen, für die laut Mahneinstellungen die nächste Stufe fällig ist.","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DunningProposal"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/dunning-proposal":{"get":{"operationId":"getInvoicesByIdDunningProposal","tags":["Mahnungen"],"summary":"Nächste Mahnstufe (Vorschau)","description":"Was die nächste Mahnstufe enthalten würde: Gebühr, Zinsen, Gesamtbetrag, Text.","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DunningPreview"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/invoices/{id}/dunning-notices":{"get":{"operationId":"getInvoicesByIdDunningNotices","tags":["Mahnungen"],"summary":"Mahnungen einer Rechnung","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DunningNotice"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/dunning-notices/{id}/pdf":{"get":{"operationId":"getDunningNoticesByIdPdf","tags":["Mahnungen"],"summary":"Mahnung als PDF","security":[{"apiKey":["payments:read"]},{"oauth2":["payments:read"]}],"x-zahlfuchs-scope":"payments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Archiviertes PDF der Mahnung","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht payments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/incoming-documents":{"get":{"operationId":"getIncomingDocuments","tags":["Eingangsbelege"],"summary":"Eingangsbelege auflisten","description":"Neueste zuerst (nach Eingang). Höchstens die letzten 2000 Belege je Filter.","security":[{"apiKey":["incoming:read"]},{"oauth2":["incoming:read"]}],"x-zahlfuchs-scope":"incoming:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["new","done","rejected"]}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Absender, Betreff, Dateiname, Lieferant und Rechnungsnummer","type":"string","maxLength":200},"description":"Sucht in Absender, Betreff, Dateiname, Lieferant und Rechnungsnummer"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IncomingDocumentSummary"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht incoming:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postIncomingDocuments","tags":["Eingangsbelege"],"summary":"Eingangsbeleg hochladen","description":"PDF, XRechnung (XML), ZUGFeRD/Factur-X oder Bild als multipart/form-data im Feld file, höchstens 25 MB. E-Rechnungen werden ausgelesen und geprüft. Hat die Firma dieselbe Datei schon, entsteht kein zweiter Beleg: result ist dann duplicate und document der vorhandene Beleg.","security":[{"apiKey":["incoming:write"]},{"oauth2":["incoming:write"]}],"x-zahlfuchs-scope":"incoming:write","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IncomingDocumentUpload","properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","description":"Belegdatei"}},"required":["file"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingDocumentUploadResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht incoming:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/incoming-documents/{id}":{"get":{"operationId":"getIncomingDocumentsById","tags":["Eingangsbelege"],"summary":"Eingangsbeleg lesen","security":[{"apiKey":["incoming:read"]},{"oauth2":["incoming:read"]}],"x-zahlfuchs-scope":"incoming:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht incoming:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchIncomingDocumentsById","tags":["Eingangsbelege"],"summary":"Notiz ändern","security":[{"apiKey":["incoming:write"]},{"oauth2":["incoming:write"]}],"x-zahlfuchs-scope":"incoming:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingDocumentUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht incoming:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/incoming-documents/{id}/file":{"get":{"operationId":"getIncomingDocumentsByIdFile","tags":["Eingangsbelege"],"summary":"Originaldatei herunterladen","description":"Die unverändert abgelegte Datei (PDF, XML oder Bild).","security":[{"apiKey":["incoming:read"]},{"oauth2":["incoming:read"]}],"x-zahlfuchs-scope":"incoming:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Originaldatei mit ihrem Inhaltstyp","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht incoming:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/incoming-documents/{id}/status":{"post":{"operationId":"postIncomingDocumentsByIdStatus","tags":["Eingangsbelege"],"summary":"Status setzen","description":"Erledigt, abgelehnt (mit Grund) oder wieder neu. Der Beleg selbst bleibt unverändert.","security":[{"apiKey":["incoming:write"]},{"oauth2":["incoming:write"]}],"x-zahlfuchs-scope":"incoming:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingDocumentStatus"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingDocument"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht incoming:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/bank-accounts":{"get":{"operationId":"getBankAccounts","tags":["Bank"],"summary":"Bankkonten mit Salden","security":[{"apiKey":["banking:read"]},{"oauth2":["banking:read"]}],"x-zahlfuchs-scope":"banking:read","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht banking:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/bank-accounts/{id}":{"get":{"operationId":"getBankAccountsById","tags":["Bank"],"summary":"Bankkonto lesen","security":[{"apiKey":["banking:read"]},{"oauth2":["banking:read"]}],"x-zahlfuchs-scope":"banking:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht banking:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/bank-accounts/{id}/imports":{"get":{"operationId":"getBankAccountsByIdImports","tags":["Bank"],"summary":"Importierte Kontoauszüge","security":[{"apiKey":["banking:read"]},{"oauth2":["banking:read"]}],"x-zahlfuchs-scope":"banking:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BankImport"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht banking:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/bank-accounts/{id}/statements":{"post":{"operationId":"postBankAccountsByIdStatements","tags":["Bank"],"summary":"Kontoauszug importieren","description":"CAMT.053 (XML oder ZIP), MT940 oder CSV als multipart/form-data im Feld file. Schon importierte Umsätze werden erkannt und übersprungen; Regeln mit „automatisch buchen“ greifen wie in der App. Die Datei wird archiviert.","security":[{"apiKey":["banking:write"]},{"oauth2":["banking:write"]}],"x-zahlfuchs-scope":"banking:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BankStatementUpload","properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","description":"Kontoauszug"}},"required":["file"]}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankImportResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht banking:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/bank-transactions":{"get":{"operationId":"getBankTransactions","tags":["Bank"],"summary":"Umsätze","description":"Neueste zuerst (nach Buchungstag), mit Zuordnungen zu Rechnungen, Eingangsbelegen und Buchungen.","security":[{"apiKey":["banking:read"]},{"oauth2":["banking:read"]}],"x-zahlfuchs-scope":"banking:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"bank_account_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"status","in":"query","required":false,"schema":{"description":"open = offener Rest; Standard all","type":"string","enum":["open","matched","all"]},"description":"open = offener Rest; Standard all"},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Verwendungszweck, Name, IBAN und Betrag (Cent)","type":"string","maxLength":200},"description":"Sucht in Verwendungszweck, Name, IBAN und Betrag (Cent)"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BankTransaction"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht banking:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/bank-transactions/{id}":{"get":{"operationId":"getBankTransactionsById","tags":["Bank"],"summary":"Umsatz lesen","security":[{"apiKey":["banking:read"]},{"oauth2":["banking:read"]}],"x-zahlfuchs-scope":"banking:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransaction"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht banking:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/accounts":{"get":{"operationId":"getAccounts","tags":["Buchhaltung"],"summary":"Kontenrahmen","description":"Standardkonten (SKR03 oder SKR04 laut Steuerprofil) und eigene Konten der Firma, nach Nummer sortiert.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"date","in":"query","required":false,"schema":{"description":"Kontenrahmen laut Steuerprofil an diesem Tag; Standard heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":"Kontenrahmen laut Steuerprofil an diesem Tag; Standard heute"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerAccount"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/accounts/{number}/lines":{"get":{"operationId":"getAccountsByNumberLines","tags":["Buchhaltung"],"summary":"Kontoblatt","description":"Alle Buchungszeilen eines Kontos im Zeitraum (Belegdatum), älteste zuerst, mit Saldo nach jeder Zeile.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"}},{"name":"date_from","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"date_to","in":"query","required":true,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLines"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/vat-codes":{"get":{"operationId":"getVatCodes","tags":["Buchhaltung"],"summary":"Steuerschlüssel","description":"Steuerschlüssel für Buchungen und Kassenbuch, mit DATEV-BU-Schlüssel und UStVA-Kennzahlen.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VatCode"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cost-centers":{"get":{"operationId":"getCostCenters","tags":["Buchhaltung"],"summary":"Kostenstellen","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CostCenter"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/ledger-periods":{"get":{"operationId":"getLedgerPeriods","tags":["Buchhaltung"],"summary":"Buchungsmonate","description":"Monate mit Status (open, closed = festgeschrieben) und Zahl der Buchungen, vom ersten Monat mit Buchungen bis heute.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LedgerPeriod"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/journal-entries":{"get":{"operationId":"getJournalEntries","tags":["Buchhaltung"],"summary":"Buchungen","description":"Journal, neueste Buchung zuerst. Mit ledger:write bucht Zahlfuchs offene Vorgänge vorher.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"period_from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"period_to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"account","in":"query","required":false,"schema":{"description":"Nur Buchungen mit einer Zeile auf diesem Konto","type":"string","pattern":"^\\d{4,8}$"},"description":"Nur Buchungen mit einer Zeile auf diesem Konto"},{"name":"source_type","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"}},{"name":"cost_center_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"search","in":"query","required":false,"schema":{"description":"Sucht in Buchungstext, Belegnummer und Buchungsnummer (2026/15)","type":"string","maxLength":200},"description":"Sucht in Buchungstext, Belegnummer und Buchungsnummer (2026/15)"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JournalEntry"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postJournalEntries","tags":["Buchhaltung"],"summary":"Manuell buchen","description":"Umbuchung, Privatentnahme, Steuerzahlung und Ähnliches. Soll und Haben müssen gleich sein. Mit vat_code bildet Zahlfuchs die Steuerzeile selbst; Sammel- und Steuerkonten (Forderungen, Verbindlichkeiten, USt, VSt) sind direkt gesperrt. Gebuchtes lässt sich nicht ändern, nur per Gegenbuchung aufheben.","security":[{"apiKey":["ledger:write"]},{"oauth2":["ledger:write"]}],"x-zahlfuchs-scope":"ledger:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/journal-entries/{id}":{"get":{"operationId":"getJournalEntriesById","tags":["Buchhaltung"],"summary":"Buchung lesen","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/journal-entries/{id}/reverse":{"post":{"operationId":"postJournalEntriesByIdReverse","tags":["Buchhaltung"],"summary":"Gegenbuchung (Storno)","description":"Hebt eine manuelle Buchung durch eine neue Buchung mit getauschtem Soll und Haben auf. Buchungen aus Rechnungen, Zahlungen, Bank und Kasse werden an ihrer Quelle korrigiert.","security":[{"apiKey":["ledger:write"]},{"oauth2":["ledger:write"]}],"x-zahlfuchs-scope":"ledger:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryReverse"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/ledger-scheme":{"get":{"operationId":"getLedgerScheme","tags":["Buchhaltung"],"summary":"Buchungsverfahren","description":"Kontenrahmen, EÜR oder doppelte Buchführung, Soll- oder Ist-Versteuerung laut Steuerprofil am Tag.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerScheme"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cash-registers":{"get":{"operationId":"getCashRegisters","tags":["Kasse"],"summary":"Kassen","description":"Alle Kassen mit Bestand, auch stillgelegte.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CashRegister"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cash-registers/{id}":{"get":{"operationId":"getCashRegistersById","tags":["Kasse"],"summary":"Kasse lesen","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashRegister"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cash-registers/{id}/entries":{"get":{"operationId":"getCashRegistersByIdEntries","tags":["Kasse"],"summary":"Kassenbuch","description":"Kassenbuchungen der Kasse, neueste zuerst.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CashEntry"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postCashRegistersByIdEntries","tags":["Kasse"],"summary":"Kassenbuchung erfassen","description":"Einnahme, Ausgabe, Einlage oder Entnahme. Zahlfuchs bucht sie im selben Schritt im Journal. Der Bestand darf nie negativ werden. Gebuchtes lässt sich nur stornieren.","security":[{"apiKey":["ledger:write"]},{"oauth2":["ledger:write"]}],"x-zahlfuchs-scope":"ledger:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashEntryCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashEntry"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cash-entries/{id}":{"get":{"operationId":"getCashEntriesById","tags":["Kasse"],"summary":"Kassenbuchung lesen","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashEntry"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/cash-entries/{id}/reverse":{"post":{"operationId":"postCashEntriesByIdReverse","tags":["Kasse"],"summary":"Kassenbuchung stornieren","description":"Neue Storno-Zeile mit Verweis und Begründung, gebucht auch im Journal. Zeilen aus Tageskassenberichten und Zahlungen werden dort korrigiert.","security":[{"apiKey":["ledger:write"]},{"oauth2":["ledger:write"]}],"x-zahlfuchs-scope":"ledger:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashEntryReverse"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashEntry"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/registers":{"get":{"operationId":"getPosRegisters","tags":["Kasse mit TSE"],"summary":"Kassen mit TSE","description":"Alle Kassen mit TSE, auch außer Betrieb genommene.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PosRegister"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/registers/{id}":{"get":{"operationId":"getPosRegistersById","tags":["Kasse mit TSE"],"summary":"Kasse mit TSE lesen","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosRegister"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/registers/{id}/transactions":{"get":{"operationId":"getPosRegistersByIdTransactions","tags":["Kasse mit TSE"],"summary":"Kassenvorgänge","description":"Vorgänge der Kasse mit Positionen, Zahlungen und TSE-Daten, neueste zuerst.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"date_from","in":"query","required":false,"schema":{"description":"Belegdatum ab (einschließlich)","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":"Belegdatum ab (einschließlich)"},{"name":"date_to","in":"query","required":false,"schema":{"description":"Belegdatum bis (einschließlich)","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":"Belegdatum bis (einschließlich)"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","finished"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PosTransaction"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/transactions/{id}":{"get":{"operationId":"getPosTransactionsById","tags":["Kasse mit TSE"],"summary":"Kassenvorgang lesen","description":"Mit Positionen, Zahlungen, TSE-Signatur, Inhalt des QR-Codes und Link auf den digitalen Beleg.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosTransaction"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/registers/{id}/sales":{"post":{"operationId":"postPosRegistersByIdSales","tags":["Kasse mit TSE"],"summary":"Verkauf kassieren","description":"Beginnt einen Vorgang an der TSE und schließt ihn mit Positionen und Zahlungen ab (Signatur). Zahlfuchs bucht im selben Schritt Journal, Kassenbuch (Bar) und Zahlungen auf Rechnungen. Nicht umkehrbar: Korrektur nur per Storno. Bediener ist der Inhaber des Schlüssels. Scheitert der Abschluss an den Eingaben, wird der begonnene Vorgang als Abbruch signiert. Bitte mit Idempotency-Key senden, damit ein Wiederholen nicht doppelt kassiert.","security":[{"apiKey":["pos:write"]},{"oauth2":["pos:write"]}],"x-zahlfuchs-scope":"pos:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosSaleCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosTransaction"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/transactions/{id}/cancel":{"post":{"operationId":"postPosTransactionsByIdCancel","tags":["Kasse mit TSE"],"summary":"Kassenbeleg stornieren","description":"Neuer Vorgang (Storno) mit umgekehrten Positionen und Zahlungen, signiert von der TSE, mit Gegenbuchung im Journal und Kassenbuch. Der ursprüngliche Beleg bleibt unverändert. Ausgegebene Gutscheine müssen unbenutzt sein.","security":[{"apiKey":["pos:write"]},{"oauth2":["pos:write"]}],"x-zahlfuchs-scope":"pos:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosTransactionCancel"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosTransaction"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/registers/{id}/closings":{"get":{"operationId":"getPosRegistersByIdClosings","tags":["Kasse mit TSE"],"summary":"Kassenabschlüsse","description":"Tagesabschlüsse (Z-Bons) der Kasse, neueste zuerst.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PosClosing"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/closings/{id}":{"get":{"operationId":"getPosClosingsById","tags":["Kasse mit TSE"],"summary":"Kassenabschluss lesen","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosClosing"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/registers/{id}/closing-preview":{"get":{"operationId":"getPosRegistersByIdClosingPreview","tags":["Kasse mit TSE"],"summary":"Kassenabschluss vorab","description":"Summen seit dem letzten Abschluss und Soll-Bestand laut Kassenbuch (X-Bon). Ändert nichts.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosClosingPreview"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/orders":{"get":{"operationId":"getPosOrders","tags":["Kasse mit TSE"],"summary":"Kassenaufträge","description":"Aufträge mit Anzahlungen an der Kasse (ohne Rechnung), neueste zuerst.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","completed","cancelled"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PosOrder"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/pos/vouchers/{code}":{"get":{"operationId":"getPosVouchersByCode","tags":["Kasse mit TSE"],"summary":"Gutschein prüfen","description":"Restwert eines Mehrzweckgutscheins; Bindestriche und Groß-/Kleinschreibung im Code sind egal.","security":[{"apiKey":["pos:read"]},{"oauth2":["pos:read"]}],"x-zahlfuchs-scope":"pos:read","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosVoucher"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht pos:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/vat-returns":{"get":{"operationId":"getVatReturns","tags":["Umsatzsteuer"],"summary":"Voranmeldungen eines Jahres","description":"Zeiträume der Umsatzsteuer-Voranmeldung laut Steuerprofil mit Frist, Status und berechneter Zahllast (Kz 83). state: open, draft, submitted, overdue oder future. Zahlfuchs übermittelt nicht an ELSTER.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"description":"Standard: aktuelles Jahr","type":"integer","minimum":2000,"maximum":2100},"description":"Standard: aktuelles Jahr"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VatReturnOverview"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/vat-returns/{key}":{"get":{"operationId":"getVatReturnsByKey","tags":["Umsatzsteuer"],"summary":"Werte einer Voranmeldung","description":"Kennzahlen aus den aktuellen Buchungen (computed) und alle gespeicherten Versionen. key ist der Zeitraum, z. B. 2026-11 oder 2026-Q4.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatReturn"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/euer":{"get":{"operationId":"getReportsEuer","tags":["Auswertungen"],"summary":"Einnahmenüberschussrechnung","description":"Anlage EÜR eines Wirtschaftsjahres aus den Buchungen, mit Kennzahlen und Konten je Zeile. applicable = false, wenn die Firma im ganzen Jahr doppelt bucht (dann GuV).","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":2000,"maximum":2100}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EurReport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/open-items":{"get":{"operationId":"getReportsOpenItems","tags":["Auswertungen"],"summary":"Offene Posten","description":"Forderungen (party = customer) oder Verbindlichkeiten (party = supplier) laut Buchhaltung zum Stichtag, mit Fälligkeit und Altersstruktur.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"party","in":"query","required":false,"schema":{"description":"Standard customer","type":"string","enum":["customer","supplier"]},"description":"Standard customer"},{"name":"until","in":"query","required":false,"schema":{"description":"Stichtag; Standard heute","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"description":"Stichtag; Standard heute"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenItemsReport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/cost-centers":{"get":{"operationId":"getReportsCostCenters","tags":["Auswertungen"],"summary":"Kostenstellen","description":"Erlöse, Kosten und Ergebnis je Kostenstelle im Zeitraum, dazu der Teil ohne Kostenstelle.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles","type":"integer","minimum":2000,"maximum":2100},"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles"},{"name":"period_from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"period_to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostCenterReport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/trial-balance":{"get":{"operationId":"getReportsTrialBalance","tags":["Auswertungen"],"summary":"Summen- und Saldenliste","description":"Je Konto Saldovortrag, Verkehrszahlen des Zeitraums und des Jahres, Endsaldo. Antwort als Tabelle wie in der App.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles","type":"integer","minimum":2000,"maximum":2100},"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles"},{"name":"period_from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"period_to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTableResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/bwa":{"get":{"operationId":"getReportsBwa","tags":["Auswertungen"],"summary":"BWA","description":"Betriebswirtschaftliche Auswertung: Zeitraum und kumuliert, mit Vorjahr. Antwort als Tabelle wie in der App.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles","type":"integer","minimum":2000,"maximum":2100},"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles"},{"name":"period_from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"period_to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTableResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/income-statement":{"get":{"operationId":"getReportsIncomeStatement","tags":["Auswertungen"],"summary":"Vorläufige GuV","description":"Gewinn- und Verlustrechnung nach § 275 HGB bis period_to, mit Vorjahr. Nur doppelte Buchführung. Antwort als Tabelle wie in der App.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles","type":"integer","minimum":2000,"maximum":2100},"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles"},{"name":"period_from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"period_to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTableResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/reports/balance-sheet":{"get":{"operationId":"getReportsBalanceSheet","tags":["Auswertungen"],"summary":"Vorläufige Bilanz","description":"Bilanz nach § 266 HGB zum Ende von period_to. Nur doppelte Buchführung. Antwort als Tabelle wie in der App.","security":[{"apiKey":["ledger:read"]},{"oauth2":["ledger:read"]}],"x-zahlfuchs-scope":"ledger:read","parameters":[{"name":"year","in":"query","required":false,"schema":{"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles","type":"integer","minimum":2000,"maximum":2100},"description":"Wirtschaftsjahr (Jahr des Beginns); Standard: aktuelles"},{"name":"period_from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"},{"name":"period_to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"Buchungsmonat, z. B. 2026-11"},"description":"Buchungsmonat, z. B. 2026-11"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTableResult"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht ledger:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/exports":{"get":{"operationId":"getExports","tags":["Exporte"],"summary":"Datenexporte","description":"Exporte der Firma (PDF-Paket, GDPdU), neueste zuerst.","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DataExport"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postExports","tags":["Exporte"],"summary":"Datenexport anstoßen","description":"Legt einen Export an (status queued). Zahlfuchs baut das ZIP im Hintergrund; danach status done und Download unter /exports/{id}/file für 30 Tage. Höchstens drei Exporte laufen gleichzeitig. Nur festgeschriebene Daten.","security":[{"apiKey":["exports:write"]},{"oauth2":["exports:write"]}],"x-zahlfuchs-scope":"exports:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportCreate"}}}},"responses":{"202":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/exports/{id}":{"get":{"operationId":"getExportsById","tags":["Exporte"],"summary":"Export lesen","description":"Zum Abfragen des Status nach dem Anstoßen.","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/exports/{id}/file":{"get":{"operationId":"getExportsByIdFile","tags":["Exporte"],"summary":"Export herunterladen","description":"ZIP mit Ordnern, Übersichten (CSV) und LIESMICH.txt. 409, solange der Export nicht fertig ist; 410 nach 30 Tagen.","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ZIP-Datei","content":{"application/zip":{"schema":{"type":"string","contentMediaType":"application/zip"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/datev-settings":{"get":{"operationId":"getDatevSettings","tags":["Exporte"],"summary":"DATEV-Einstellungen","description":"Berater- und Mandantennummer für den DATEV-Export. Ändern nur in der App.","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatevSettings"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/datev-exports":{"get":{"operationId":"getDatevExports","tags":["Exporte"],"summary":"DATEV-Exporte","description":"Bisherige DATEV-Exporte, neueste zuerst.","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DatevExport"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postDatevExports","tags":["Exporte"],"summary":"DATEV-Export erstellen","description":"Buchungsstapel im DATEV-Format (EXTF) für die Buchungsmonate period_from bis period_to, als ZIP mit Belegen, wenn in der App eingestellt. Offene Vorgänge werden vorher gebucht. Download unter /datev-exports/{id}/file.","security":[{"apiKey":["exports:write"]},{"oauth2":["exports:write"]}],"x-zahlfuchs-scope":"exports:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatevExportCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatevExport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/datev-exports/preview":{"get":{"operationId":"getDatevExportsPreview","tags":["Exporte"],"summary":"DATEV-Export prüfen","description":"Wie viele Buchungen der Zeitraum hat und welche Monate noch nicht festgeschrieben sind.","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatevExportPreview"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/datev-exports/{id}":{"get":{"operationId":"getDatevExportsById","tags":["Exporte"],"summary":"DATEV-Export lesen","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatevExport"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/datev-exports/{id}/file":{"get":{"operationId":"getDatevExportsByIdFile","tags":["Exporte"],"summary":"DATEV-Export herunterladen","security":[{"apiKey":["exports:read"]},{"oauth2":["exports:read"]}],"x-zahlfuchs-scope":"exports:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ZIP mit EXTF-Buchungsstapel und Belegen","content":{"application/zip":{"schema":{"type":"string","contentMediaType":"application/zip"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht exports:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/comment-threads":{"get":{"operationId":"getCommentThreads","tags":["Rückfragen"],"summary":"Rückfragen","description":"Rückfragen der Steuerkanzlei an Belegen und Buchungen, zuletzt aktive zuerst (höchstens 500).","security":[{"apiKey":["comments:read"]},{"oauth2":["comments:read"]}],"x-zahlfuchs-scope":"comments:read","parameters":[{"name":"status","in":"query","required":false,"schema":{"description":"Standard open","type":"string","enum":["open","resolved","all"]},"description":"Standard open"}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CommentThread"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht comments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/comment-threads/{id}":{"get":{"operationId":"getCommentThreadsById","tags":["Rückfragen"],"summary":"Rückfrage lesen","security":[{"apiKey":["comments:read"]},{"oauth2":["comments:read"]}],"x-zahlfuchs-scope":"comments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThread"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht comments:read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/comment-threads/{id}/replies":{"post":{"operationId":"postCommentThreadsByIdReplies","tags":["Rückfragen"],"summary":"Antworten","description":"Antwort im Namen des Inhabers, der den Schlüssel angelegt hat; im Audit-Log steht der Schlüssel. Eine erledigte Rückfrage wird dadurch wieder offen. Beiträge lassen sich nicht ändern.","security":[{"apiKey":["comments:write"]},{"oauth2":["comments:write"]}],"x-zahlfuchs-scope":"comments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentReply"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThread"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht comments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/comment-threads/{id}/resolve":{"post":{"operationId":"postCommentThreadsByIdResolve","tags":["Rückfragen"],"summary":"Als erledigt markieren","security":[{"apiKey":["comments:write"]},{"oauth2":["comments:write"]}],"x-zahlfuchs-scope":"comments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThread"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht comments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/comment-threads/{id}/reopen":{"post":{"operationId":"postCommentThreadsByIdReopen","tags":["Rückfragen"],"summary":"Wieder öffnen","security":[{"apiKey":["comments:write"]},{"oauth2":["comments:write"]}],"x-zahlfuchs-scope":"comments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentThread"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht comments:write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-event-types":{"get":{"operationId":"getWebhookEventTypes","tags":["Webhooks"],"summary":"Ereignisarten","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}},"required":["type","description"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks":{"get":{"operationId":"getWebhooks","tags":["Webhooks"],"summary":"Webhooks","description":"Alle Webhooks der Firma (höchstens 20), älteste zuerst. Geheimnisse werden nie gelistet.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"postWebhooks","tags":["Webhooks"],"summary":"Webhook anlegen","description":"Liefert das Signatur-Geheimnis genau einmal zurück. Ereignisse ab jetzt werden zugestellt, frühere nicht.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks/{id}":{"get":{"operationId":"getWebhooksById","tags":["Webhooks"],"summary":"Webhook lesen","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"patchWebhooksById","tags":["Webhooks"],"summary":"Webhook ändern","description":"Offene Zustellungen entfallen, wenn der Webhook ausgeschaltet oder das Ereignis abbestellt wird. active=true hebt auch eine Pause auf.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteWebhooksById","tags":["Webhooks"],"summary":"Webhook löschen","description":"Offene Zustellungen entfallen. Das Protokoll bleibt bis zum Ablauf der 30 Tage im Audit-Log.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Erfolg, ohne Inhalt"},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks/{id}/rotate-secret":{"post":{"operationId":"postWebhooksByIdRotateSecret","tags":["Webhooks"],"summary":"Geheimnis wechseln","description":"Neues Geheimnis, einmal angezeigt. Das alte gilt noch 24 Stunden: so lange enthält webhook-signature beide Signaturen.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWithSecret"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks/{id}/test":{"post":{"operationId":"postWebhooksByIdTest","tags":["Webhooks"],"summary":"Testereignis senden","description":"Sendet sofort ein Ereignis webhook.test (auch an ausgeschaltete Webhooks) und liefert das Ergebnis. Keine Wiederholung.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"operationId":"getWebhooksByIdDeliveries","tags":["Webhooks"],"summary":"Zustellprotokoll","description":"Zustellungen der letzten 30 Tage, neueste zuerst.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":500}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","succeeded","failed"]}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Eingaben ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries/{id}":{"get":{"operationId":"getWebhookDeliveriesById","tags":["Webhooks"],"summary":"Zustellung lesen","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries/{id}/retry":{"post":{"operationId":"postWebhookDeliveriesByIdRetry","tags":["Webhooks"],"summary":"Erneut senden","description":"Sendet die Zustellung sofort noch einmal, mit derselben webhook-id. Liefert das Ergebnis.","security":[{"apiKey":["webhooks:manage"]},{"oauth2":["webhooks:manage"]}],"x-zahlfuchs-scope":"webhooks:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Erfolg","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"description":"API-Schlüssel fehlt oder ist ungültig","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Dem Schlüssel fehlt das Recht webhooks:manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Nicht gefunden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Zu viele Anfragen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}}}