For developers

The ZUGFeRD API and MCP for AI agentic workflows

The browser tools are built for hands; the API behind them is built for code. Create, validate and convert e-invoices with one HTTPS call, from any language.

Every tool on this site runs on the InvoiceXML ZUGFeRD API: the forms collect the input, the API produces and checks the files. For occasional invoices the forms are the right interface, and there is no reason to write code. The moment invoices come out of your own software, on a schedule, or through a CI pipeline, the form becomes a detour, and the same engine is one HTTPS call away.

Create a ZUGFeRD invoice programmatically

One POST with the invoice as structured JSON returns the finished hybrid PDF/A-3. The model follows EN 16931 field by field; the default profile is EN 16931, and declaring an official profile URN selects another, including XRechnung for public-sector buyers. The create/zugferd reference documents the full invoice model.

create-invoice.sh HTTP API
# Create a compliant invoice in one call
curl -X POST https://api.invoicexml.com/v1/create/zugferd \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "invoice": {
      "invoiceNumber": "INV-2026-001",
      "issueDate": "2026-10-01",
      "currency": "EUR",
      "seller": {
        "name": "Acme GmbH",
        "vatIdentifier": "DE123456789",
        "postalAddress": {
          "line1": "Hauptstrasse 1",
          "city": "Berlin",
          "postCode": "10115",
          "country": "DE"
        }
      },
      "buyer": {
        "name": "Beispiel AG",
        "postalAddress": {
          "line1": "Marktplatz 5",
          "city": "Hamburg",
          "postCode": "20095",
          "country": "DE"
        }
      },
      "lines": [
        {
          "item": { "name": "Consulting" },
          "quantity": 1,
          "priceDetails": { "netPrice": 1000 },
          "vatInformation": { "categoryCode": "S", "rate": 19 }
        }
      ]
    }
  }'

# 200 OK · application/pdf

Validate a file from your pipeline

The validation endpoint takes the file as a multipart upload and answers with a JSON report: the verdict, the detected profile, and every violated rule by its code. Each endpoint has a /report sibling that runs the same checks and answers with a printable PDF report instead, carrying the verdict in the X-Invoice-Valid response header. The validate/zugferd reference shows full request and response examples.

validate-invoice.sh HTTP API
# Check invoice compliance in one call
curl -X POST https://api.invoicexml.com/v1/validate/zugferd \
  -H "Authorization: Bearer sk_live_..." \
  -F "[email protected]"

# { "valid": true, "data": { "profile": "en16931" }, "errors": [] }

That curl script is also the honest answer to the search for a ZUGFeRD CLI: there is no official command-line tool, and none is needed. Three lines in a shell script validate every file in a folder, gate a nightly export, or fail a CI build on the first broken invoice.

From C#, .NET or any other language

The API speaks plain HTTPS with JSON and multipart bodies, so every language's standard library is enough. In C# and .NET, the call is a few lines of HttpClient, no SDK or NuGet dependency involved:

ValidateInvoice.cs C# / .NET
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new("Bearer", apiKey);

using var form = new MultipartFormDataContent();
form.Add(new StreamContent(File.OpenRead("rechnung.pdf")), "file", "rechnung.pdf");

var response = await http.PostAsync("https://api.invoicexml.com/v1/validate/zugferd", form);
var report = await response.Content.ReadAsStringAsync();

What the API covers

  • Create: ZUGFeRD and Factur-X hybrid PDFs, XRechnung in CII or UBL syntax, credit notes and Order-X purchase orders, all from the same JSON model.
  • Validate: EN 16931, the German XRechnung CIUS and the profile the file declares, as JSON or as a printable PDF report.
  • Convert: between CII, UBL, XRechnung and Factur-X, in both directions.
  • Extract and embed: read the XML out of a hybrid PDF, or package your own CII XML into a conformant PDF/A-3.
  • Render: turn e-invoice XML into a clean, human-readable PDF.

Authentication is a Bearer API key, billing is usage-based, and the full reference with request and response schemas lives on the InvoiceXML site: Read the API documentation

When to stay in the browser

An API earns its keep at routine volume, not before. A handful of invoices a month is form territory, and validating the occasional incoming file needs no pipeline. The working rule: recurrence, invoices born in your own system, or compliance gates in CI justify code; everything below that is faster by hand. The software guide compares all four routes.

Use it from Claude, ChatGPT and other AI agents

The InvoiceXML MCP server brings the same engine to AI assistants through the Model Context Protocol. Connect it to Claude, ChatGPT or any other MCP client, and the assistant can create, validate, convert and read ZUGFeRD and XRechnung invoices as part of a larger task, with no integration code of your own.

That makes the invoice one step of an agentic workflow: draft an invoice from an email or an order, check an incoming supplier file and summarise what is wrong with it, or convert a batch before it goes into your accounting system. Set up the InvoiceXML MCP server


Related reading

Frequently Asked Questions

Common questions from developers.

No. FeRD publishes the specification, not tooling. Searches for a ZUGFeRD CLI end at libraries to build on or at HTTP APIs, and in practice a three-line curl script against the API is the command-line tool: it validates or creates a file from any shell, cron job or CI pipeline.
Any language that can send HTTPS: the API takes JSON and multipart uploads and answers with JSON or the finished file. From C# and .NET, HttpClient from the base library is enough, as the sample on this page shows; the same goes for Java, Python, PHP or JavaScript. No SDK dependency is required.
Yes. Every file the tools on this site create, validate, convert or read goes through the InvoiceXML API. Moving from the forms to the API changes the interface, not the rules or the output files.
No. The law prescribes the result, EN 16931 conformant invoices, not the tooling. Receiving has been mandatory since 1 January 2025; issuing follows on 1 January 2027 above EUR 800,000 turnover and on 1 January 2028 for everyone else, with Kleinunternehmer exempt from issuing. The forms cover low volume; the API pays off when invoices come from your own software.
Yes. Beyond creating and validating, the API converts between the syntaxes and formats (CII, UBL, XRechnung, Factur-X/ZUGFeRD), extracts the embedded XML from hybrid PDFs, embeds XML into PDF/A-3, and renders e-invoice XML as a readable PDF.
Built for the German mandate

One toolkit for ZUGFeRD and XRechnung

Every German business has had to accept e-invoices since January 2025. Both formats are covered here.

ZUGFeRD or XRechnung? Let the assistant pick the tool Tell the chat what you need: it converts, checks, builds, and reads out German e-invoices. Open assistant

Create

Fill one form, get a ZUGFeRD PDF or an XRechnung with Leitweg-ID

Check & repair

Test against EN 16931 and the XRechnung CIUS, then fix what a buyer rejected

Convert

Move an invoice between PDF, CII, UBL and XRechnung

Open & extract

Open a file, see what is inside it, and take the data with you

Look up & automate

Check who you are invoicing, or move the whole flow to an API
Ready for mandatory e-invoicing?

Make every invoice compliant, in a single message

Subscribe to get unlimited tools, choosable compliance profiles and the full set of premium features.

EN 16931 & PDF/A-3b compliant Results in seconds No installation GoBD-compliant archive
1 free tool use per hour · No card required