JSON-Rechnungsfelder zu UBL XML (EN 16931 / Peppol BIS 3.0)
Diese Anleitung beschreibt die Zuordnung zwischen den B2Brouter Invoice API-Feldern, den entsprechenden Business Terms (BT) gemäß dem europäischen E-Rechnungsstandard (EN 16931) und den XML-Pfaden im UBL 2.1-Modell (einschließlich Peppol BIS Billing 3.0).
Zuordnung auf Header-Ebene
Section titled “Zuordnung auf Header-Ebene”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-1 | Rechnungsnummer | invoice.number | cbc:ID |
| BT-2 | Ausstellungsdatum | invoice.date | cbc:IssueDate |
| BT-3 | Rechnungstyp-Code | invoice.type_code (API 2026-03-02) | cbc:InvoiceTypeCode (oder cbc:CreditNoteTypeCode) |
| BT-5 | Dokumentwährung | invoice.currency | cbc:DocumentCurrencyCode |
| BT-6 | Steuerwährungs-Code | invoice.contact.currency | cbc:TaxCurrencyCode |
| BT-7 | Steuerlicher Leistungszeitpunkt | invoice.tax_point_date | cbc:TaxPointDate |
| BT-9 | Zahlungsfälligkeitsdatum | invoice.due_date | cbc:DueDate |
| BT-10 | Käuferreferenz | invoice.buyer_reference | cbc:BuyerReference |
| BT-19 | Buchhaltungskosten | invoice.buyer_accounting_reference | cbc:AccountingCost |
| BT-22 | Hinweis (Header) | invoice.extra_info | cbc:Note |
Hinweise:
- BT-6: Wird nur ausgegeben, wenn die Währung des Käuferkontakts von der Rechnungswährung (BT-5) abweicht und Steuerbeträge in dieser Währung vorhanden sind. Bei Angabe wird ein zweiter
cac:TaxTotal-Block mit Beträgen in dieser Währung dargestellt.
Referenzen & Zeiträume
Section titled “Referenzen & Zeiträume”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-13 | Bestellreferenz | invoice.ponumber | cac:OrderReference/cbc:ID |
| BT-14 | Auftragsreferenz | invoice.sales_order_reference | cac:OrderReference/cbc:SalesOrderID |
| BT-12 | Vertragsreferenz | invoice.contract_number | cac:ContractDocumentReference/cbc:ID |
| BT-15 | Empfangsbestätigungsreferenz | invoice.receiving_advice_reference | cac:ReceiptDocumentReference/cbc:ID |
| BT-16 | Lieferscheinreferenz | invoice.delivery_note_number | cac:DespatchDocumentReference/cbc:ID |
| BT-25 | Vorherige Rechnungsreferenz | invoice.amended_number | cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID |
| BT-26 | Datum der vorherigen Rechnung | invoice.amended_date | cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate |
| BT-73 | Beginn Rechnungszeitraum | invoice.invoicing_period_start | cac:InvoicePeriod/cbc:StartDate |
| BT-74 | Ende Rechnungszeitraum | invoice.invoicing_period_end | cac:InvoicePeriod/cbc:EndDate |
| BT-11 | Projektreferenz | invoice.file_reference | cac:ProjectReference/cbc:ID |
| — | Ursprungsdokumentreferenz | invoice.lot_reference | cac:OriginatorDocumentReference/cbc:ID |
Hinweise:
- Bei Gutschriften wird
file_reference(BT-11) alscac:AdditionalDocumentReference/cbc:IDstatt alscac:ProjectReference/cbc:IDausgegeben.
Zuordnung der Parteien
Section titled “Zuordnung der Parteien”Diese Zuordnung gilt für eine ausgestellte Rechnung; bei einer empfangenen Rechnung sind AccountingSupplierParty und AccountingCustomerParty zu vertauschen.
Selbstabrechnung (
IssuedSelfInvoice/ReceivedSelfInvoice): Bei der Selbstabrechnung stellt der Käufer die Rechnung im Namen des Lieferanten aus, sodass die Parteirollen im XML gegenüber den API-Feldern umgekehrt sind. Bei einemIssuedSelfInvoiceerscheinenaccount-Daten inAccountingCustomerParty(Ihr Unternehmen ist der Käufer) undinvoice.contact-Daten inAccountingSupplierParty(der Kontakt ist der Lieferant). FürReceivedSelfInvoicegilt das symmetrisch.
Verkäuferpartei
Section titled “Verkäuferpartei”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-34 | Endpunkt-ID des Verkäufers | account.pin_value | cac:AccountingSupplierParty/cac:Party/cbc:EndpointID @schemeID |
| BT-27 | Rechtlicher Name des Verkäufers | account.name | cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName |
| BT-31 | USt-IdNr. des Verkäufers | account.tin_value | cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID |
| BT-35 | Straße des Verkäufers | account.address | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:StreetName |
| BT-36 | Straße des Verkäufers 2 | account.address2 | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:AdditionalStreetName |
| BT-37 | Stadt des Verkäufers | account.city | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CityName |
| BT-38 | PLZ des Verkäufers | account.postalcode | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:PostalZone |
| BT-39 | Provinz des Verkäufers | account.province | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity |
| BT-40 | Land des Verkäufers | account.country | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode |
| BT-41 | Ansprechpartner Verkäufer | account.contact_person | cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:Name |
| BT-42 | Telefon des Verkäufers | account.phone | cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:Telephone |
| BT-43 | E-Mail des Verkäufers | account.email | cac:AccountingSupplierParty/cac:Party/cac:Contact/cbc:ElectronicMail |
Käuferpartei
Section titled “Käuferpartei”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-49 | Endpunkt-ID des Käufers | invoice.contact.pin_value | cac:AccountingCustomerParty/cac:Party/cbc:EndpointID @schemeID |
| BT-44 | Rechtlicher Name des Käufers | invoice.contact.name | cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName |
| BT-45 | Handelsname des Käufers | invoice.contact.name | cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name |
| BT-48 | USt-IdNr. des Käufers | invoice.contact.tin_value | cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID |
| BT-50 | Straße des Käufers | invoice.contact.address | cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:StreetName |
| BT-51 | Straße des Käufers 2 | invoice.contact.address2 | cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:AdditionalStreetName |
| BT-52 | Stadt des Käufers | invoice.contact.city | cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CityName |
| BT-53 | PLZ des Käufers | invoice.contact.postalcode | cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:PostalZone |
| BT-54 | Provinz des Käufers | invoice.contact.province | cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CountrySubentity |
| BT-55 | Land des Käufers | invoice.contact.country | cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode |
| BT-56 | Ansprechpartner Käufer | invoice.contact.contact_person | cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Name |
| BT-57 | Telefon des Käufers | invoice.contact.phone | cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:Telephone |
| BT-58 | E-Mail des Käufers | invoice.contact.email | cac:AccountingCustomerParty/cac:Party/cac:Contact/cbc:ElectronicMail |
Lieferung
Section titled “Lieferung”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-72 | Lieferdatum | invoice.delivery_date | cac:Delivery/cbc:ActualDeliveryDate |
| BT-71 | Lieferort-ID | invoice.delivery_location_id | cac:Delivery/cac:DeliveryLocation/cbc:ID |
| BT-75 | Lieferadresse Straße | invoice.delivery_address | cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:StreetName |
| BT-76 | Lieferadresse Straße 2 | invoice.delivery_address2 | cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:AdditionalStreetName |
| BT-77 | Lieferstadt | invoice.delivery_city | cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CityName |
| BT-78 | Lieferpostleitzahl | invoice.delivery_postalcode | cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:PostalZone |
| BT-79 | Lieferprovinz | invoice.delivery_province | cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CountrySubentity |
| BT-80 | Lieferland | invoice.delivery_country | cac:Delivery/cac:DeliveryLocation/cac:Address/cac:Country/cbc:IdentificationCode |
| BT-70 | Name der Lieferpartei | invoice.delivery_party_name | cac:Delivery/cac:DeliveryParty/cac:PartyName/cbc:Name |
Zahlung
Section titled “Zahlung”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-81 | Zahlungsmittel-Code | invoice.payment_method | cac:PaymentMeans/cbc:PaymentMeansCode @listID='UNCL4461' |
| BT-82 | Zahlungsmitteltext | invoice.payment_method_text | cac:PaymentMeans/cbc:PaymentMeansCode @name |
| BT-83 | Verwendungszweck | invoice.remittance_information | cac:PaymentMeans/cbc:PaymentID |
| BT-84 | IBAN des Zahlungsempfängers | invoice.bank_account.iban | cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID |
| BT-84-0 | Kontonummer des Zahlungsempfängers | invoice.bank_account.number | cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:ID (Fallback ohne IBAN) |
| BT-85 | Name der Bank des Zahlungsempfängers | invoice.bank_account.name | cac:PaymentMeans/cac:PayeeFinancialAccount/cbc:Name (derzeit nicht gerendert) |
| BT-86 | BIC des Zahlungsempfängers | invoice.bank_account.bic | cac:PaymentMeans/cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID |
| BT-87 | Kartennummer | invoice.card_account_attributes.account_number | cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID |
| BT-87-0 | Name des Karteninhabers | invoice.card_account_attributes.holder_name | cac:PaymentMeans/cac:CardAccount/cbc:HolderName |
| BT-88 | Kartennetzwerk-ID | invoice.card_account_attributes.network | cac:PaymentMeans/cac:CardAccount/cbc:NetworkID |
| BT-20 | Zahlungsbedingungen | invoice.payment_terms | cac:PaymentTerms/cbc:Note |
| BT-89 | Mandatsreferenz (nur SEPA-Lastschrift) | invoice.mandate_reference_identifier | cac:PaymentMeans/cac:PaymentMandate/cbc:ID |
| BT-90 | Gläubigerreferenz (SEPA-Lastschrift) | invoice.bank_assigned_creditor_reference | cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID @schemeID='SEPA' |
| BT-91 | IBAN des Schuldnerkontos (SEPA-DD) | invoice.contact_iban | cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID |
Gesamtbeträge & Steuern
Section titled “Gesamtbeträge & Steuern”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-106 | Summe der Nettopositionen | (berechnet) | cac:LegalMonetaryTotal/cbc:LineExtensionAmount |
| BT-109 | Betrag ohne Steuer | (berechnet) | cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount |
| BT-107 | Gesamtrabattbetrag | (berechnet) | cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount |
| BT-108 | Gesamtzuschlagsbetrag | (berechnet) | cac:LegalMonetaryTotal/cbc:ChargeTotalAmount |
| BT-112 | Betrag inkl. Steuer | (berechnet) | cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount |
| BT-113 | Vorauszahlungsbetrag gesamt | invoice.payments_on_account | cac:LegalMonetaryTotal/cbc:PrepaidAmount |
| BT-114 | Rundungsbetrag | (aus Rechnungsanpassung) | cac:LegalMonetaryTotal/cbc:PayableRoundingAmount |
| BT-115 | Fälliger Zahlungsbetrag | invoice.payable_amount | cac:LegalMonetaryTotal/cbc:PayableAmount |
| BT-110 | MwSt.-Gesamtbetrag der Rechnung | (berechnet) | cac:TaxTotal/cbc:TaxAmount |
| BT-116 | Steuerpflichtige Basis (Kategorie) | (aus Positionen berechnet) | cac:TaxTotal/cac:TaxSubtotal/cbc:TaxableAmount |
| BT-117 | Steuerbetrag (Kategorie) | (aus Positionen berechnet) | cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount |
| — | Einbehaltener Betrag | invoice.withheld_percent | cac:AllowanceCharge/cbc:Amount |
| — | Grund des Einbehalts | invoice.amounts_withheld_reason | cac:AllowanceCharge/cbc:AllowanceChargeReason |
Rabatte & Zuschläge auf Header-Ebene
Section titled “Rabatte & Zuschläge auf Header-Ebene”| BT | Business Term | API-Feld (B2Brouter) | UBL XPath |
|---|---|---|---|
| BT-92 | Rabattbetrag | allowance_charges_attributes[]{allowance_charge_indicator: "allowance", amount: X} | cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:Amount |
| BT-93 | Rabattbasiswert | (berechnet bei Prozentangabe) | cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:BaseAmount |
| BT-94 | Rabattprozentsatz | allowance_charges_attributes[]{allowance_charge_indicator: "allowance", percentage: X} | cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:MultiplierFactorNumeric |
| BT-97 | Rabattgrund | allowance_charges_attributes[]{allowance_charge_indicator: "allowance", description: "..."} | cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:AllowanceChargeReason |
| BT-99 | Zuschlagsbetrag | allowance_charges_attributes[]{allowance_charge_indicator: "charge", amount: X} | cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:Amount |
| BT-100 | Zuschlagsbasiswert | (berechnet bei Prozentangabe) | cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:BaseAmount |
| BT-101 | Zuschlagsprozentsatz | allowance_charges_attributes[]{allowance_charge_indicator: "charge", percentage: X} | cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:MultiplierFactorNumeric |
| BT-104 | Zuschlagsgrund | allowance_charges_attributes[]{allowance_charge_indicator: "charge", description: "..."} | cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:AllowanceChargeReason |
| BT-102 | Steuer auf Rabatt/Zuschlag anwenden | allowance_charges_attributes[]{apply_taxes: true} | cac:AllowanceCharge/cac:TaxCategory |
Zuordnung auf Rechnungspositionsebene
Section titled “Zuordnung auf Rechnungspositionsebene”Alle nachfolgenden Attribute sind Eigenschaften von Objekten in: invoice.invoice_lines_attributes[].
| BT | Business Term | API-Feld (Rechnungsposition) | UBL XPath |
|---|---|---|---|
| BT-126 | Rechnungspositions-ID | position | cac:InvoiceLine/cbc:ID |
| BT-129 | Berechnete Menge | quantity | cac:InvoiceLine/cbc:InvoicedQuantity |
| BT-130 | Berechnete Menge (Einheit) | unit | cac:InvoiceLine/cbc:InvoicedQuantity @unitCode |
| BT-131 | Positionsbetrag | extension_amount (oder berechnet) | cac:InvoiceLine/cbc:LineExtensionAmount |
| BT-146 | Einzelpreis | price | cac:InvoiceLine/cac:Price/cbc:PriceAmount |
| BT-153 | Artikelname | description | cac:InvoiceLine/cac:Item/cbc:Name |
| BT-154 | Artikelbeschreibung | notes | cac:InvoiceLine/cac:Item/cbc:Description |
| BT-155 | Artikelnummer (Verkäufer) | article_code | cac:InvoiceLine/cac:Item/cac:SellersItemIdentification/cbc:ID |
| BT-156 | Artikelnummer (Käufer) | article_code_buyer | cac:InvoiceLine/cac:Item/cac:BuyersItemIdentification/cbc:ID |
| BT-157 | Standard-Artikelnummer | article_code2 | cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID @schemeID |
| BT-157-1 | Schema der Standard-Artikelnummer | article_code2_scheme | cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID @schemeID (Standard: 0160) |
| BT-158 | Klassifikationscode | classification_code | cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode @listID |
| BT-158-1 | Schema des Klassifikationscodes | classification_code_scheme | cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode @listID |
| BT-151 | MwSt.-Kategorie (je Position) | taxes_attributes[].category | cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID |
| BT-152 | MwSt.-Prozentsatz (je Position) | taxes_attributes[].percent | cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:Percent |
| BT-120 | Steuerbefreiungsgrund | taxes_attributes[].comment | cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:TaxExemptionReason |
| BT-160 | Name der zusätzlichen Artikeleigenschaft | additional_item_properties_attributes[].name | cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty/cbc:Name |
| BT-161 | Wert der zusätzlichen Artikeleigenschaft | additional_item_properties_attributes[].value | cac:InvoiceLine/cac:Item/cac:AdditionalItemProperty/cbc:Value |
| BT-133 | Buchhaltungsreferenz Käufer | contact_reference | cac:InvoiceLine/cbc:AccountingCost |
| BT-134 | Beginn Abrechnungszeitraum (Position) | invoicing_period_start | cac:InvoiceLine/cac:InvoicePeriod/cbc:StartDate |
| BT-135 | Ende Abrechnungszeitraum (Position) | invoicing_period_end | cac:InvoiceLine/cac:InvoicePeriod/cbc:EndDate |
| BT-136 | Rabattbetrag (Position) | allowance_charges_attributes[]{allowance_charge_indicator: "allowance", amount: X} | cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:Amount |
| BT-138 | Rabattprozentsatz (Position) | allowance_charges_attributes[]{allowance_charge_indicator: "allowance", percentage: X} | cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:MultiplierFactorNumeric |
| BT-139 | Rabattgrund (Position) | allowance_charges_attributes[]{allowance_charge_indicator: "allowance", description: "..."} | cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator=false]/cbc:AllowanceChargeReason |
| BT-141 | Zuschlagsbetrag (Position) | allowance_charges_attributes[]{allowance_charge_indicator: "charge", amount: X} | cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:Amount |
| BT-143 | Zuschlagsprozentsatz (Position) | allowance_charges_attributes[]{allowance_charge_indicator: "charge", percentage: X} | cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:MultiplierFactorNumeric |
| BT-144 | Zuschlagsgrund (Position) | allowance_charges_attributes[]{allowance_charge_indicator: "charge", description: "..."} | cac:InvoiceLine/cac:AllowanceCharge[cbc:ChargeIndicator=true]/cbc:AllowanceChargeReason |
| BT-128 | Bestellreferenz (Position) | invoice_lines_attributes[].ponumber | cac:InvoiceLine/cac:DocumentReference/cbc:ID |
| BT-132 | Bestellpositionsreferenz | invoice_lines_attributes[].sequence_number | cac:InvoiceLine/cac:OrderLineReference/cbc:LineID |