einvoice.validate
Validate an invoice XML or a hybrid invoice PDF's XML against KoSIT rules.
https://api.kanagu.dev/v1/einvoice/validate- Price
- $0.02 per successful call
- Without a key
- 10 free calls per IP per UTC day, shared by REST and MCP.
- MCP tool
einvoice.validateathttps://api.kanagu.dev/mcp- Markdown
- /docs/einvoice.validate.md
curl https://api.kanagu.dev/v1/einvoice/validate \
-H "Content-Type: application/json" \
-d '{"xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n <cac:AccountingSupplierParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n </cac:Party></cac:AccountingSupplierParty>\n <cac:AccountingCustomerParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n \n <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n \n </cac:Party></cac:AccountingCustomerParty>\n <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n </cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n </cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n \n \n </cac:Price>\n </cac:InvoiceLine>\n</Invoice>"}'curl https://api.kanagu.dev/v1/einvoice/validate \
-H "Authorization: Bearer $KANAGU_KEY" \
-H "Content-Type: application/json" \
-d '{"xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n <cac:AccountingSupplierParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n </cac:Party></cac:AccountingSupplierParty>\n <cac:AccountingCustomerParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n \n <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n \n </cac:Party></cac:AccountingCustomerParty>\n <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n </cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n </cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n \n \n </cac:Price>\n </cac:InvoiceLine>\n</Invoice>"}'const res = await fetch("https://api.kanagu.dev/v1/einvoice/validate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KANAGU_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n <cac:AccountingSupplierParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n </cac:Party></cac:AccountingSupplierParty>\n <cac:AccountingCustomerParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n \n <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n \n </cac:Party></cac:AccountingCustomerParty>\n <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n </cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n </cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n \n \n </cac:Price>\n </cac:InvoiceLine>\n</Invoice>"
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "einvoice.validate",
"arguments": {
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n <cac:AccountingSupplierParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n </cac:Party></cac:AccountingSupplierParty>\n <cac:AccountingCustomerParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n \n <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n \n </cac:Party></cac:AccountingCustomerParty>\n <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n </cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n </cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n \n \n </cac:Price>\n </cac:InvoiceLine>\n</Invoice>"
}
}
}{
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n <cac:AccountingSupplierParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n </cac:Party></cac:AccountingSupplierParty>\n <cac:AccountingCustomerParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n \n <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n \n </cac:Party></cac:AccountingCustomerParty>\n <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n </cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n </cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n \n \n </cac:Price>\n </cac:InvoiceLine>\n</Invoice>"
}{
"valid": true,
"validator": "KoSIT 1.6.3 / XRechnung 3.0.2 (2026-08-31)",
"issues": []
}Request body
application/json
Exactly one of these 2 shapes:
1. With xml
xmlstring (max 1048576 chars)required- Invoice XML text, up to 1 MiB.
2. With base64
base64string (base64, max 5592408 chars)required- Invoice XML or hybrid PDF, up to 4 MiB before Base64 encoding.
Response
200 · application/json
validbooleanrequiredvalidator"KoSIT 1.6.3 / XRechnung 3.0.2 (2026-08-31)"requiredissuesarray of objectrequiredissues[].ruleIdstringrequiredissues[].severitystringrequiredissues[].xpathstringrequiredissues[].fieldstringrequiredissues[].messagestringrequiredissues[].fixHintstringrequired
Try it
Errors
Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.
| Status | Code and meaning |
|---|---|
| 400 | invalid_inputThe body does not match the request schema. The message names each field. |
| 400 | invalid_jsonThe body is missing or is not valid JSON. |
| 400 | invalid_idempotency_keyIdempotency-Key must be 1–128 visible ASCII characters. |
| 401 | invalid_api_keyThe Bearer key is missing, malformed, invalid or inactive. |
| 402 | free_allowance_exhaustedThis month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left. |
| 404 | not_foundNo operation at this path. |
| 409 | idempotency_conflictThe Idempotency-Key was already used with a different body. |
| 413 | payload_too_largeJSON bodies may be at most 64 KiB. |
| 429 | trial_limitThe anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left. |
| 500 | internal_errorThe call failed on our side. It is not billed; retry with the same Idempotency-Key. |
JSON Schema
Request schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"properties": {
"xml": {
"type": "string",
"minLength": 1,
"maxLength": 1048576,
"description": "Invoice XML text, up to 1 MiB."
}
},
"required": [
"xml"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"base64": {
"type": "string",
"minLength": 1,
"maxLength": 5592408,
"format": "base64",
"contentEncoding": "base64",
"pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
"description": "Invoice XML or hybrid PDF, up to 4 MiB before Base64 encoding."
}
},
"required": [
"base64"
],
"additionalProperties": false
}
],
"examples": [
{
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\" xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">\n <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID><cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID><cbc:ID>2026-0417</cbc:ID>\n <cbc:IssueDate>2026-11-23</cbc:IssueDate><cbc:DueDate>2026-12-23</cbc:DueDate><cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode><cbc:BuyerReference>90000000-03083-72</cbc:BuyerReference>\n <cac:AccountingSupplierParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">billing@example.com</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Lindenstraße 12</cbc:StreetName><cbc:CityName>Berlin</cbc:CityName><cbc:PostalZone>10117</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n <cac:PartyTaxScheme><cbc:CompanyID>DE123456789</cbc:CompanyID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:PartyTaxScheme>\n <cac:PartyLegalEntity><cbc:RegistrationName>Linden Consulting GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n <cac:Contact><cbc:Name>Kai Weber</cbc:Name><cbc:Telephone>+49 30 5550100</cbc:Telephone><cbc:ElectronicMail>kai@example.com</cbc:ElectronicMail></cac:Contact>\n </cac:Party></cac:AccountingSupplierParty>\n <cac:AccountingCustomerParty><cac:Party>\n <cbc:EndpointID schemeID=\"EM\">invoices@example.org</cbc:EndpointID>\n <cac:PostalAddress><cbc:StreetName>Hafenstraße 8</cbc:StreetName><cbc:CityName>Hamburg</cbc:CityName><cbc:PostalZone>20457</cbc:PostalZone>\n <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>\n </cac:PostalAddress>\n \n <cac:PartyLegalEntity><cbc:RegistrationName>Nordhafen Verwaltungs GmbH</cbc:RegistrationName></cac:PartyLegalEntity>\n \n </cac:Party></cac:AccountingCustomerParty>\n <cac:Delivery><cbc:ActualDeliveryDate>2026-11-20</cbc:ActualDeliveryDate></cac:Delivery>\n <cac:PaymentMeans><cbc:PaymentMeansCode>58</cbc:PaymentMeansCode><cac:PayeeFinancialAccount><cbc:ID>DE79000000001234567890</cbc:ID></cac:PayeeFinancialAccount></cac:PaymentMeans>\n <cac:TaxTotal><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount>\n <cac:TaxSubtotal><cbc:TaxableAmount currencyID=\"EUR\">950.00</cbc:TaxableAmount><cbc:TaxAmount currencyID=\"EUR\">180.50</cbc:TaxAmount><cac:TaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory></cac:TaxSubtotal>\n </cac:TaxTotal>\n <cac:LegalMonetaryTotal><cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount><cbc:TaxExclusiveAmount currencyID=\"EUR\">950.00</cbc:TaxExclusiveAmount>\n <cbc:TaxInclusiveAmount currencyID=\"EUR\">1130.50</cbc:TaxInclusiveAmount><cbc:PayableAmount currencyID=\"EUR\">1130.50</cbc:PayableAmount>\n </cac:LegalMonetaryTotal>\n <cac:InvoiceLine><cbc:ID>1</cbc:ID>\n <cbc:InvoicedQuantity unitCode=\"C62\">2</cbc:InvoicedQuantity>\n <cbc:LineExtensionAmount currencyID=\"EUR\">950.00</cbc:LineExtensionAmount>\n <cac:Item><cbc:Name>Software integration workshop</cbc:Name><cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>19.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory></cac:Item>\n <cac:Price><cbc:PriceAmount currencyID=\"EUR\">475.00</cbc:PriceAmount>\n \n \n </cac:Price>\n </cac:InvoiceLine>\n</Invoice>"
}
],
"type": "object"
}Response schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"validator": {
"type": "string",
"const": "KoSIT 1.6.3 / XRechnung 3.0.2 (2026-08-31)"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ruleId": {
"type": "string"
},
"severity": {
"type": "string"
},
"xpath": {
"type": "string"
},
"field": {
"type": "string"
},
"message": {
"type": "string"
},
"fixHint": {
"type": "string"
}
},
"required": [
"ruleId",
"severity",
"xpath",
"field",
"message",
"fixHint"
],
"additionalProperties": false
}
}
},
"required": [
"valid",
"validator",
"issues"
],
"additionalProperties": false
}