Skip to content
E-invoicing

einvoice.parse

Extract invoice parties, references, dates, amounts, and lines from XML or hybrid PDF.

POSThttps://api.kanagu.dev/v1/einvoice/parse
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.parse at https://api.kanagu.dev/mcp
curl https://api.kanagu.dev/v1/einvoice/parse \
  -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/parse \
  -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/parse", {
  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.parse",
    "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>"
    }
  }
}
Request body
{
  "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>"
}

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

format"ubl" | "cii"required
container"xml" | "pdf"required
profilestring
referencestring
invoiceNumberstring
issueDatestring (date)
dueDatestring (date)
currencystring
sellerobjectrequired
seller.namestring
seller.vatIdstring
seller.electronicAddressstring
seller.electronicAddressSchemestring
seller.emailstring
Contact email address.
seller.addressobjectrequired
seller.address.streetstring
seller.address.citystring
seller.address.postalCodestring
seller.address.countrystring
seller.taxRegistrationIdstring
buyerobjectrequired
buyer.namestring
buyer.vatIdstring
buyer.electronicAddressstring
buyer.electronicAddressSchemestring
buyer.emailstring
Contact email address.
buyer.addressobjectrequired
buyer.address.streetstring
buyer.address.citystring
buyer.address.postalCodestring
buyer.address.countrystring
totalsobjectrequired
totals.netstring
totals.taxstring
totals.grossstring
totals.payablestring
linesarray of objectrequired
lines[].idstring
lines[].descriptionstring
lines[].quantitystring
lines[].unitstring
lines[].unitPricestring
lines[].baseQuantitystring
lines[].baseQuantityUnitstring
lines[].grossUnitPricestring
lines[].unitPriceDiscountstring
lines[].netstring
lines[].vatRatestring

Try it

einvoice.parse

$0.02/call

No key needed · 10 free calls per IP per day

Response

Run the request to see the live response here.

Errors

Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.

StatusCode and meaning
400invalid_input

The body does not match the request schema. The message names each field.

400invalid_json

The body is missing or is not valid JSON.

400invalid_idempotency_key

Idempotency-Key must be 1–128 visible ASCII characters.

401invalid_api_key

The Bearer key is missing, malformed, invalid or inactive.

402free_allowance_exhausted

This 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.

404not_found

No operation at this path.

409idempotency_conflict

The Idempotency-Key was already used with a different body.

413payload_too_large

JSON bodies may be at most 64 KiB.

429trial_limit

The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.

500internal_error

The 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": {
    "format": {
      "type": "string",
      "enum": [
        "ubl",
        "cii"
      ]
    },
    "container": {
      "type": "string",
      "enum": [
        "xml",
        "pdf"
      ]
    },
    "profile": {
      "type": "string"
    },
    "reference": {
      "type": "string"
    },
    "invoiceNumber": {
      "type": "string"
    },
    "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])))$"
    },
    "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])))$"
    },
    "currency": {
      "type": "string"
    },
    "seller": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "vatId": {
          "type": "string"
        },
        "electronicAddress": {
          "type": "string"
        },
        "electronicAddressScheme": {
          "type": "string"
        },
        "email": {
          "description": "Contact email address.",
          "type": "string"
        },
        "address": {
          "type": "object",
          "properties": {
            "street": {
              "type": "string"
            },
            "city": {
              "type": "string"
            },
            "postalCode": {
              "type": "string"
            },
            "country": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "taxRegistrationId": {
          "type": "string"
        }
      },
      "required": [
        "address"
      ],
      "additionalProperties": false
    },
    "buyer": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "vatId": {
          "type": "string"
        },
        "electronicAddress": {
          "type": "string"
        },
        "electronicAddressScheme": {
          "type": "string"
        },
        "email": {
          "description": "Contact email address.",
          "type": "string"
        },
        "address": {
          "type": "object",
          "properties": {
            "street": {
              "type": "string"
            },
            "city": {
              "type": "string"
            },
            "postalCode": {
              "type": "string"
            },
            "country": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "address"
      ],
      "additionalProperties": false
    },
    "totals": {
      "type": "object",
      "properties": {
        "net": {
          "type": "string"
        },
        "tax": {
          "type": "string"
        },
        "gross": {
          "type": "string"
        },
        "payable": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "unitPrice": {
            "type": "string"
          },
          "baseQuantity": {
            "type": "string"
          },
          "baseQuantityUnit": {
            "type": "string"
          },
          "grossUnitPrice": {
            "type": "string"
          },
          "unitPriceDiscount": {
            "type": "string"
          },
          "net": {
            "type": "string"
          },
          "vatRate": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "required": [
    "format",
    "container",
    "seller",
    "buyer",
    "totals",
    "lines"
  ],
  "additionalProperties": false
}