E-invoicing
/api/v1/e-invoices/generateGenerates an e-invoice from invoice data: xrechnung_ubl / xrechnung_cii return XRechnung 3.0 as XML (application/xml), zugferd returns a PDF/A-3 with embedded factur-x.xml (profile EN 16931, application/pdf). Without invoice.sender, the account's company master data is used. Before generation, the data is validated against EN 16931 or XRechnung respectively; if there are errors, the API responds with 422 einvoice_invalid and the validation report in details.
Permission: invoices:read
Body (JSON) · EInvoiceGenerateRequest
format"xrechnung_ubl" | "xrechnung_cii" | "zugferd"requiredTarget formatinvoiceEInvoiceSourcerequiredtype"invoice" | "credit_note" | "cancellation"Invoice, credit note or cancellation invoiceDefault: "invoice"numberstringrequiredmax. 60 charactersissueDatestring (date)requiredDate (YYYY-MM-DD)serviceDatestring (date)Service/delivery dateservicePeriodobjectService periodfromstring (date)requiredDate (YYYY-MM-DD)tostring (date)requiredDate (YYYY-MM-DD)
dueDatestring (date)Date (YYYY-MM-DD)paymentTermsDaysinteger0–365currency"EUR"Default: "EUR"priceMode"net" | "gross"Default: "net"taxTreatment"regular" | "small_business" | "reverse_charge" | "intra_eu_supply" | "export" | "non_taxable"Tax treatment of the receiptDefault: "regular"taxNoticestring | nullMandatory notice (default from the tax treatment)max. 500 characterstaxExemptbooleanVAT exemption under § 4 No. 8 et seq. UStG (tax case “tax_exempt”, ST-16): category E instead of O, exemption reason from the notice textsubjectstringmax. 300 charactersintroTextstringmax. 5000 charactersclosingTextstringmax. 5000 characterslinesArray<DocumentLine>requiredidstringstable line item ID (assigned by the server if empty)max. 40 characterstype"item" | "text" | "subtotal"Line item, plain text line or subtotalDefault: "item"articleIdstringReference to the article master datamax. 128 characterstitlestringrequiredmax. 300 charactersdescriptionstringmax. 5000 charactersquantitynumber-1000000–1000000 · Default: 1unitstringUnit, e.g. Stk, Std, pauschal (piece, hour, flat rate); UN/ECE Rec 20 for e-invoicing: modulemax. 20 charactersunitPriceCentsintegerAmount in cents-100000000000–100000000000 · Default: 0discountPercentnumber0–100taxRatenumberTax rate in per cent (19, 7, 0 …)0–100 · Default: 19totalCentsintegerAmount in cents-100000000000–100000000000servicePeriodobjectprojectIdstringmax. 128 characterstimeEntryIdsArray<string>max. 128 characters
totalsDocumentTotalsStored totals – recalculated and must matchnetCentsintegerrequiredAmount in cents-100000000000–100000000000taxCentsintegerrequiredAmount in cents-100000000000–100000000000grossCentsintegerrequiredAmount in cents-100000000000–100000000000groupsArray<object>required
prepaidCentsintegerBT-113 Advance payments already received0–100000000000recipientEInvoiceRecipientrequirednamestringrequiredCompany or namemax. 160 charactersadditionstringAddress supplement, e.g. attn. / departmentmax. 160 charactersstreetstringrequiredStreet and house numbermax. 160 characterszipCodestringrequiredmax. 10 characterscitystringrequiredmax. 80 characterscountrystringCountry code ISO 3166-1 alpha-2max. 2 characters · Default: "DE"vatIdstringRecipient's VAT ID (required for § 13b / intra-Community supply)max. 20 charactersleitwegIdstringLeitweg-ID (public contracting authorities)max. 46 charactersrecipientType"business" | "public_authority"Recipient profile: public_authority requires a Leitweg-ID, business does not (ER-08)emailstringmax. 254 characterscustomerNumberstringmax. 60 characterscontactNamestringmax. 160 charactersphonestringmax. 40 characters
senderEInvoiceSenderSender snapshot; if omitted: current company master datacompanyNamestringmax. 160 characters · Default: ""ownerNamestringmax. 120 characterslegalFormstringmax. 60 charactersmanagingDirectorsstringmax. 300 charactersaddressobjectrequiredphonestringmax. 40 charactersemailstringmax. 254 characterswebsitestringmax. 200 characterstaxNumberstringmax. 20 charactersvatIdstringmax. 20 characterssmallBusinessbooleancommercialRegisterobjectbankobject
relatedInvoiceobjectOriginal invoice (for credit note/cancellation)numberstringrequiredmax. 60 charactersissueDatestring (date)Date (YYYY-MM-DD)
buyerReferencestringBT-10; default: Leitweg-ID, otherwise order or customer numbermax. 200 charactersorderReferencestringmax. 200 characterscontractReferencestringmax. 200 charactersprojectReferencestringmax. 200 characterspaymentReferencestringPayment reference; default: invoice numbermax. 140 characterslanguage"de" | "en"Language of the generated free texts (payment terms, tax exemption reason, human-readable rendering); default de
attachPdfbooleanXRechnung only: embed PDF view as attachment (BG-24)Default: false
Response 200
File (application/xml).
curl -X POST 'https://www.debt-flow.io/api/v1/e-invoices/generate' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"format": "xrechnung_ubl",
"invoice": {
"type": "invoice",
"number": "string",
"issueDate": "2026-11-01",
"serviceDate": "2026-11-01",
"servicePeriod": {
"from": "2026-11-01",
"to": "2026-11-01"
},
"dueDate": "2026-11-01",
"paymentTermsDays": 0,
"currency": "EUR",
"priceMode": "net",
"taxTreatment": "regular",
"taxNotice": "string",
"taxExempt": false,
"subject": "string",
"introText": "string",
"closingText": "string",
"lines": [
{
"id": null,
"type": null,
"articleId": null,
"title": null,
"description": null,
"quantity": null,
"unit": null,
"unitPriceCents": null,
"discountPercent": null,
"taxRate": null,
"totalCents": null,
"servicePeriod": null,
"projectId": null,
"timeEntryIds": null
}
],
"totals": {
"netCents": 0,
"taxCents": 0,
"grossCents": 0,
"groups": [
null
]
},
"prepaidCents": 0,
"recipient": {
"name": "string",
"addition": "string",
"street": "string",
"zipCode": "string",
"city": "string",
"country": "DE",
"vatId": "string",
"leitwegId": "string",
"recipientType": "business",
"email": "string",
"customerNumber": "string",
"contactName": "string",
"phone": "string"
},
"sender": {
"companyName": "",
"ownerName": "string",
"legalForm": "string",
"managingDirectors": "string",
"address": {
"street": null,
"zipCode": null,
"city": null,
"countryCode": null
},
"phone": "string",
"email": "string",
"website": "string",
"taxNumber": "string",
"vatId": "string",
"smallBusiness": false,
"commercialRegister": {
"court": null,
"number": null
},
"bank": {
"accountHolder": null,
"iban": null,
"bic": null,
"bankName": null
}
},
"relatedInvoice": {
"number": "string",
"issueDate": "2026-11-01"
},
"buyerReference": "string",
"orderReference": "string",
"contractReference": "string",
"projectReference": "string",
"paymentReference": "string",
"language": "de"
},
"attachPdf": false
}'/api/v1/e-invoices/parseReads an XRechnung (UBL or CII) or a ZUGFeRD/Factur-X PDF (field file, multipart/form-data) and returns the invoice data according to EN 16931, the validation report and a suggested receipt (receiptDraft). A PDF without embedded XML is rejected with 422 einvoice_not_found. Nothing is saved.
Permission: receipts:read
Body (multipart/form-data)
filestring (binary)requiredapplication/xml, text/xml, application/pdf, max. 15360 KB
Response 200 · ParsedEInvoice
container"xml" | "pdf"requiredplain XML file or PDF with embedded XML (ZUGFeRD/Factur-X)syntax"ubl" | "cii"requiredprofile"en16931" | "xrechnung"requiredrule set detected from BT-24formatLabelstringrequirede.g. “XRechnung 3.0 (UBL)”embeddedFilenamestring | nullrequiredName of the embedded XML for PDFinvoiceEInvoicerequiredcustomizationIdstringrequiredBT-24 Specification identifiermax. 300 charactersprofileIdstringBT-23 Business processmax. 300 charactersnumberstringrequiredBT-1 Invoice numbermax. 200 charactersissueDatestringrequiredBT-2 Invoice date (YYYY-MM-DD)max. 10 characterstypeCodestringrequiredBT-3 Invoice type (380 invoice, 381 credit note, 384 corrected invoice …)max. 10 characterscurrencystringrequiredBT-5 Currencymax. 3 characterstaxPointDatestringBT-7max. 10 charactersdueDatestringBT-9 Due datemax. 10 charactersbuyerReferencestringBT-10 Buyer reference / Leitweg-IDmax. 200 charactersprojectReferencestringBT-11max. 200 characterscontractReferencestringBT-12max. 200 charactersorderReferencestringBT-13 Purchase order numbermax. 200 characterssalesOrderReferencestringBT-14 Sales order numbermax. 200 charactersaccountingReferencestringBT-19 Accounting referencemax. 200 charactersnotesArray<object>requiredBG-1 NotessubjectCodestringmax. 10 characterstextstringrequiredmax. 10000 characters
precedingInvoicesArray<object>requiredBG-3 Reference to preceding invoicesnumberstringrequiredmax. 200 charactersissueDatestringmax. 10 characters
sellerEInvoicePartyrequiredBG-4 SellernamestringrequiredBT-27/44 Namemax. 300 characterstradingNamestringBT-28/45 Trading namemax. 300 charactersidentifiersArray<object>requiredBT-29/46 IdentifierslegalRegistrationIdobjectBT-30/47 Registration numbervatIdstringBT-31/48 VAT IDmax. 30 characterstaxNumberstringBT-32 Tax number (seller only)max. 30 charactersadditionalLegalInfostringBT-33 Additional legal information (seller only)max. 1000 characterselectronicAddressobjectBT-34/49 Electronic address (scheme EM = email, 0204 = Leitweg-ID)addressEInvoiceAddressrequiredcontactobjectBG-6/BG-9 Contact
buyerEInvoicePartyrequiredBG-7 BuyernamestringrequiredBT-27/44 Namemax. 300 characterstradingNamestringBT-28/45 Trading namemax. 300 charactersidentifiersArray<object>requiredBT-29/46 IdentifierslegalRegistrationIdobjectBT-30/47 Registration numbervatIdstringBT-31/48 VAT IDmax. 30 characterstaxNumberstringBT-32 Tax number (seller only)max. 30 charactersadditionalLegalInfostringBT-33 Additional legal information (seller only)max. 1000 characterselectronicAddressobjectBT-34/49 Electronic address (scheme EM = email, 0204 = Leitweg-ID)addressEInvoiceAddressrequiredcontactobjectBG-6/BG-9 Contact
payeeNamestringBT-59 Payee, if differentmax. 300 charactersdeliveryobjectpartyNamestringBT-70max. 300 charactersdatestringBT-72 Delivery/service datemax. 10 charactersaddressEInvoiceAddressBG-15 Delivery address
invoicingPeriodobjectBG-14 Invoicing periodstartstringmax. 10 charactersendstringmax. 10 characters
paymentMeansEInvoicePaymentMeansBG-16typeCodestringrequiredBT-81 Payment means (UNTDID 4461, 58 = SEPA credit transfer)max. 10 characterstextstringBT-82max. 300 charactersremittanceInfostringBT-83 Payment referencemax. 300 charactersaccountsArray<object>requiredBG-17 Credit transfercardobjectBG-18 Card payment (last digits only)directDebitobjectBG-19 Direct debit
paymentTermsstringBT-20 Payment termsmax. 2000 charactersallowanceChargesArray<EInvoiceAllowanceCharge>requiredBG-20/BG-21 Document-level allowances/chargeschargeIndicatorbooleanrequiredtrue = surcharge, false = discountamountCentsintegerrequiredBT-92/99/136/141 Amount-9007199254740991–9007199254740991baseAmountCentsintegerBT-93/100/137/142 Base amount-9007199254740991–9007199254740991percentnumberBT-94/101/138/143 PercentagereasonstringBT-97/104/139/144 Reasonmax. 500 charactersreasonCodestringBT-98/105/140/145 Reason (code)max. 10 characterstaxCategorystringBT-95/102 VAT category (document level only)max. 3 characterstaxRatenumber | nullBT-96/103 VAT rate (document level only)
totalsEInvoiceTotalsrequiredBG-22lineNetCentsintegerrequiredBT-106 Sum of line net amounts-9007199254740991–9007199254740991allowancesCentsintegerrequiredBT-107 Sum of allowances-9007199254740991–9007199254740991chargesCentsintegerrequiredBT-108 Sum of charges-9007199254740991–9007199254740991taxExclusiveCentsintegerrequiredBT-109 Total net amount-9007199254740991–9007199254740991taxCentsintegerrequiredBT-110 Total VAT-9007199254740991–9007199254740991taxInclusiveCentsintegerrequiredBT-112 Total gross amount-9007199254740991–9007199254740991prepaidCentsintegerrequiredBT-113 Already paid-9007199254740991–9007199254740991roundingCentsintegerrequiredBT-114 Rounding-9007199254740991–9007199254740991payableCentsintegerrequiredBT-115 Amount due-9007199254740991–9007199254740991
vatBreakdownArray<EInvoiceVatBreakdown>requiredBG-23categorystringrequiredBT-118 Categorymax. 3 charactersratenumber | nullrequiredBT-119 Rate in percent (null for O)taxableCentsintegerrequiredBT-116 Taxable amount-9007199254740991–9007199254740991taxCentsintegerrequiredBT-117 Tax amount-9007199254740991–9007199254740991exemptionReasonstringBT-120 Exemption reasonmax. 1000 charactersexemptionReasonCodestringBT-121 Exemption reason (VATEX code)max. 30 characters
linesArray<EInvoiceLine>requiredBG-25idstringrequiredBT-126 Line numbermax. 100 charactersparentLineIdstringparent line (CII ParentLineID, incoming only)max. 100 charactersstatusReasonCodestringCII LineStatusReasonCode (DETAIL, GROUP, INFORMATION; incoming only)max. 20 charactersnotestringBT-127 Line notemax. 2000 charactersquantitynumberrequiredBT-129 QuantityunitCodestringrequiredBT-130 Unit (UN/ECE Rec. 20/21)max. 10 charactersnetAmountCentsintegerrequiredBT-131 Line net amount-9007199254740991–9007199254740991orderLineReferencestringBT-132 Purchase order line numbermax. 100 charactersperiodobjectBG-26 Invoice line periodallowanceChargesArray<EInvoiceAllowanceCharge>requiredBG-27/BG-28netPriceCentsnumberrequiredBT-146 Net pricegrossPriceCentsnumberBT-148 Gross price (before price discount)priceDiscountCentsnumberBT-147 Price discountbaseQuantitynumberBT-149 Base quantityvatobjectrequireditemobjectrequired
attachmentsArray<EInvoiceAttachment>requiredBG-24idstringrequiredBT-122 Identifiermax. 200 charactersdescriptionstringBT-123max. 1000 charactersuristringBT-124 External locationmax. 1000 charactersfilenamestringBT-125 File namemax. 300 charactersmimeCodestringmax. 100 characterssizeBytesinteger-9007199254740991–9007199254740991contentBase64stringBT-125 Content (Base64)
extensionEInvoiceExtensionDataXRechnung extension: sub-lines, third-party payments (incoming only)subLinesArray<EInvoiceSubLine>requiredthirdPartyPaymentsArray<EInvoiceThirdPartyPayment>required
language"de" | "en"Language of the free texts and the human-readable rendering (internal; EN 16931/XRechnung have no language field in the invoice header)
validationEInvoiceValidationReportrequiredprofile"en16931" | "xrechnung"requiredvalidbooleanrequiredno errors (warnings allowed)errorCountintegerrequired-9007199254740991–9007199254740991warningCountintegerrequired-9007199254740991–9007199254740991issuesArray<EInvoiceValidationIssue>requiredseverity"error" | "warning"requiredrulestringrequiredRule ID, e.g. BR-16, BR-DE-15, BR-S-02fieldsArray<string>requiredaffected business terms, e.g. ["BT-10"]pathstringPath in the data model, e.g. seller.contact.phonemessagestringrequiredhuman-readable message (German)hintstringHow to fix it (for your own invoices)
scope"structure"requiredStructural check (mandatory fields, totals, tax rules). The full KoSIT check is returned in `external`.
receiptDraftEInvoiceReceiptDraftrequireddocumentType"invoice" | "credit_note"requiredsupplierNamestringrequiredsupplierVatIdstring | nullrequiredsupplierTaxNumberstring | nullrequiredsupplierIbanstring | nullrequiredsupplierEmailstring | nullrequireddocumentNumberstringrequireddocumentDatestring | nullrequireddueDatestring | nullrequiredcurrencystringrequiredtotalsobjectrequirednetCentsintegerrequiredAmount in cents-9007199254740991–9007199254740991taxCentsintegerrequiredAmount in cents-9007199254740991–9007199254740991grossCentsintegerrequiredAmount in cents-9007199254740991–9007199254740991
payableCentsintegerrequiredAmount in cents-9007199254740991–9007199254740991taxLinesArray<object>requiredtaxRatenumberrequiredcategorystringrequirednetCentsintegerrequiredAmount in cents-9007199254740991–9007199254740991taxCentsintegerrequiredAmount in cents-9007199254740991–9007199254740991
paymentReferencestring | nullrequireddescriptionstringrequiredShort description from the first line items
parserWarningsArray<string>requiredunparseable or unknown detailsxmlstring | nullrequiredextracted XML (PDF only)externalEInvoiceExternalValidationReport | nullResult of the official KoSIT validator (only if requested and the service is configured)status"passed" | "failed" | "unavailable" | "skipped"requiredmode"required" | "optional" | "off"requireddocumentKind"xml" | "zugferd_pdf"requiredsha256stringrequiredSHA-256 of the validated documentcheckedAtstringrequiredTime of validation (ISO 8601)baselinestringrequiredValidation basis (versions, ER-09)resultsArray<EInvoiceExternalValidatorResult>requiredvalidator"kosit" | "verapdf" | "mustang"requiredversionstring | nullrequiredversion reported by the service or configuredstatus"passed" | "failed" | "unavailable" | "skipped"requiredscenariostring | nullrequiredKoSIT scenario, veraPDF profile or ZUGFeRD profileerrorCountintegerrequired-9007199254740991–9007199254740991warningCountintegerrequired-9007199254740991–9007199254740991messagesArray<EInvoiceExternalValidationMessage>requiredat most 200 messagesdurationMsinteger | nullrequired-9007199254740991–9007199254740991errorstring | nullrequiredtechnical error (only for unavailable)
curl -X POST 'https://www.debt-flow.io/api/v1/e-invoices/parse' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY" \
-F 'file=@file'{
"container": "xml",
"syntax": "ubl",
"profile": "en16931",
"formatLabel": "string",
"embeddedFilename": "string",
"invoice": {
"customizationId": "string",
"profileId": "string",
"number": "string",
"issueDate": "string",
"typeCode": "string",
"currency": "string",
"taxPointDate": "string",
"dueDate": "string",
"buyerReference": "string",
"projectReference": "string",
"contractReference": "string",
"orderReference": "string",
"salesOrderReference": "string",
"accountingReference": "string",
"notes": [],
"precedingInvoices": [],
"seller": {
"name": "string",
"tradingName": "string",
"identifiers": [],
"legalRegistrationId": {
"id": null,
"scheme": null
},
"vatId": "string",
"taxNumber": "string",
"additionalLegalInfo": "string",
"electronicAddress": {
"scheme": null,
"value": null
},
"address": null,
"contact": {
"name": null,
"phone": null,
"email": null
}
},
"buyer": {
"name": "string",
"tradingName": "string",
"identifiers": [],
"legalRegistrationId": {
"id": null,
"scheme": null
},
"vatId": "string",
"taxNumber": "string",
"additionalLegalInfo": "string",
"electronicAddress": {
"scheme": null,
"value": null
},
"address": null,
"contact": {
"name": null,
"phone": null,
"email": null
}
},
"payeeName": "string",
"delivery": {
"partyName": "string",
"date": "string",
"address": {
"line1": null,
"line2": null,
"line3": null,
"city": null,
"postCode": null,
"subdivision": null,
"countryCode": null
}
},
"invoicingPeriod": {
"start": "string",
"end": "string"
},
"paymentMeans": {
"typeCode": "string",
"text": "string",
"remittanceInfo": "string",
"accounts": [],
"card": {
"pan": null,
"holder": null
},
"directDebit": {
"mandateId": null,
"creditorId": null,
"debitedAccount": null
}
},
"paymentTerms": "string",
"allowanceCharges": [],
"totals": {
"lineNetCents": 0,
"allowancesCents": 0,
"chargesCents": 0,
"taxExclusiveCents": 0,
"taxCents": 0,
"taxInclusiveCents": 0,
"prepaidCents": 0,
"roundingCents": 0,
"payableCents": 0
},
"vatBreakdown": [
{
"category": null,
"rate": null,
"taxableCents": null,
"taxCents": null,
"exemptionReason": null,
"exemptionReasonCode": null
}
],
"lines": [
{
"id": null,
"parentLineId": null,
"statusReasonCode": null,
"note": null,
"quantity": null,
"unitCode": null,
"netAmountCents": null,
"orderLineReference": null,
"period": null,
"allowanceCharges": null,
"netPriceCents": null,
"grossPriceCents": null,
"priceDiscountCents": null,
"baseQuantity": null,
"vat": null,
"item": null
}
],
"attachments": [],
"extension": {
"subLines": [],
"thirdPartyPayments": []
},
"language": "de"
},
"validation": {
"profile": "en16931",
"valid": false,
"errorCount": 0,
"warningCount": 0,
"issues": [
{
"severity": null,
"rule": null,
"fields": null,
"path": null,
"message": null,
"hint": null
}
],
"scope": "structure"
},
"receiptDraft": {
"documentType": "invoice",
"supplierName": "string",
"supplierVatId": "string",
"supplierTaxNumber": "string",
"supplierIban": "string",
"supplierEmail": "string",
"documentNumber": "string",
"documentDate": "string",
"dueDate": "string",
"currency": "string",
"totals": {
"netCents": 0,
"taxCents": 0,
"grossCents": 0
},
"payableCents": 0,
"taxLines": [
{
"taxRate": 0,
"category": "string",
"netCents": 0,
"taxCents": 0
}
],
"paymentReference": "string",
"description": "string"
},
"parserWarnings": [
"string"
],
"xml": "string",
"external": {
"status": "passed",
"mode": "required",
"documentKind": "xml",
"sha256": "string",
"checkedAt": "string",
"baseline": "string",
"results": [
null
]
}
}/api/v1/e-invoices/readinessUses a sample invoice to check whether the company master data (Company & invoicing) is sufficient for ZUGFeRD (EN 16931) and XRechnung, and lists missing details (e.g. phone number, IBAN).
Permission: profile:read
Response 200 · EInvoiceReadiness
formatsArray<object>requiredformat"xrechnung_ubl" | "xrechnung_cii" | "zugferd"requiredlabelstringrequiredreadybooleanrequiredissuesArray<EInvoiceValidationIssue>requiredseverity"error" | "warning"requiredrulestringrequiredRule ID, e.g. BR-16, BR-DE-15, BR-S-02fieldsArray<string>requiredaffected business terms, e.g. ["BT-10"]pathstringPath in the data model, e.g. seller.contact.phonemessagestringrequiredhuman-readable message (German)hintstringHow to fix it (for your own invoices)
curl 'https://www.debt-flow.io/api/v1/e-invoices/readiness' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY"{
"formats": [
{
"format": "xrechnung_ubl",
"label": "string",
"ready": false,
"issues": [
{
"severity": null,
"rule": null,
"fields": null,
"path": null,
"message": null,
"hint": null
}
]
}
]
}/api/v1/e-invoices/validateConverts invoice data into the EN 16931 data model and checks required fields, totals and tax rules (for XRechnung, also BR-DE-*). Does not generate a file. Each message names the rule (e.g. BR-DE-15) and the business terms concerned (e.g. BT-10).
Permission: invoices:read
Body (JSON) · EInvoiceValidateRequest
format"xrechnung_ubl" | "xrechnung_cii" | "zugferd"requiredTarget format (determines the rule set)invoiceEInvoiceSourcerequiredtype"invoice" | "credit_note" | "cancellation"Invoice, credit note or cancellation invoiceDefault: "invoice"numberstringrequiredmax. 60 charactersissueDatestring (date)requiredDate (YYYY-MM-DD)serviceDatestring (date)Service/delivery dateservicePeriodobjectService periodfromstring (date)requiredDate (YYYY-MM-DD)tostring (date)requiredDate (YYYY-MM-DD)
dueDatestring (date)Date (YYYY-MM-DD)paymentTermsDaysinteger0–365currency"EUR"Default: "EUR"priceMode"net" | "gross"Default: "net"taxTreatment"regular" | "small_business" | "reverse_charge" | "intra_eu_supply" | "export" | "non_taxable"Tax treatment of the receiptDefault: "regular"taxNoticestring | nullMandatory notice (default from the tax treatment)max. 500 characterstaxExemptbooleanVAT exemption under § 4 No. 8 et seq. UStG (tax case “tax_exempt”, ST-16): category E instead of O, exemption reason from the notice textsubjectstringmax. 300 charactersintroTextstringmax. 5000 charactersclosingTextstringmax. 5000 characterslinesArray<DocumentLine>requiredidstringstable line item ID (assigned by the server if empty)max. 40 characterstype"item" | "text" | "subtotal"Line item, plain text line or subtotalDefault: "item"articleIdstringReference to the article master datamax. 128 characterstitlestringrequiredmax. 300 charactersdescriptionstringmax. 5000 charactersquantitynumber-1000000–1000000 · Default: 1unitstringUnit, e.g. Stk, Std, pauschal (piece, hour, flat rate); UN/ECE Rec 20 for e-invoicing: modulemax. 20 charactersunitPriceCentsintegerAmount in cents-100000000000–100000000000 · Default: 0discountPercentnumber0–100taxRatenumberTax rate in per cent (19, 7, 0 …)0–100 · Default: 19totalCentsintegerAmount in cents-100000000000–100000000000servicePeriodobjectprojectIdstringmax. 128 characterstimeEntryIdsArray<string>max. 128 characters
totalsDocumentTotalsStored totals – recalculated and must matchnetCentsintegerrequiredAmount in cents-100000000000–100000000000taxCentsintegerrequiredAmount in cents-100000000000–100000000000grossCentsintegerrequiredAmount in cents-100000000000–100000000000groupsArray<object>required
prepaidCentsintegerBT-113 Advance payments already received0–100000000000recipientEInvoiceRecipientrequirednamestringrequiredCompany or namemax. 160 charactersadditionstringAddress supplement, e.g. attn. / departmentmax. 160 charactersstreetstringrequiredStreet and house numbermax. 160 characterszipCodestringrequiredmax. 10 characterscitystringrequiredmax. 80 characterscountrystringCountry code ISO 3166-1 alpha-2max. 2 characters · Default: "DE"vatIdstringRecipient's VAT ID (required for § 13b / intra-Community supply)max. 20 charactersleitwegIdstringLeitweg-ID (public contracting authorities)max. 46 charactersrecipientType"business" | "public_authority"Recipient profile: public_authority requires a Leitweg-ID, business does not (ER-08)emailstringmax. 254 characterscustomerNumberstringmax. 60 characterscontactNamestringmax. 160 charactersphonestringmax. 40 characters
senderEInvoiceSenderSender snapshot; if omitted: current company master datacompanyNamestringmax. 160 characters · Default: ""ownerNamestringmax. 120 characterslegalFormstringmax. 60 charactersmanagingDirectorsstringmax. 300 charactersaddressobjectrequiredphonestringmax. 40 charactersemailstringmax. 254 characterswebsitestringmax. 200 characterstaxNumberstringmax. 20 charactersvatIdstringmax. 20 characterssmallBusinessbooleancommercialRegisterobjectbankobject
relatedInvoiceobjectOriginal invoice (for credit note/cancellation)numberstringrequiredmax. 60 charactersissueDatestring (date)Date (YYYY-MM-DD)
buyerReferencestringBT-10; default: Leitweg-ID, otherwise order or customer numbermax. 200 charactersorderReferencestringmax. 200 characterscontractReferencestringmax. 200 charactersprojectReferencestringmax. 200 characterspaymentReferencestringPayment reference; default: invoice numbermax. 140 characterslanguage"de" | "en"Language of the generated free texts (payment terms, tax exemption reason, human-readable rendering); default de
externalbooleanAlso validate with the official KoSIT validator (for ZUGFeRD also veraPDF and Mustang)Default: false
Response 200 · EInvoiceValidateResult
format"xrechnung_ubl" | "xrechnung_cii" | "zugferd"requiredinvoiceEInvoicerequiredcustomizationIdstringrequiredBT-24 Specification identifiermax. 300 charactersprofileIdstringBT-23 Business processmax. 300 charactersnumberstringrequiredBT-1 Invoice numbermax. 200 charactersissueDatestringrequiredBT-2 Invoice date (YYYY-MM-DD)max. 10 characterstypeCodestringrequiredBT-3 Invoice type (380 invoice, 381 credit note, 384 corrected invoice …)max. 10 characterscurrencystringrequiredBT-5 Currencymax. 3 characterstaxPointDatestringBT-7max. 10 charactersdueDatestringBT-9 Due datemax. 10 charactersbuyerReferencestringBT-10 Buyer reference / Leitweg-IDmax. 200 charactersprojectReferencestringBT-11max. 200 characterscontractReferencestringBT-12max. 200 charactersorderReferencestringBT-13 Purchase order numbermax. 200 characterssalesOrderReferencestringBT-14 Sales order numbermax. 200 charactersaccountingReferencestringBT-19 Accounting referencemax. 200 charactersnotesArray<object>requiredBG-1 NotessubjectCodestringmax. 10 characterstextstringrequiredmax. 10000 characters
precedingInvoicesArray<object>requiredBG-3 Reference to preceding invoicesnumberstringrequiredmax. 200 charactersissueDatestringmax. 10 characters
sellerEInvoicePartyrequiredBG-4 SellernamestringrequiredBT-27/44 Namemax. 300 characterstradingNamestringBT-28/45 Trading namemax. 300 charactersidentifiersArray<object>requiredBT-29/46 IdentifierslegalRegistrationIdobjectBT-30/47 Registration numbervatIdstringBT-31/48 VAT IDmax. 30 characterstaxNumberstringBT-32 Tax number (seller only)max. 30 charactersadditionalLegalInfostringBT-33 Additional legal information (seller only)max. 1000 characterselectronicAddressobjectBT-34/49 Electronic address (scheme EM = email, 0204 = Leitweg-ID)addressEInvoiceAddressrequiredcontactobjectBG-6/BG-9 Contact
buyerEInvoicePartyrequiredBG-7 BuyernamestringrequiredBT-27/44 Namemax. 300 characterstradingNamestringBT-28/45 Trading namemax. 300 charactersidentifiersArray<object>requiredBT-29/46 IdentifierslegalRegistrationIdobjectBT-30/47 Registration numbervatIdstringBT-31/48 VAT IDmax. 30 characterstaxNumberstringBT-32 Tax number (seller only)max. 30 charactersadditionalLegalInfostringBT-33 Additional legal information (seller only)max. 1000 characterselectronicAddressobjectBT-34/49 Electronic address (scheme EM = email, 0204 = Leitweg-ID)addressEInvoiceAddressrequiredcontactobjectBG-6/BG-9 Contact
payeeNamestringBT-59 Payee, if differentmax. 300 charactersdeliveryobjectpartyNamestringBT-70max. 300 charactersdatestringBT-72 Delivery/service datemax. 10 charactersaddressEInvoiceAddressBG-15 Delivery address
invoicingPeriodobjectBG-14 Invoicing periodstartstringmax. 10 charactersendstringmax. 10 characters
paymentMeansEInvoicePaymentMeansBG-16typeCodestringrequiredBT-81 Payment means (UNTDID 4461, 58 = SEPA credit transfer)max. 10 characterstextstringBT-82max. 300 charactersremittanceInfostringBT-83 Payment referencemax. 300 charactersaccountsArray<object>requiredBG-17 Credit transfercardobjectBG-18 Card payment (last digits only)directDebitobjectBG-19 Direct debit
paymentTermsstringBT-20 Payment termsmax. 2000 charactersallowanceChargesArray<EInvoiceAllowanceCharge>requiredBG-20/BG-21 Document-level allowances/chargeschargeIndicatorbooleanrequiredtrue = surcharge, false = discountamountCentsintegerrequiredBT-92/99/136/141 Amount-9007199254740991–9007199254740991baseAmountCentsintegerBT-93/100/137/142 Base amount-9007199254740991–9007199254740991percentnumberBT-94/101/138/143 PercentagereasonstringBT-97/104/139/144 Reasonmax. 500 charactersreasonCodestringBT-98/105/140/145 Reason (code)max. 10 characterstaxCategorystringBT-95/102 VAT category (document level only)max. 3 characterstaxRatenumber | nullBT-96/103 VAT rate (document level only)
totalsEInvoiceTotalsrequiredBG-22lineNetCentsintegerrequiredBT-106 Sum of line net amounts-9007199254740991–9007199254740991allowancesCentsintegerrequiredBT-107 Sum of allowances-9007199254740991–9007199254740991chargesCentsintegerrequiredBT-108 Sum of charges-9007199254740991–9007199254740991taxExclusiveCentsintegerrequiredBT-109 Total net amount-9007199254740991–9007199254740991taxCentsintegerrequiredBT-110 Total VAT-9007199254740991–9007199254740991taxInclusiveCentsintegerrequiredBT-112 Total gross amount-9007199254740991–9007199254740991prepaidCentsintegerrequiredBT-113 Already paid-9007199254740991–9007199254740991roundingCentsintegerrequiredBT-114 Rounding-9007199254740991–9007199254740991payableCentsintegerrequiredBT-115 Amount due-9007199254740991–9007199254740991
vatBreakdownArray<EInvoiceVatBreakdown>requiredBG-23categorystringrequiredBT-118 Categorymax. 3 charactersratenumber | nullrequiredBT-119 Rate in percent (null for O)taxableCentsintegerrequiredBT-116 Taxable amount-9007199254740991–9007199254740991taxCentsintegerrequiredBT-117 Tax amount-9007199254740991–9007199254740991exemptionReasonstringBT-120 Exemption reasonmax. 1000 charactersexemptionReasonCodestringBT-121 Exemption reason (VATEX code)max. 30 characters
linesArray<EInvoiceLine>requiredBG-25idstringrequiredBT-126 Line numbermax. 100 charactersparentLineIdstringparent line (CII ParentLineID, incoming only)max. 100 charactersstatusReasonCodestringCII LineStatusReasonCode (DETAIL, GROUP, INFORMATION; incoming only)max. 20 charactersnotestringBT-127 Line notemax. 2000 charactersquantitynumberrequiredBT-129 QuantityunitCodestringrequiredBT-130 Unit (UN/ECE Rec. 20/21)max. 10 charactersnetAmountCentsintegerrequiredBT-131 Line net amount-9007199254740991–9007199254740991orderLineReferencestringBT-132 Purchase order line numbermax. 100 charactersperiodobjectBG-26 Invoice line periodallowanceChargesArray<EInvoiceAllowanceCharge>requiredBG-27/BG-28netPriceCentsnumberrequiredBT-146 Net pricegrossPriceCentsnumberBT-148 Gross price (before price discount)priceDiscountCentsnumberBT-147 Price discountbaseQuantitynumberBT-149 Base quantityvatobjectrequireditemobjectrequired
attachmentsArray<EInvoiceAttachment>requiredBG-24idstringrequiredBT-122 Identifiermax. 200 charactersdescriptionstringBT-123max. 1000 charactersuristringBT-124 External locationmax. 1000 charactersfilenamestringBT-125 File namemax. 300 charactersmimeCodestringmax. 100 characterssizeBytesinteger-9007199254740991–9007199254740991contentBase64stringBT-125 Content (Base64)
extensionEInvoiceExtensionDataXRechnung extension: sub-lines, third-party payments (incoming only)subLinesArray<EInvoiceSubLine>requiredthirdPartyPaymentsArray<EInvoiceThirdPartyPayment>required
language"de" | "en"Language of the free texts and the human-readable rendering (internal; EN 16931/XRechnung have no language field in the invoice header)
validationEInvoiceValidationReportrequiredprofile"en16931" | "xrechnung"requiredvalidbooleanrequiredno errors (warnings allowed)errorCountintegerrequired-9007199254740991–9007199254740991warningCountintegerrequired-9007199254740991–9007199254740991issuesArray<EInvoiceValidationIssue>requiredseverity"error" | "warning"requiredrulestringrequiredRule ID, e.g. BR-16, BR-DE-15, BR-S-02fieldsArray<string>requiredaffected business terms, e.g. ["BT-10"]pathstringPath in the data model, e.g. seller.contact.phonemessagestringrequiredhuman-readable message (German)hintstringHow to fix it (for your own invoices)
scope"structure"requiredStructural check (mandatory fields, totals, tax rules). The full KoSIT check is returned in `external`.
externalEInvoiceExternalValidationReport | nullResult of the external validation (only with `external: true`)status"passed" | "failed" | "unavailable" | "skipped"requiredmode"required" | "optional" | "off"requireddocumentKind"xml" | "zugferd_pdf"requiredsha256stringrequiredSHA-256 of the validated documentcheckedAtstringrequiredTime of validation (ISO 8601)baselinestringrequiredValidation basis (versions, ER-09)resultsArray<EInvoiceExternalValidatorResult>requiredvalidator"kosit" | "verapdf" | "mustang"requiredversionstring | nullrequiredversion reported by the service or configuredstatus"passed" | "failed" | "unavailable" | "skipped"requiredscenariostring | nullrequiredKoSIT scenario, veraPDF profile or ZUGFeRD profileerrorCountintegerrequired-9007199254740991–9007199254740991warningCountintegerrequired-9007199254740991–9007199254740991messagesArray<EInvoiceExternalValidationMessage>requiredat most 200 messagesdurationMsinteger | nullrequired-9007199254740991–9007199254740991errorstring | nullrequiredtechnical error (only for unavailable)
curl -X POST 'https://www.debt-flow.io/api/v1/e-invoices/validate' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"format": "xrechnung_ubl",
"invoice": {
"type": "invoice",
"number": "string",
"issueDate": "2026-11-01",
"serviceDate": "2026-11-01",
"servicePeriod": {
"from": "2026-11-01",
"to": "2026-11-01"
},
"dueDate": "2026-11-01",
"paymentTermsDays": 0,
"currency": "EUR",
"priceMode": "net",
"taxTreatment": "regular",
"taxNotice": "string",
"taxExempt": false,
"subject": "string",
"introText": "string",
"closingText": "string",
"lines": [
{
"id": null,
"type": null,
"articleId": null,
"title": null,
"description": null,
"quantity": null,
"unit": null,
"unitPriceCents": null,
"discountPercent": null,
"taxRate": null,
"totalCents": null,
"servicePeriod": null,
"projectId": null,
"timeEntryIds": null
}
],
"totals": {
"netCents": 0,
"taxCents": 0,
"grossCents": 0,
"groups": [
null
]
},
"prepaidCents": 0,
"recipient": {
"name": "string",
"addition": "string",
"street": "string",
"zipCode": "string",
"city": "string",
"country": "DE",
"vatId": "string",
"leitwegId": "string",
"recipientType": "business",
"email": "string",
"customerNumber": "string",
"contactName": "string",
"phone": "string"
},
"sender": {
"companyName": "",
"ownerName": "string",
"legalForm": "string",
"managingDirectors": "string",
"address": {
"street": null,
"zipCode": null,
"city": null,
"countryCode": null
},
"phone": "string",
"email": "string",
"website": "string",
"taxNumber": "string",
"vatId": "string",
"smallBusiness": false,
"commercialRegister": {
"court": null,
"number": null
},
"bank": {
"accountHolder": null,
"iban": null,
"bic": null,
"bankName": null
}
},
"relatedInvoice": {
"number": "string",
"issueDate": "2026-11-01"
},
"buyerReference": "string",
"orderReference": "string",
"contractReference": "string",
"projectReference": "string",
"paymentReference": "string",
"language": "de"
},
"external": false
}'{
"format": "xrechnung_ubl",
"invoice": {
"customizationId": "string",
"profileId": "string",
"number": "string",
"issueDate": "string",
"typeCode": "string",
"currency": "string",
"taxPointDate": "string",
"dueDate": "string",
"buyerReference": "string",
"projectReference": "string",
"contractReference": "string",
"orderReference": "string",
"salesOrderReference": "string",
"accountingReference": "string",
"notes": [],
"precedingInvoices": [],
"seller": {
"name": "string",
"tradingName": "string",
"identifiers": [],
"legalRegistrationId": {
"id": null,
"scheme": null
},
"vatId": "string",
"taxNumber": "string",
"additionalLegalInfo": "string",
"electronicAddress": {
"scheme": null,
"value": null
},
"address": null,
"contact": {
"name": null,
"phone": null,
"email": null
}
},
"buyer": {
"name": "string",
"tradingName": "string",
"identifiers": [],
"legalRegistrationId": {
"id": null,
"scheme": null
},
"vatId": "string",
"taxNumber": "string",
"additionalLegalInfo": "string",
"electronicAddress": {
"scheme": null,
"value": null
},
"address": null,
"contact": {
"name": null,
"phone": null,
"email": null
}
},
"payeeName": "string",
"delivery": {
"partyName": "string",
"date": "string",
"address": {
"line1": null,
"line2": null,
"line3": null,
"city": null,
"postCode": null,
"subdivision": null,
"countryCode": null
}
},
"invoicingPeriod": {
"start": "string",
"end": "string"
},
"paymentMeans": {
"typeCode": "string",
"text": "string",
"remittanceInfo": "string",
"accounts": [],
"card": {
"pan": null,
"holder": null
},
"directDebit": {
"mandateId": null,
"creditorId": null,
"debitedAccount": null
}
},
"paymentTerms": "string",
"allowanceCharges": [],
"totals": {
"lineNetCents": 0,
"allowancesCents": 0,
"chargesCents": 0,
"taxExclusiveCents": 0,
"taxCents": 0,
"taxInclusiveCents": 0,
"prepaidCents": 0,
"roundingCents": 0,
"payableCents": 0
},
"vatBreakdown": [
{
"category": null,
"rate": null,
"taxableCents": null,
"taxCents": null,
"exemptionReason": null,
"exemptionReasonCode": null
}
],
"lines": [
{
"id": null,
"parentLineId": null,
"statusReasonCode": null,
"note": null,
"quantity": null,
"unitCode": null,
"netAmountCents": null,
"orderLineReference": null,
"period": null,
"allowanceCharges": null,
"netPriceCents": null,
"grossPriceCents": null,
"priceDiscountCents": null,
"baseQuantity": null,
"vat": null,
"item": null
}
],
"attachments": [],
"extension": {
"subLines": [],
"thirdPartyPayments": []
},
"language": "de"
},
"validation": {
"profile": "en16931",
"valid": false,
"errorCount": 0,
"warningCount": 0,
"issues": [
{
"severity": null,
"rule": null,
"fields": null,
"path": null,
"message": null,
"hint": null
}
],
"scope": "structure"
},
"external": {
"status": "passed",
"mode": "required",
"documentKind": "xml",
"sha256": "string",
"checkedAt": "string",
"baseline": "string",
"results": [
null
]
}
}/api/v1/e-invoices/visualizeGenerates a human-readable PDF rendering (DIN 5008) of an XRechnung or a ZUGFeRD/Factur-X PDF (field file). The structured data remains legally authoritative.
Permission: receipts:read
Body (multipart/form-data)
filestring (binary)requiredapplication/xml, text/xml, application/pdf, max. 15360 KB
Response 200
File (application/pdf).
curl -X POST 'https://www.debt-flow.io/api/v1/e-invoices/visualize' \
-H "Authorization: Bearer $DEBTFLOW_API_KEY" \
-F 'file=@file'