Validate, generate and read German e-invoices (XRechnung, ZUGFeRD) against the official KoSIT rules.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Optional. Bearer nk_live_… (your NormAPI API key) to generate invoices without OAuth. Validating and reading invoices need nothing.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Explain one EN 16931 / XRechnung / Peppol business rule by its code (e.g. BR-DE-15, BR-CO-10, PEPPOL-EN16931-R010): what it requires, why invoices typically break it, and how to fix it, with a link to the full page. Case does not matter. Schema findings (cvc-*) have no explanation.
The rule code, e.g. BR-DE-15
Language of the plain-language explanations: en (default) or de
Explain one EN 16931 / XRechnung / Peppol business rule by its code (e.g. BR-DE-15, BR-CO-10, PEPPOL-EN16931-R010): what it requires, why invoices typically break it, and how to fix it, with a link to the full page. Case does not matter. Schema findings (cvc-*) have no explanation.
| Argument | Type | Description |
|---|---|---|
| code* | string | The rule code, e.g. BR-DE-15 |
| language | string | Language of the plain-language explanations: en (default) or de |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"code"
],
"properties": {
"code": {
"type": "string",
"maxLength": 60,
"minLength": 2,
"description": "The rule code, e.g. BR-DE-15"
},
"language": {
"enum": [
"en",
"de"
],
"type": "string",
"default": "en",
"description": "Language of the plain-language explanations: en (default) or de"
}
}
}Produce an e-invoice as `ubl` or `cii` XML or a ZUGFeRD hybrid PDF (`zugferd`) from invoice data: an XRechnung for a public-sector buyer (profile `xrechnung`, the default), a plain EN 16931 invoice for a business (profile `en16931`). Totals are computed server-side in decimal arithmetic, and the document is validated against the official rules before it is returned. Data the rules do not permit is refused with the broken rules and how to fix each. Needs the user's NormAPI account; each document counts against the monthly allowance (50 free).
| Argument | Type | Description |
|---|---|---|
| syntax | string | ubl or cii for XML, zugferd for the PDF/A-3 with the invoice embedded |
| invoice* | object | |
| profile | string | xrechnung for public-sector buyers: it requires buyerReference (the Leitweg-ID), a seller contact and both electronic addresses. en16931 for businesses (§ 14 UStG accepts it), without those. |
| language | string | Language of the plain-language explanations: en (default) or de |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"invoice"
],
"properties": {
"syntax": {
"enum": [
"ubl",
"cii",
"zugferd"
],
"type": "string",
"default": "ubl",
"description": "ubl or cii for XML, zugferd for the PDF/A-3 with the invoice embedded"
},
"invoice": {
"type": "object",
"required": [
"invoiceNumber",
"issueDate",
"currency",
"seller",
"buyer",
"payment",
"lines"
],
"properties": {
"note": {
"type": "string",
"maxLength": 1000,
"description": "BT-22"
},
"buyer": {
"type": "object",
"required": [
"name",
"address"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "BT-27 / BT-44, the legal name"
},
"vatId": {
"type": "string",
"maxLength": 30,
"description": "BT-31 / BT-48, e.g. DE123456789"
},
"address": {
"type": "object",
"required": [
"city",
"postcode",
"country"
],
"properties": {
"city": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "BT-37 / BT-52 / BT-77, mandatory (BR-DE-3, BR-DE-8, BR-DE-10)"
},
"street": {
"type": "string",
"maxLength": 200,
"description": "BT-35 / BT-50 / BT-75"
},
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "BT-40 / BT-55 / BT-80, ISO 3166-1 alpha-2, e.g. DE"
},
"postcode": {
"type": "string",
"maxLength": 20,
"minLength": 1,
"description": "BT-38 / BT-53 / BT-78, mandatory (BR-DE-4, BR-DE-9, BR-DE-11)"
}
},
"description": "BG-5 / BG-8 / BG-15"
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"description": "BT-41"
},
"email": {
"type": "string",
"maxLength": 254,
"description": "BT-43"
},
"phone": {
"type": "string",
"maxLength": 50,
"description": "BT-42"
}
},
"description": "BG-6. XRechnung requires all three on the seller (BR-DE-2, BR-DE-5 to 7); EN 16931 none."
},
"taxNumber": {
"type": "string",
"maxLength": 30,
"description": "BT-32, the German Steuernummer"
},
"identifier": {
"type": "string",
"maxLength": 100,
"description": "BT-29 / BT-46. A seller without a VAT id repeats its tax number here: BT-32 alone satisfies BR-DE-16 but not BR-CO-26."
},
"tradingName": {
"type": "string",
"maxLength": 200,
"description": "BT-28 / BT-45, the name the party trades under beside its legal name"
},
"registrationId": {
"type": "string",
"maxLength": 100,
"description": "BT-30 / BT-47, the register entry, e.g. HRB 123456 for a GmbH; identifies a seller for BR-CO-26 like a VAT id does"
},
"legalInformation": {
"type": "string",
"maxLength": 1000,
"description": "BT-33, seller only: what company law wants on business letters beyond the name, e.g. \"Sitz Berlin, Amtsgericht Charlottenburg · Geschäftsführer: Maria Muster\" (§ 35a GmbHG)"
},
"electronicAddress": {
"type": "string",
"maxLength": 254,
"description": "BT-34 / BT-49, an email address unless a scheme says otherwise. XRechnung requires both (PEPPOL-EN16931-R020 seller, R010 buyer); EN 16931 neither."
},
"registrationIdScheme": {
"type": "string",
"pattern": "^[0-9]{4}$",
"description": "BT-30-1 / BT-47-1, ISO 6523 ICD of registrationId: none for a German register number, 0002 for a French SIREN"
},
"electronicAddressScheme": {
"type": "string",
"pattern": "^[0-9A-Z]{2,10}$",
"description": "EAS code for the electronic address; EM (email) when absent"
}
},
"description": "BG-7"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"quantity",
"unit",
"unitPrice",
"vatCategory"
],
"properties": {
"id": {
"type": "string",
"maxLength": 50,
"description": "BT-126; assigned 1..n when absent"
},
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "BT-153"
},
"note": {
"type": "string",
"maxLength": 1000,
"description": "BT-127, free text on this line"
},
"unit": {
"type": "string",
"pattern": "^[0-9A-Z]{1,8}$",
"description": "BT-130, UN/ECE Rec 20: C62 piece, HUR hour, DAY day, KGM kilogram …"
},
"period": {
"type": "object",
"properties": {
"endDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-74 / BT-135, YYYY-MM-DD"
},
"startDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-73 / BT-134, YYYY-MM-DD"
}
},
"description": "BG-26, the period this line covers"
},
"charges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Two decimals. Give amount or percent, exactly one."
},
"reason": {
"type": "string",
"maxLength": 500,
"description": "This or reasonCode is required"
},
"percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Give amount or percent, exactly one."
},
"baseAmount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "What the percentage is taken of. Only with percent (PEPPOL-EN16931-R042)."
},
"reasonCode": {
"type": "string",
"pattern": "^[0-9A-Z]{1,3}$",
"description": "UNTDID 5189 for an allowance (95 discount), UNTDID 7161 for a charge (FC freight)"
}
},
"description": "A line allowance (BG-27) or charge (BG-28); it changes the line net, in the line VAT category"
},
"maxItems": 20
},
"vatRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "BT-152, percent; required for category S"
},
"quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "BT-129, up to six decimals"
},
"listPrice": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "BT-148, the price before the price discount, at least unitPrice; the discount (BT-147) is listPrice − unitPrice"
},
"unitPrice": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "BT-146, net, up to four decimals; per baseQuantity units when one is given"
},
"allowances": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Two decimals. Give amount or percent, exactly one."
},
"reason": {
"type": "string",
"maxLength": 500,
"description": "This or reasonCode is required"
},
"percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Give amount or percent, exactly one."
},
"baseAmount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "What the percentage is taken of. Only with percent (PEPPOL-EN16931-R042)."
},
"reasonCode": {
"type": "string",
"pattern": "^[0-9A-Z]{1,3}$",
"description": "UNTDID 5189 for an allowance (95 discount), UNTDID 7161 for a charge (FC freight)"
}
},
"description": "A line allowance (BG-27) or charge (BG-28); it changes the line net, in the line VAT category"
},
"maxItems": 20
},
"buyerItemId": {
"type": "string",
"maxLength": 100,
"description": "BT-156, the buyer's own number for the article"
},
"description": {
"type": "string",
"maxLength": 1000,
"description": "BT-154"
},
"vatCategory": {
"enum": [
"S",
"Z",
"E",
"AE",
"K",
"G",
"O",
"L",
"M"
],
"type": "string",
"description": "UNTDID 5305: S standard, Z zero-rated, E exempt, AE reverse charge, K intra-community supply, G export, O outside scope, L Canary Islands, M Ceuta/Melilla"
},
"baseQuantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "BT-149, how many units unitPrice and listPrice are for, e.g. 100 for a price per hundred; 1 when absent"
},
"sellerItemId": {
"type": "string",
"maxLength": 100,
"description": "BT-155, the seller's article number"
},
"standardItemId": {
"type": "string",
"maxLength": 100,
"description": "BT-157, e.g. the GTIN (EAN) on the packaging"
},
"orderLineReference": {
"type": "string",
"maxLength": 50,
"description": "BT-132, the line of the buyer's purchase order this one bills"
},
"vatExemptionReason": {
"type": "string",
"maxLength": 500,
"description": "BT-120; the rule set wants it for the exempt-family categories"
},
"standardItemIdScheme": {
"type": "string",
"pattern": "^[0-9]{4}$",
"description": "BT-157-1, ISO 6523 ICD of standardItemId; 0160 (GTIN) when absent"
}
}
},
"maxItems": 500,
"minItems": 1,
"description": "BG-25. Totals are computed server-side in decimal arithmetic."
},
"seller": {
"type": "object",
"required": [
"name",
"address"
],
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"minLength": 1,
"description": "BT-27 / BT-44, the legal name"
},
"vatId": {
"type": "string",
"maxLength": 30,
"description": "BT-31 / BT-48, e.g. DE123456789"
},
"address": {
"type": "object",
"required": [
"city",
"postcode",
"country"
],
"properties": {
"city": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "BT-37 / BT-52 / BT-77, mandatory (BR-DE-3, BR-DE-8, BR-DE-10)"
},
"street": {
"type": "string",
"maxLength": 200,
"description": "BT-35 / BT-50 / BT-75"
},
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "BT-40 / BT-55 / BT-80, ISO 3166-1 alpha-2, e.g. DE"
},
"postcode": {
"type": "string",
"maxLength": 20,
"minLength": 1,
"description": "BT-38 / BT-53 / BT-78, mandatory (BR-DE-4, BR-DE-9, BR-DE-11)"
}
},
"description": "BG-5 / BG-8 / BG-15"
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"description": "BT-41"
},
"email": {
"type": "string",
"maxLength": 254,
"description": "BT-43"
},
"phone": {
"type": "string",
"maxLength": 50,
"description": "BT-42"
}
},
"description": "BG-6. XRechnung requires all three on the seller (BR-DE-2, BR-DE-5 to 7); EN 16931 none."
},
"taxNumber": {
"type": "string",
"maxLength": 30,
"description": "BT-32, the German Steuernummer"
},
"identifier": {
"type": "string",
"maxLength": 100,
"description": "BT-29 / BT-46. A seller without a VAT id repeats its tax number here: BT-32 alone satisfies BR-DE-16 but not BR-CO-26."
},
"tradingName": {
"type": "string",
"maxLength": 200,
"description": "BT-28 / BT-45, the name the party trades under beside its legal name"
},
"registrationId": {
"type": "string",
"maxLength": 100,
"description": "BT-30 / BT-47, the register entry, e.g. HRB 123456 for a GmbH; identifies a seller for BR-CO-26 like a VAT id does"
},
"legalInformation": {
"type": "string",
"maxLength": 1000,
"description": "BT-33, seller only: what company law wants on business letters beyond the name, e.g. \"Sitz Berlin, Amtsgericht Charlottenburg · Geschäftsführer: Maria Muster\" (§ 35a GmbHG)"
},
"electronicAddress": {
"type": "string",
"maxLength": 254,
"description": "BT-34 / BT-49, an email address unless a scheme says otherwise. XRechnung requires both (PEPPOL-EN16931-R020 seller, R010 buyer); EN 16931 neither."
},
"registrationIdScheme": {
"type": "string",
"pattern": "^[0-9]{4}$",
"description": "BT-30-1 / BT-47-1, ISO 6523 ICD of registrationId: none for a German register number, 0002 for a French SIREN"
},
"electronicAddressScheme": {
"type": "string",
"pattern": "^[0-9A-Z]{2,10}$",
"description": "EAS code for the electronic address; EM (email) when absent"
}
},
"description": "BG-4. Needs a VAT id or tax number (BR-DE-16); XRechnung also a contact (BR-DE-2)."
},
"charges": {
"type": "array",
"items": {
"type": "object",
"required": [
"vatCategory"
],
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Two decimals. Give amount or percent, exactly one."
},
"reason": {
"type": "string",
"maxLength": 500,
"description": "This or reasonCode is required"
},
"percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Give amount or percent, exactly one."
},
"vatRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Percent"
},
"baseAmount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "What the percentage is taken of. Only with percent (PEPPOL-EN16931-R042)."
},
"reasonCode": {
"type": "string",
"pattern": "^[0-9A-Z]{1,3}$",
"description": "UNTDID 5189 for an allowance (95 discount), UNTDID 7161 for a charge (FC freight)"
},
"vatCategory": {
"enum": [
"S",
"Z",
"E",
"AE",
"K",
"G",
"O",
"L",
"M"
],
"type": "string",
"description": "UNTDID 5305: S standard, Z zero-rated, E exempt, AE reverse charge, K intra-community supply, G export, O outside scope, L Canary Islands, M Ceuta/Melilla"
},
"vatExemptionReason": {
"type": "string",
"maxLength": 500,
"description": "BT-120, as on a line"
}
},
"description": "A document-level allowance (BG-20) or charge (BG-21)"
},
"maxItems": 100,
"description": "BG-21: freight, packaging …"
},
"dueDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-9. XRechnung wants this or paymentTerms on a payable invoice."
},
"payment": {
"type": "object",
"required": [
"meansCode"
],
"properties": {
"bic": {
"type": "string",
"pattern": "^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$",
"description": "BT-86, the payee bank"
},
"card": {
"type": "object",
"required": [
"number"
],
"properties": {
"holder": {
"type": "string",
"maxLength": 200,
"description": "BT-88"
},
"number": {
"type": "string",
"pattern": "^[^0-9]*([0-9][^0-9]*){0,10}$",
"maxLength": 50,
"minLength": 1,
"description": "BT-87, masked: at most the first 6 and the last 4 digits, never the full number. Send digits without mask characters."
},
"network": {
"type": "string",
"maxLength": 50,
"description": "VISA, MasterCard …; UBL writes NA when absent"
}
},
"description": "BG-18, with payment means 48, 54 or 55"
},
"iban": {
"type": "string",
"maxLength": 34,
"description": "BT-84, the payee account; required for transfers (BR-DE-23-a)"
},
"meansCode": {
"type": "string",
"pattern": "^([0-9]{1,3}|ZZZ)$",
"description": "BT-81, UNTDID 4461: 58 SEPA credit transfer, 30 credit transfer, 59 SEPA direct debit, 48/54/55 card, 10 cash, ZZZ mutually defined"
},
"meansText": {
"type": "string",
"maxLength": 200,
"description": "BT-82, the payment means in words"
},
"reference": {
"type": "string",
"maxLength": 140,
"description": "BT-83, what the payer should quote"
},
"accountName": {
"type": "string",
"maxLength": 200,
"description": "BT-85, the payee account holder"
},
"directDebit": {
"type": "object",
"properties": {
"creditorId": {
"type": "string",
"maxLength": 35,
"description": "BT-90, the SEPA creditor identifier"
},
"debitedAccount": {
"type": "string",
"maxLength": 34,
"description": "BT-91, the buyer IBAN debited"
},
"mandateReference": {
"type": "string",
"maxLength": 35,
"description": "BT-89"
}
},
"description": "BG-19, with payment means 59. Leave out the payee IBAN (BR-DE-25-b)."
}
},
"description": "BG-16 and the group its code calls for: BG-17 transfer, BG-18 card, BG-19 direct debit"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "BT-5, ISO 4217, e.g. EUR"
},
"typeCode": {
"type": "string",
"pattern": "^[0-9]{3}$",
"description": "BT-3, UNTDID 1001; 380 when absent. 381 credit note, 384 corrected invoice, 326 partial, 389 self-billed, 875/876/877 construction invoices."
},
"deliverTo": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200,
"description": "BT-70, who received the goods: a branch, a warehouse, a site"
},
"address": {
"type": "object",
"required": [
"city",
"postcode",
"country"
],
"properties": {
"city": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "BT-37 / BT-52 / BT-77, mandatory (BR-DE-3, BR-DE-8, BR-DE-10)"
},
"street": {
"type": "string",
"maxLength": 200,
"description": "BT-35 / BT-50 / BT-75"
},
"country": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "BT-40 / BT-55 / BT-80, ISO 3166-1 alpha-2, e.g. DE"
},
"postcode": {
"type": "string",
"maxLength": 20,
"minLength": 1,
"description": "BT-38 / BT-53 / BT-78, mandatory (BR-DE-4, BR-DE-9, BR-DE-11)"
}
},
"description": "BG-15, the delivery address"
},
"locationId": {
"type": "string",
"maxLength": 100,
"description": "BT-71, an identifier of the place, e.g. its GLN"
},
"locationIdScheme": {
"type": "string",
"pattern": "^[0-9]{4}$",
"description": "BT-71-1, ISO 6523 ICD of locationId: 0088 for a GLN; absent means the seller's own"
}
},
"description": "BG-13: where the supply went, when not simply to the buyer. Required for VAT category K: the country the goods went to (BR-IC-12)."
},
"issueDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-2, YYYY-MM-DD"
},
"allowances": {
"type": "array",
"items": {
"type": "object",
"required": [
"vatCategory"
],
"properties": {
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Two decimals. Give amount or percent, exactly one."
},
"reason": {
"type": "string",
"maxLength": 500,
"description": "This or reasonCode is required"
},
"percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Give amount or percent, exactly one."
},
"vatRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "Percent"
},
"baseAmount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "What the percentage is taken of. Only with percent (PEPPOL-EN16931-R042)."
},
"reasonCode": {
"type": "string",
"pattern": "^[0-9A-Z]{1,3}$",
"description": "UNTDID 5189 for an allowance (95 discount), UNTDID 7161 for a charge (FC freight)"
},
"vatCategory": {
"enum": [
"S",
"Z",
"E",
"AE",
"K",
"G",
"O",
"L",
"M"
],
"type": "string",
"description": "UNTDID 5305: S standard, Z zero-rated, E exempt, AE reverse charge, K intra-community supply, G export, O outside scope, L Canary Islands, M Ceuta/Melilla"
},
"vatExemptionReason": {
"type": "string",
"maxLength": 500,
"description": "BT-120, as on a line"
}
},
"description": "A document-level allowance (BG-20) or charge (BG-21)"
},
"maxItems": 100,
"description": "BG-20"
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 200,
"description": "BT-122, the document's number or name; the filename when absent (BR-52)"
},
"url": {
"type": "string",
"pattern": "^https?:\\/\\/\\S+$",
"maxLength": 2000,
"description": "BT-124, where the buyer can fetch the document"
},
"content": {
"type": "string",
"format": "base64",
"pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
"description": "BT-125, the file as base64, with filename and mimeCode; it must be of that type. At most 3 MB of files per invoice.",
"contentEncoding": "base64"
},
"filename": {
"type": "string",
"maxLength": 200,
"description": "BT-125-2, unique within the invoice (BR-DE-22)"
},
"mimeCode": {
"type": "string",
"maxLength": 100,
"description": "BT-125-1, one of BR-CL-24: application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.oasis.opendocument.spreadsheet"
},
"description": {
"type": "string",
"maxLength": 500,
"description": "BT-123"
}
},
"description": "BG-24, a supporting document: a file inside the invoice (a timesheet, a delivery note), a link, or a reference alone"
},
"maxItems": 20,
"description": "BG-24"
},
"deliveryDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-72. Omitting it and invoicePeriod draws an advisory."
},
"paymentTerms": {
"type": "string",
"maxLength": 1000,
"description": "BT-20"
},
"invoiceNumber": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "BT-1"
},
"invoicePeriod": {
"type": "object",
"properties": {
"endDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-74 / BT-135, YYYY-MM-DD"
},
"startDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-73 / BT-134, YYYY-MM-DD"
}
},
"description": "BG-14, the period a monthly or yearly invoice covers, instead of deliveryDate or beside it"
},
"prepaidAmount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
],
"description": "BT-113, already paid; the amount due is the total less this"
},
"buyerReference": {
"type": "string",
"maxLength": 200,
"description": "BT-10: the Leitweg-ID for public-sector buyers, else the buyer reference. Mandatory in XRechnung (BR-DE-15), optional in EN 16931."
},
"orderReference": {
"type": "string",
"maxLength": 100,
"description": "BT-13, the buyer's purchase order number"
},
"projectReference": {
"type": "string",
"maxLength": 100,
"description": "BT-11"
},
"contractReference": {
"type": "string",
"maxLength": 100,
"description": "BT-12"
},
"precedingInvoices": {
"type": "array",
"items": {
"type": "object",
"required": [
"number"
],
"properties": {
"number": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "BT-25"
},
"issueDate": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "BT-26"
}
}
},
"maxItems": 50,
"description": "BG-3, the invoices this one corrects, credits or settles. CII and ZUGFeRD carry one."
},
"despatchAdviceReference": {
"type": "string",
"maxLength": 100,
"description": "BT-16, the delivery note (Lieferschein) number"
}
}
},
"profile": {
"enum": [
"xrechnung",
"en16931"
],
"type": "string",
"default": "xrechnung",
"description": "xrechnung for public-sector buyers: it requires buyerReference (the Leitweg-ID), a seller contact and both electronic addresses. en16931 for businesses (§ 14 UStG accepts it), without those."
},
"language": {
"enum": [
"en",
"de"
],
"type": "string",
"default": "en",
"description": "Language of the plain-language explanations: en (default) or de"
}
}
}Read a received e-invoice — XRechnung or any EN 16931 invoice as UBL or CII XML, or a ZUGFeRD/Factur-X PDF — into structured data. `invoice` is in exactly the shape generate_invoice takes (fields the document lacks are left out); `stated` has the totals, the VAT breakdown and each line net as the document states them, as exact decimal strings; `notMapped` lists by path every value of the document the data does not carry. Send the XML as text in `xml`, or the PDF base64-encoded in `pdfBase64` — exactly one. `validate: true` adds the KoSIT verdict. Free, no account needed, 5 MB at most.
| Argument | Type | Description |
|---|---|---|
| xml | string | The invoice XML as text |
| language | string | Language of the plain-language explanations: en (default) or de |
| validate | boolean | Also check the invoice against the KoSIT rules and return the verdict |
| pdfBase64 | string | A ZUGFeRD or Factur-X PDF, base64-encoded |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"xml": {
"type": "string",
"maxLength": 5242880,
"description": "The invoice XML as text"
},
"language": {
"enum": [
"en",
"de"
],
"type": "string",
"default": "en",
"description": "Language of the plain-language explanations: en (default) or de"
},
"validate": {
"type": "boolean",
"default": false,
"description": "Also check the invoice against the KoSIT rules and return the verdict"
},
"pdfBase64": {
"type": "string",
"maxLength": 6990511,
"description": "A ZUGFeRD or Factur-X PDF, base64-encoded"
}
}
}Check an XRechnung (UBL or CII XML) or a ZUGFeRD/Factur-X PDF against the official KoSIT rules. Returns the verdict, the rule set version, and every finding; each business-rule finding comes with a plain-language meaning, cause and fix. Send the XML as text in `xml`, or the PDF base64-encoded in `pdfBase64` — exactly one. Free, no account needed, 5 MB at most.
| Argument | Type | Description |
|---|---|---|
| xml | string | The invoice XML as text |
| fileName | string | The file name, echoed into the report only |
| language | string | Language of the plain-language explanations: en (default) or de |
| pdfBase64 | string | A ZUGFeRD or Factur-X PDF, base64-encoded |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"xml": {
"type": "string",
"maxLength": 5242880,
"description": "The invoice XML as text"
},
"fileName": {
"type": "string",
"maxLength": 200,
"description": "The file name, echoed into the report only"
},
"language": {
"enum": [
"en",
"de"
],
"type": "string",
"default": "en",
"description": "Language of the plain-language explanations: en (default) or de"
},
"pdfBase64": {
"type": "string",
"maxLength": 6990511,
"description": "A ZUGFeRD or Factur-X PDF, base64-encoded"
}
}
}