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