{"openapi":"3.1.0","info":{"title":"dignum eBilling API","version":"1.0.0","summary":"Validate, convert, create, extract and render German e-invoices (XRechnung, ZUGFeRD / Factur-X).","description":"Stateless: nothing you send is stored or logged. No accounts on the public instance; requests are rate limited per client. Errors are RFC 9457 `application/problem+json` with a stable `code` and, where useful, a list of findings. Validation results are HTTP 200 with a ValidationReport, also when `valid` is false. Heavy engines (KoSIT validator, Mustang / veraPDF, Ghostscript) run server side; read `checks[].status` to see which of them actually ran.","contact":{"name":"dignum eBilling","url":"https://distrinode.de/ebilling/entwickler"}},"servers":[{"url":"https://distrinode.de/ebilling/api/v1","description":"Public instance (free, rate limited)"},{"url":"http://localhost:3000/ebilling/api/v1","description":"Docker image / local"}],"security":[{},{"bearerAuth":[]}],"tags":[{"name":"Validation","description":"Check XML invoices and hybrid PDFs."},{"name":"Conversion","description":"Convert between syntaxes and into ZUGFeRD / Factur-X."},{"name":"Creation","description":"Create e-invoices from structured data."},{"name":"Extraction","description":"Read invoice data from a PDF."},{"name":"Rendering","description":"Visual PDF or HTML preview (not an e-invoice)."},{"name":"Operations","description":"Health and this document."}],"paths":{"/validate":{"post":{"tags":["Validation"],"operationId":"validate","summary":"Validate an XML e-invoice or a hybrid PDF","description":"Runs the built-in rules and the official validators (KoSIT for XML, Mustang / veraPDF for PDF). A document that fails validation, or is not well-formed XML, still returns HTTP 200 with `valid: false`. The report as HTML (`Accept: text/html` or `format=html`) is a self-contained page without scripts.","parameters":[{"name":"level","in":"query","description":"Which engines run: built-in rules, the official validators, or both.","schema":{"type":"string","enum":["builtin","official","both"],"default":"both"}},{"name":"lang","in":"query","description":"Language of HTML reports and PDFs. JSON always carries German and English texts.","schema":{"type":"string","enum":["de","en"],"default":"de"}},{"name":"format","in":"query","description":"Overrides the Accept header (for browsers and links).","schema":{"type":"string","enum":["json","html"]}},{"name":"fail","in":"query","description":"Turn a negative verdict into HTTP 422 invalid_document.","schema":{"type":"boolean","default":false}},{"name":"profile","in":"query","description":"Assert that the document conforms to this profile (a mismatch becomes the finding EBL-PROFILE-MISMATCH).","schema":{"$ref":"#/components/schemas/ProfileId"}},{"name":"X-Request-Id","in":"header","description":"Optional correlation id (up to 64 characters of A-Z a-z 0-9 . _ -). Echoed in the response and as trace_id in problems.","schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"text/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}},"multipart/form-data":{"schema":{"type":"object","required":["file"],"additionalProperties":false,"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream"},"options":{"$ref":"#/components/schemas/ValidateOptions"}}},"encoding":{"file":{"contentType":"application/xml, text/xml, application/pdf"},"options":{"contentType":"application/json"}}}}},"responses":{"200":{"description":"The document was read and checked. HTTP 200 does not mean the document is valid: read `valid`.","headers":{"Ebilling-Valid":{"schema":{"type":"string","enum":["true","false"]}},"Ebilling-Official-Checked":{"schema":{"type":"string","enum":["true","false"]}},"Ebilling-Findings":{"schema":{"type":"string"},"description":"errors=<n>;warnings=<n>"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationReport"}},"text/html":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"405":{"$ref":"#/components/responses/405"},"406":{"$ref":"#/components/responses/406"},"413":{"$ref":"#/components/responses/413"},"415":{"$ref":"#/components/responses/415"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"},"504":{"$ref":"#/components/responses/504"}}}},"/convert":{"post":{"tags":["Conversion"],"operationId":"convert","summary":"PDF + invoice data -> e-invoice XML and ZUGFeRD / Factur-X hybrid PDF","description":"The flagship conversion. Send the original PDF and the invoice data as the part `invoice` (JSON), or as the part `xml`. Without either, the data is read from the PDF (its embedded XML, else layout analysis) and used only when the confidence reaches `options.minScore` (default 0.9); otherwise the answer is 422 `needs_review` with the extraction. The PDF is upgraded to PDF/A-3 (the original stays the visible part) and the XML is embedded. When the PDF cannot be upgraded as it is you get 422 `pdfa_repair_required`; set `options.repair` to let the server rebuild it with Ghostscript.","parameters":[{"name":"verify","in":"query","description":"How the produced files are checked. `official` runs the built-in rules and, when available, the official validators.","schema":{"type":"string","enum":["none","builtin","official"],"default":"official"}},{"name":"allowInvalid","in":"query","description":"Return the files together with a failing report (HTTP 200) instead of 422. For debugging.","schema":{"type":"boolean","default":false}},{"name":"format","in":"query","description":"Overrides the Accept header (for browsers and links).","schema":{"type":"string","enum":["json","xml","pdf"]}},{"name":"X-Request-Id","in":"header","description":"Optional correlation id (up to 64 characters of A-Z a-z 0-9 . _ -). Echoed in the response and as trace_id in problems.","schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","contentMediaType":"application/pdf"},"invoice":{"$ref":"#/components/schemas/InvoiceDraft","description":"The invoice data as JSON (InvoiceDraft)."},"xml":{"type":"string","contentMediaType":"application/xml"},"options":{"$ref":"#/components/schemas/ConvertOptions"}}},"encoding":{"invoice":{"contentType":"application/json"},"options":{"contentType":"application/json"}}}}},"responses":{"200":{"description":"Result. `Accept: application/json` (default) returns the ArtifactResult envelope; `application/xml` or `application/pdf` returns exactly one file as bytes (406 when the result has none or several of that type).","headers":{"Ebilling-Valid":{"schema":{"type":"string","enum":["true","false","unknown"]}},"Ebilling-Official-Checked":{"schema":{"type":"string","enum":["true","false"]},"description":"false = the official engines did not run; `valid` then covers the built-in rules only."},"Content-Disposition":{"schema":{"type":"string"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactResult"}},"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"405":{"$ref":"#/components/responses/405"},"406":{"$ref":"#/components/responses/406"},"413":{"$ref":"#/components/responses/413"},"415":{"$ref":"#/components/responses/415"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"},"504":{"$ref":"#/components/responses/504"}}}},"/create":{"post":{"tags":["Creation"],"operationId":"create","summary":"Invoice data (JSON) -> XML, visual PDF or hybrid PDF","description":"The invoice is an InvoiceDraft: everything optional, numbers may be written in German or English notation. The server computes line amounts, the VAT breakdown and totals, checks the built-in rules of the target, writes the XML and verifies it. Default target `cii:xrechnung`. `options.pdf.mode` adds a rendered PDF (`visual`, not an e-invoice) or a hybrid PDF (`hybrid`).","parameters":[{"name":"verify","in":"query","description":"How the produced files are checked. `official` runs the built-in rules and, when available, the official validators.","schema":{"type":"string","enum":["none","builtin","official"],"default":"official"}},{"name":"allowInvalid","in":"query","description":"Return the files together with a failing report (HTTP 200) instead of 422. For debugging.","schema":{"type":"boolean","default":false}},{"name":"lang","in":"query","description":"Language of HTML reports and PDFs. JSON always carries German and English texts.","schema":{"type":"string","enum":["de","en"],"default":"de"}},{"name":"format","in":"query","description":"Overrides the Accept header (for browsers and links).","schema":{"type":"string","enum":["json","xml","pdf"]}},{"name":"X-Request-Id","in":"header","description":"Optional correlation id (up to 64 characters of A-Z a-z 0-9 . _ -). Echoed in the response and as trace_id in problems.","schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRequest"},"examples":{"minimalXRechnung":{"summary":"Minimal XRechnung (CII)","value":{"invoice":{"number":"RE-2026-0001","issueDate":"2026-11-02","typeCode":"380","currency":"EUR","dueDate":"2026-11-16","buyerReference":"Kostenstelle 4711","seller":{"name":"Muster Software GmbH","vatId":"DE123456788","electronicAddress":{"value":"rechnung@muster-software.example","scheme":"EM"},"address":{"city":"München","postCode":"80331","countryCode":"DE"},"contact":{"name":"Erika Mustermann","phone":"+49 89 1234567","email":"rechnung@muster-software.example"}},"buyer":{"name":"Beispiel AG","electronicAddress":{"value":"einkauf@beispiel-ag.example","scheme":"EM"},"address":{"city":"Berlin","postCode":"10115","countryCode":"DE"}},"payment":{"meansCode":"58","creditTransfers":[{"iban":"DE02120300000000202051"}]},"lines":[{"id":"1","quantity":"1","unitCode":"C62","price":{"netPrice":"100.00"},"vat":{"category":"S","rate":"19"},"item":{"name":"Dienstleistung"}}]},"target":{"syntax":"cii","profile":"xrechnung"}}}}}}},"responses":{"200":{"description":"Result. `Accept: application/json` (default) returns the ArtifactResult envelope; `application/xml` or `application/pdf` returns exactly one file as bytes (406 when the result has none or several of that type).","headers":{"Ebilling-Valid":{"schema":{"type":"string","enum":["true","false","unknown"]}},"Ebilling-Official-Checked":{"schema":{"type":"string","enum":["true","false"]},"description":"false = the official engines did not run; `valid` then covers the built-in rules only."},"Content-Disposition":{"schema":{"type":"string"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactResult"}},"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"405":{"$ref":"#/components/responses/405"},"406":{"$ref":"#/components/responses/406"},"413":{"$ref":"#/components/responses/413"},"415":{"$ref":"#/components/responses/415"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"},"504":{"$ref":"#/components/responses/504"}}}},"/extract":{"post":{"tags":["Extraction"],"operationId":"extract","summary":"Read invoice data from a PDF","description":"If the PDF carries an embedded e-invoice XML it is parsed (score 1, header `Ebilling-Extraction-Source: embedded-xml`); otherwise the visible text is analysed (`layout`). The result is a draft with evidence per field, never a finished invoice: review it before use.","parameters":[{"name":"lang","in":"query","description":"Language of HTML reports and PDFs. JSON always carries German and English texts.","schema":{"type":"string","enum":["de","en"],"default":"de"}},{"name":"X-Request-Id","in":"header","description":"Optional correlation id (up to 64 characters of A-Z a-z 0-9 . _ -). Echoed in the response and as trace_id in problems.","schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}}],"requestBody":{"required":true,"content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}},"multipart/form-data":{"schema":{"type":"object","required":["pdf"],"additionalProperties":false,"properties":{"pdf":{"type":"string","contentMediaType":"application/pdf"},"sellerProfile":{"type":"object","description":"Known seller data (DeepPartial of Seller)."},"template":{"type":"object","description":"A learned layout template."},"options":{"$ref":"#/components/schemas/ExtractOptions"}}},"encoding":{"sellerProfile":{"contentType":"application/json"},"template":{"contentType":"application/json"},"options":{"contentType":"application/json"}}}}},"responses":{"200":{"description":"Extraction result.","headers":{"Ebilling-Extraction-Source":{"schema":{"type":"string","enum":["layout","embedded-xml"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionResult"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"405":{"$ref":"#/components/responses/405"},"406":{"$ref":"#/components/responses/406"},"413":{"$ref":"#/components/responses/413"},"415":{"$ref":"#/components/responses/415"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"},"504":{"$ref":"#/components/responses/504"}}}},"/transform":{"post":{"tags":["Conversion"],"operationId":"transform","summary":"UBL <-> CII and profile change (XML to XML)","description":"Reads a UBL or CII invoice and writes it in the other syntax (`to`) or another profile (`profile`). Without `to` the opposite syntax is chosen. A profile that does not exist in the target syntax falls back to EN 16931 (finding EBL-CONVERT-PROFILE-CHANGED). Data that the target format cannot carry is reported, never invented.","parameters":[{"name":"to","in":"query","description":"Target syntax (default: the opposite of the source).","schema":{"type":"string","enum":["ubl","cii"]}},{"name":"profile","in":"query","description":"Assert that the document conforms to this profile (a mismatch becomes the finding EBL-PROFILE-MISMATCH).","schema":{"$ref":"#/components/schemas/ProfileId"}},{"name":"verify","in":"query","description":"How the produced files are checked. `official` runs the built-in rules and, when available, the official validators.","schema":{"type":"string","enum":["none","builtin","official"],"default":"official"}},{"name":"allowInvalid","in":"query","description":"Return the files together with a failing report (HTTP 200) instead of 422. For debugging.","schema":{"type":"boolean","default":false}},{"name":"format","in":"query","description":"Overrides the Accept header (for browsers and links).","schema":{"type":"string","enum":["json","xml"]}},{"name":"X-Request-Id","in":"header","description":"Optional correlation id (up to 64 characters of A-Z a-z 0-9 . _ -). Echoed in the response and as trace_id in problems.","schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}}],"requestBody":{"required":true,"content":{"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"text/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"multipart/form-data":{"schema":{"type":"object","required":["xml"],"additionalProperties":false,"properties":{"xml":{"type":"string","contentMediaType":"application/xml"}}}}}},"responses":{"200":{"description":"Result. `Accept: application/json` (default) returns the ArtifactResult envelope; `application/xml` or `application/pdf` returns exactly one file as bytes (406 when the result has none or several of that type).","headers":{"Ebilling-Valid":{"schema":{"type":"string","enum":["true","false","unknown"]}},"Ebilling-Official-Checked":{"schema":{"type":"string","enum":["true","false"]},"description":"false = the official engines did not run; `valid` then covers the built-in rules only."},"Content-Disposition":{"schema":{"type":"string"}},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactResult"}},"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"405":{"$ref":"#/components/responses/405"},"406":{"$ref":"#/components/responses/406"},"413":{"$ref":"#/components/responses/413"},"415":{"$ref":"#/components/responses/415"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"},"504":{"$ref":"#/components/responses/504"}}}},"/render":{"post":{"tags":["Rendering"],"operationId":"render","summary":"Visual PDF or HTML preview of an invoice (not an e-invoice)","description":"Body: JSON `RenderRequest` or a UBL / CII XML invoice. `Accept: application/pdf` (default) returns an A4 PDF, `text/html` a self-contained preview. The response header `Ebilling-Not-An-E-Invoice: true` is always set: the output is a picture of the data, not a legally valid e-invoice.","parameters":[{"name":"lang","in":"query","description":"Language of HTML reports and PDFs. JSON always carries German and English texts.","schema":{"type":"string","enum":["de","en"],"default":"de"}},{"name":"format","in":"query","description":"Overrides the Accept header (for browsers and links).","schema":{"type":"string","enum":["pdf","html"]}},{"name":"X-Request-Id","in":"header","description":"Optional correlation id (up to 64 characters of A-Z a-z 0-9 . _ -). Echoed in the response and as trace_id in problems.","schema":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderRequest"}},"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}},"text/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}}}},"responses":{"200":{"description":"Rendered document.","headers":{"Ebilling-Not-An-E-Invoice":{"schema":{"type":"string","enum":["true"]}}},"content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}},"text/html":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"405":{"$ref":"#/components/responses/405"},"406":{"$ref":"#/components/responses/406"},"413":{"$ref":"#/components/responses/413"},"415":{"$ref":"#/components/responses/415"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"},"504":{"$ref":"#/components/responses/504"}}}},"/health":{"get":{"tags":["Operations"],"operationId":"health","summary":"Liveness and engine versions","security":[],"parameters":[{"name":"deep","in":"query","description":"Run a synthetic invoice through the official validators (cached for 60 s).","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The process is up; `status` may be `degraded` when an official engine is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"The deep check failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/openapi.json":{"get":{"tags":["Operations"],"operationId":"openapi","summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI 3.1 document.","headers":{"ETag":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Only on instances configured with EBILLING_API_KEYS."}},"responses":{"400":{"description":"invalid_request: malformed JSON or multipart, unknown member or parameter, missing part. `findings` lists each problem with a location.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthorized: an API key is required (only when the instance is configured with keys).","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"method_not_allowed","headers":{"Allow":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"406":{"description":"not_acceptable: no representation matches Accept / format.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"payload_too_large: body above EBILLING_MAX_UPLOAD_MB (default 25 MB).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"unsupported_media_type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Well-formed request that cannot be processed: unsupported_format, unreadable_pdf, unreadable_xml, unsupported_target, invalid_document, needs_review, no_embedded_xml, pdfa_repair_required. See `code`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"rate_limited: see Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":0},"description":"Seconds to wait."},"RateLimit-Policy":{"schema":{"type":"string"}},"RateLimit":{"schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal_error: only trace_id, never a stack trace.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"engine_unavailable: an official engine is missing or all slots are busy. See Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"engine_timeout","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"Invoice":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":200},"issueDate":{"type":"string"},"typeCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"taxCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"taxPointDate":{"type":"string"},"taxPointDateCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"dueDate":{"type":"string"},"buyerReference":{"type":"string","minLength":1,"maxLength":200},"projectReference":{"type":"string","minLength":1,"maxLength":200},"contractReference":{"type":"string","minLength":1,"maxLength":200},"purchaseOrderReference":{"type":"string","minLength":1,"maxLength":200},"salesOrderReference":{"type":"string","minLength":1,"maxLength":200},"receivingAdviceReference":{"type":"string","minLength":1,"maxLength":200},"despatchAdviceReference":{"type":"string","minLength":1,"maxLength":200},"tenderOrLotReference":{"type":"string","minLength":1,"maxLength":200},"invoicedObjectIdentifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"buyerAccountingReference":{"type":"string","minLength":1,"maxLength":200},"paymentTerms":{"type":"string","minLength":1,"maxLength":20000},"notes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"subjectCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"text":{"type":"string","minLength":1,"maxLength":20000}},"required":["text"],"additionalProperties":false}},"process":{"type":"object","properties":{"businessProcess":{"type":"string","minLength":1,"maxLength":300},"specificationIdentifier":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false},"precedingInvoices":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":200},"issueDate":{"type":"string"}},"required":["number"],"additionalProperties":false}},"seller":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"tradingName":{"type":"string","minLength":1,"maxLength":300},"identifiers":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false}},"legalRegistrationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"vatId":{"type":"string","minLength":1,"maxLength":50},"taxRegistrationId":{"type":"string","minLength":1,"maxLength":50},"additionalLegalInfo":{"type":"string","minLength":1,"maxLength":20000},"electronicAddress":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"required":["countryCode"],"additionalProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"phone":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false}},"required":["name","address"],"additionalProperties":false},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"tradingName":{"type":"string","minLength":1,"maxLength":300},"identifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"legalRegistrationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"vatId":{"type":"string","minLength":1,"maxLength":50},"electronicAddress":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"required":["countryCode"],"additionalProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"phone":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false}},"required":["name","address"],"additionalProperties":false},"payee":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"identifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"legalRegistrationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"taxRepresentative":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"vatId":{"type":"string","minLength":1,"maxLength":50},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"required":["countryCode"],"additionalProperties":false}},"required":["name","vatId","address"],"additionalProperties":false},"delivery":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"locationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"actualDate":{"type":"string"},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"required":["countryCode"],"additionalProperties":false}},"additionalProperties":false},"invoicePeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false},"payment":{"type":"object","properties":{"meansCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"meansText":{"type":"string","minLength":1,"maxLength":300},"remittanceInformation":{"type":"string","minLength":1,"maxLength":500},"creditTransfers":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"iban":{"type":"string","minLength":1,"maxLength":50},"accountName":{"type":"string","minLength":1,"maxLength":300},"bic":{"type":"string","minLength":1,"maxLength":20}},"required":["iban"],"additionalProperties":false}},"card":{"type":"object","properties":{"primaryAccountNumber":{"type":"string","minLength":1,"maxLength":20},"holderName":{"type":"string","minLength":1,"maxLength":300}},"required":["primaryAccountNumber"],"additionalProperties":false},"directDebit":{"type":"object","properties":{"mandateReference":{"type":"string","minLength":1,"maxLength":100},"creditorId":{"type":"string","minLength":1,"maxLength":50},"debitedAccount":{"type":"string","minLength":1,"maxLength":50}},"additionalProperties":false}},"required":["meansCode"],"additionalProperties":false},"allowances":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"vatCategory":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"vatRate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"required":["amount","vatCategory"],"additionalProperties":false}},"charges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"vatCategory":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"vatRate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"required":["amount","vatCategory"],"additionalProperties":false}},"totals":{"type":"object","properties":{"lineNetTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"allowanceTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"chargeTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxExclusiveTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxTotalInTaxCurrency":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxInclusiveTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"prepaidAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"roundingAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"payableAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"required":["lineNetTotal","taxExclusiveTotal","taxInclusiveTotal","payableAmount"],"additionalProperties":false},"vatBreakdown":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"taxableAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"category":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"rate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"exemptionReason":{"type":"string","minLength":1,"maxLength":500},"exemptionReasonCode":{"type":"string","minLength":1,"maxLength":50,"pattern":"^\\S+$"}},"required":["taxableAmount","taxAmount","category"],"additionalProperties":false}},"attachments":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":1000},"externalLocation":{"type":"string","minLength":1,"maxLength":2000},"attachment":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeCode":{"type":"string","minLength":1,"maxLength":150},"contentBase64":{"type":"string","maxLength":40000000,"pattern":"^[A-Za-z0-9+/\\r\\n]*={0,2}$"}},"required":["filename","mimeCode","contentBase64"],"additionalProperties":false}},"required":["reference"],"additionalProperties":false}},"lines":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"note":{"type":"string","minLength":1,"maxLength":20000},"objectIdentifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"quantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"unitCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"netAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"orderLineReference":{"type":"string","minLength":1,"maxLength":100},"buyerAccountingReference":{"type":"string","minLength":1,"maxLength":200},"period":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false},"allowances":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"}},"required":["amount"],"additionalProperties":false}},"charges":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"}},"required":["amount"],"additionalProperties":false}},"price":{"type":"object","properties":{"netPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"discount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"grossPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseQuantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseQuantityUnitCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"}},"required":["netPrice"],"additionalProperties":false},"vat":{"type":"object","properties":{"category":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"rate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"required":["category"],"additionalProperties":false},"item":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"description":{"type":"string","minLength":1,"maxLength":20000},"sellerId":{"type":"string","minLength":1,"maxLength":200},"buyerId":{"type":"string","minLength":1,"maxLength":200},"standardId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"classifications":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"listId":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"listVersion":{"type":"string","minLength":1,"maxLength":50}},"required":["value","listId"],"additionalProperties":false}},"originCountry":{"type":"string","pattern":"^[A-Z0-9]{2}$"},"attributes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"string","minLength":1,"maxLength":1000}},"required":["name","value"],"additionalProperties":false}}},"required":["name"],"additionalProperties":false}},"required":["id","quantity","unitCode","netAmount","price","vat","item"],"additionalProperties":false}}},"required":["number","issueDate","typeCode","currency","seller","buyer","totals","vatBreakdown","lines"],"additionalProperties":false},"InvoiceDraft":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":200},"issueDate":{"type":"string"},"typeCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"taxCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"taxPointDate":{"type":"string"},"taxPointDateCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"dueDate":{"type":"string"},"buyerReference":{"type":"string","minLength":1,"maxLength":200},"projectReference":{"type":"string","minLength":1,"maxLength":200},"contractReference":{"type":"string","minLength":1,"maxLength":200},"purchaseOrderReference":{"type":"string","minLength":1,"maxLength":200},"salesOrderReference":{"type":"string","minLength":1,"maxLength":200},"receivingAdviceReference":{"type":"string","minLength":1,"maxLength":200},"despatchAdviceReference":{"type":"string","minLength":1,"maxLength":200},"tenderOrLotReference":{"type":"string","minLength":1,"maxLength":200},"invoicedObjectIdentifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"buyerAccountingReference":{"type":"string","minLength":1,"maxLength":200},"paymentTerms":{"type":"string","minLength":1,"maxLength":20000},"notes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"subjectCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"text":{"type":"string","minLength":1,"maxLength":20000}},"additionalProperties":false}},"process":{"type":"object","properties":{"businessProcess":{"type":"string","minLength":1,"maxLength":300},"specificationIdentifier":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false},"precedingInvoices":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":200},"issueDate":{"type":"string"}},"additionalProperties":false}},"seller":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"tradingName":{"type":"string","minLength":1,"maxLength":300},"identifiers":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false}},"legalRegistrationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"vatId":{"type":"string","minLength":1,"maxLength":50},"taxRegistrationId":{"type":"string","minLength":1,"maxLength":50},"additionalLegalInfo":{"type":"string","minLength":1,"maxLength":20000},"electronicAddress":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"additionalProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"phone":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false}},"additionalProperties":false},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"tradingName":{"type":"string","minLength":1,"maxLength":300},"identifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"legalRegistrationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"vatId":{"type":"string","minLength":1,"maxLength":50},"electronicAddress":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"additionalProperties":false},"contact":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"phone":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false}},"additionalProperties":false},"payee":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"identifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"legalRegistrationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false}},"additionalProperties":false},"taxRepresentative":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"vatId":{"type":"string","minLength":1,"maxLength":50},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"additionalProperties":false}},"additionalProperties":false},"delivery":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"locationId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"actualDate":{"type":"string"},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":300},"line2":{"type":"string","minLength":1,"maxLength":300},"line3":{"type":"string","minLength":1,"maxLength":300},"city":{"type":"string","minLength":1,"maxLength":200},"postCode":{"type":"string","minLength":1,"maxLength":50},"countrySubdivision":{"type":"string","minLength":1,"maxLength":200},"countryCode":{"type":"string","pattern":"^[A-Z0-9]{2}$"}},"additionalProperties":false}},"additionalProperties":false},"invoicePeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false},"payment":{"type":"object","properties":{"meansCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"meansText":{"type":"string","minLength":1,"maxLength":300},"remittanceInformation":{"type":"string","minLength":1,"maxLength":500},"creditTransfers":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"iban":{"type":"string","minLength":1,"maxLength":50},"accountName":{"type":"string","minLength":1,"maxLength":300},"bic":{"type":"string","minLength":1,"maxLength":20}},"additionalProperties":false}},"card":{"type":"object","properties":{"primaryAccountNumber":{"type":"string","minLength":1,"maxLength":20},"holderName":{"type":"string","minLength":1,"maxLength":300}},"additionalProperties":false},"directDebit":{"type":"object","properties":{"mandateReference":{"type":"string","minLength":1,"maxLength":100},"creditorId":{"type":"string","minLength":1,"maxLength":50},"debitedAccount":{"type":"string","minLength":1,"maxLength":50}},"additionalProperties":false}},"additionalProperties":false},"allowances":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"vatCategory":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"vatRate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"additionalProperties":false}},"charges":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"vatCategory":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"vatRate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"additionalProperties":false}},"totals":{"type":"object","properties":{"lineNetTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"allowanceTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"chargeTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxExclusiveTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxTotalInTaxCurrency":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxInclusiveTotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"prepaidAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"roundingAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"payableAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"additionalProperties":false},"vatBreakdown":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"taxableAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"taxAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"category":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"rate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"exemptionReason":{"type":"string","minLength":1,"maxLength":500},"exemptionReasonCode":{"type":"string","minLength":1,"maxLength":50,"pattern":"^\\S+$"}},"additionalProperties":false}},"attachments":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":1000},"externalLocation":{"type":"string","minLength":1,"maxLength":2000},"attachment":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"mimeCode":{"type":"string","minLength":1,"maxLength":150},"contentBase64":{"type":"string","maxLength":40000000,"pattern":"^[A-Za-z0-9+/\\r\\n]*={0,2}$"}},"additionalProperties":false}},"additionalProperties":false}},"lines":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"note":{"type":"string","minLength":1,"maxLength":20000},"objectIdentifier":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"quantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"unitCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"netAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"orderLineReference":{"type":"string","minLength":1,"maxLength":100},"buyerAccountingReference":{"type":"string","minLength":1,"maxLength":200},"period":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false},"allowances":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"}},"additionalProperties":false}},"charges":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"percentage":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"reason":{"type":"string","minLength":1,"maxLength":500},"reasonCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"}},"additionalProperties":false}},"price":{"type":"object","properties":{"netPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"discount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"grossPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseQuantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"baseQuantityUnitCode":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"}},"additionalProperties":false},"vat":{"type":"object","properties":{"category":{"type":"string","enum":["S","Z","E","AE","K","G","O","L","M"]},"rate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"additionalProperties":false},"item":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":1000},"description":{"type":"string","minLength":1,"maxLength":20000},"sellerId":{"type":"string","minLength":1,"maxLength":200},"buyerId":{"type":"string","minLength":1,"maxLength":200},"standardId":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":500},"scheme":{"type":"string","minLength":1,"maxLength":50}},"required":["value"],"additionalProperties":false},"classifications":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"listId":{"type":"string","minLength":1,"maxLength":10,"pattern":"^\\S+$"},"listVersion":{"type":"string","minLength":1,"maxLength":50}},"additionalProperties":false}},"originCountry":{"type":"string","pattern":"^[A-Z0-9]{2}$"},"attributes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":300},"value":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false},"Syntax":{"type":"string","enum":["cii","ubl"]},"ProfileId":{"type":"string","enum":["minimum","basicwl","basic","en16931","extended","xrechnung","peppol-bis-3"]},"OutputTarget":{"type":"object","properties":{"syntax":{"type":"string","enum":["cii","ubl"]},"profile":{"type":"string","enum":["minimum","basicwl","basic","en16931","extended","xrechnung","peppol-bis-3"]}},"required":["syntax","profile"],"additionalProperties":false},"LocalizedText":{"type":"object","required":["de","en"],"properties":{"de":{"type":"string"},"en":{"type":"string"}}},"Severity":{"type":"string","enum":["fatal","error","warning","info"]},"Finding":{"type":"object","required":["ruleId","severity","message","source","engine"],"properties":{"ruleId":{"type":"string","examples":["BR-DE-15","BR-CO-10","PEPPOL-EN16931-R020","XSD","EBL-REQ-001"],"description":"Official rule id, XSD, PDFA-<clause>-<test>, or EBL-* for our own checks."},"severity":{"$ref":"#/components/schemas/Severity"},"message":{"$ref":"#/components/schemas/LocalizedText"},"hint":{"$ref":"#/components/schemas/LocalizedText"},"detail":{"type":"string","description":"Original validator message, untranslated."},"terms":{"type":"array","items":{"type":"string"},"examples":[["BT-10"]]},"path":{"type":"string","description":"Path into the invoice model, for example lines[2].vat.rate."},"location":{"type":"string","description":"XPath (XML), object reference (PDF), or query: / body: pointer for request errors."},"source":{"type":"string","enum":["core","xml","xsd","en16931","xrechnung","peppol","facturx","pdfa","pdf"]},"engine":{"type":"string","enum":["ebilling","kosit","mustang","verapdf"]}}},"CheckResult":{"type":"object","required":["id","status","label"],"properties":{"id":{"type":"string","enum":["wellformed","xsd","en16931","cius","calculation","pdfa","embedding"]},"status":{"type":"string","enum":["passed","failed","warning","skipped"],"description":"`skipped` means this check did not run: nothing was verified."},"label":{"$ref":"#/components/schemas/LocalizedText"},"engine":{"type":"string"}}},"FormatInfo":{"type":"object","required":["container"],"properties":{"container":{"type":"string","enum":["xml","pdf","unknown"]},"syntax":{"$ref":"#/components/schemas/Syntax"},"documentType":{"type":"string","enum":["invoice","creditnote"]},"profile":{"$ref":"#/components/schemas/ProfileId"},"specificationIdentifier":{"type":"string"},"family":{"type":"string","enum":["xrechnung","zugferd","en16931","peppol","unknown"]},"version":{"type":"string"},"pdf":{"type":"object","properties":{"pdfVersion":{"type":"string"},"pages":{"type":"integer"},"pdfaPart":{"type":"integer"},"pdfaConformance":{"type":"string"},"attachmentName":{"type":"string"},"afRelationship":{"type":"string"},"fxConformanceLevel":{"type":"string"},"encrypted":{"type":"boolean"}}},"legalEInvoiceDE":{"type":"boolean","description":"Qualifies as an e-invoice under section 14 UStG."}}},"ValidationReport":{"type":"object","required":["valid","format","checks","findings","counts","engines"],"properties":{"valid":{"type":"boolean","description":"No finding of severity fatal or error. Read `checks` to see whether the official engines ran."},"format":{"$ref":"#/components/schemas/FormatInfo"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/CheckResult"}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"counts":{"type":"object","required":["fatal","error","warning","info"],"additionalProperties":{"type":"integer"}},"engines":{"type":"object","additionalProperties":{"type":"string"}},"durationMs":{"type":"number"}}},"ExtractionResult":{"type":"object","required":["draft","evidence","findings","score","layoutFingerprint"],"properties":{"draft":{"$ref":"#/components/schemas/InvoiceDraft"},"evidence":{"type":"array","items":{"type":"object","required":["path","value","confidence","method"],"properties":{"path":{"type":"string"},"value":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"box":{"type":"object","properties":{"page":{"type":"integer"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}}},"method":{"type":"string","enum":["label","pattern","table","position","template","profile","computed","ai"]}}}},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"score":{"type":"number","minimum":0,"maximum":1},"layoutFingerprint":{"type":"string"},"language":{"type":"string","enum":["de","en"]}}},"Problem":{"type":"object","required":["type","title","status","code","trace_id"],"additionalProperties":true,"properties":{"type":{"type":"string","format":"uri","examples":["https://distrinode.de/ebilling/problems/invalid_document"]},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string","description":"Never echoes input content."},"instance":{"type":"string","format":"uri-reference"},"code":{"type":"string","enum":["invalid_request","unauthorized","not_found","method_not_allowed","not_acceptable","payload_too_large","unsupported_media_type","unsupported_format","unreadable_pdf","unreadable_xml","unsupported_target","invalid_document","needs_review","no_embedded_xml","pdfa_repair_required","rate_limited","internal_error","engine_unavailable","engine_timeout"]},"trace_id":{"type":"string"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"counts":{"type":"object","additionalProperties":{"type":"integer"}},"report":{"$ref":"#/components/schemas/ValidationReport"},"extraction":{"$ref":"#/components/schemas/ExtractionResult"},"retryAfterSeconds":{"type":"integer"}}},"ArtifactFile":{"type":"object","required":["name","role","mediaType","sizeBytes","sha256","dataBase64","report"],"properties":{"name":{"type":"string"},"role":{"type":"string","enum":["xml","hybrid-pdf","visual-pdf","embedded-xml"]},"mediaType":{"type":"string","enum":["application/xml","application/pdf"]},"sizeBytes":{"type":"integer"},"sha256":{"type":"string"},"dataBase64":{"type":"string","contentEncoding":"base64"},"report":{"oneOf":[{"$ref":"#/components/schemas/ValidationReport"},{"type":"null"}],"description":"Verification result; null for a visual PDF or when verify=none."}}},"ArtifactResult":{"type":"object","required":["valid","officialChecked","files","findings"],"properties":{"valid":{"type":["boolean","null"],"description":"All e-invoice files are valid; null when nothing was verified."},"officialChecked":{"type":"boolean"},"files":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactFile"}},"invoice":{"$ref":"#/components/schemas/Invoice"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"},"description":"Findings of the generation steps (calculation, parser warnings, PDF repair notes)."}}},"Health":{"type":"object","required":["status","version","apiVersion","uptimeSeconds","engines","available","validators"],"properties":{"status":{"type":"string","enum":["ok","degraded"]},"version":{"type":"string"},"apiVersion":{"type":"string"},"uptimeSeconds":{"type":"integer"},"engines":{"type":"object","additionalProperties":{"type":"string"}},"available":{"type":"object","additionalProperties":{"type":"boolean"}},"validators":{"type":"string","enum":["up","degraded","down"]},"selfTest":{"type":"object","properties":{"xml":{"type":"string"},"pdf":{"type":"string"},"checkedAt":{"type":"string"}}}}},"ValidateOptions":{"type":"object","properties":{"level":{"type":"string","enum":["builtin","official","both"]},"lang":{"type":"string","enum":["de","en"]}},"additionalProperties":false},"ConvertOptions":{"type":"object","properties":{"outputs":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["xml","hybrid","embedded"]}},"xmlTarget":{"type":"object","properties":{"syntax":{"type":"string","enum":["cii","ubl"]},"profile":{"type":"string","enum":["minimum","basicwl","basic","en16931","extended","xrechnung","peppol-bis-3"]}},"required":["syntax","profile"],"additionalProperties":false},"hybridProfile":{"type":"string","enum":["minimum","basicwl","basic","en16931","extended","xrechnung","peppol-bis-3"]},"repair":{"type":"boolean"},"minScore":{"type":"number","minimum":0,"maximum":1},"roundingMode":{"type":"string","enum":["line","document"]},"sellerProfile":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"template":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"lang":{"type":"string","enum":["de","en"]}},"additionalProperties":false},"ExtractOptions":{"type":"object","properties":{"lang":{"type":"string","enum":["de","en"]}},"additionalProperties":false},"CreateRequest":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/InvoiceDraft"},"target":{"type":"object","properties":{"syntax":{"type":"string","enum":["cii","ubl"]},"profile":{"type":"string","enum":["minimum","basicwl","basic","en16931","extended","xrechnung","peppol-bis-3"]}},"required":["syntax","profile"],"additionalProperties":false},"options":{"type":"object","properties":{"roundingMode":{"type":"string","enum":["line","document"]},"pretty":{"type":"boolean"},"pdf":{"type":"object","properties":{"mode":{"type":"string","enum":["none","visual","hybrid"]},"template":{"type":"string","enum":["classic","modern","compact"]},"lang":{"type":"string","enum":["de","en"]},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$"},"girocode":{"type":"boolean"},"footerText":{"type":"string","maxLength":500},"logo":{"type":"object","properties":{"mediaType":{"type":"string","enum":["image/png","image/jpeg"]},"dataBase64":{"type":"string","minLength":1,"maxLength":1500000}},"required":["mediaType","dataBase64"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"required":["invoice"],"additionalProperties":false},"RenderRequest":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/InvoiceDraft"},"template":{"type":"string","enum":["classic","modern","compact"]},"lang":{"type":"string","enum":["de","en"]},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$"},"girocode":{"type":"boolean"},"footerText":{"type":"string","maxLength":500},"logo":{"type":"object","properties":{"mediaType":{"type":"string","enum":["image/png","image/jpeg"]},"dataBase64":{"type":"string","minLength":1,"maxLength":1500000}},"required":["mediaType","dataBase64"],"additionalProperties":false}},"required":["invoice"],"additionalProperties":false}}}}