Keep the invoice you already make in Word or your accounting program. Send the PDF (or the Word file) plus the invoice data; you get back the same document as a ZUGFeRD PDF/A-3 with factur-x.xml, checked with the official KoSIT validator before it leaves the server.
export KEY=bigapi_… # your key, once per terminal
curl -X POST https://api.bigapi.dev/v1/einvoice/create -H "Authorization: Bearer $KEY" -F 'file=@rechnung.pdf' -F 'format=zugferd' -F 'invoice={"number":"RE-2026-0042","issue_date":"2026-10-17","seller":{"name":"Muster GmbH","street":"Hafenstrasse 5","zip":"20459","city":"Hamburg","vat_id":"DE136695976"},"buyer":{"name":"Kunde AG","street":"Ring 1","zip":"10115","city":"Berlin"},"lines":[{"name":"Beratung","quantity":2,"unit":"hour","price":95}]}' -o rechnung-zugferd.pdf
New keys come with 100 free operations, no signup: curl -X POST https://api.bigapi.dev/v1/keys. Failed calls cost nothing.
| Name | Meaning |
|---|---|
file required | Your invoice as PDF. Word files (DOCX, DOC, ODT, RTF) are accepted too and turned into PDF first. It stays the visible document. |
format required | Must be zugferd. Only ZUGFeRD carries a visible PDF; XRechnung is pure XML. Allowed: zugferd |
invoice required | The invoice data as a JSON string: number, issue_date, seller, buyer, lines and the optional fields described in the guide “Create an e-invoice” (bigapi.dev/guides/einvoice-create.html). Totals and VAT are calculated from the lines. |
lang | Language of the document title stored in the PDF (de or en). Default: "de" |
Returns application/pdf (ZUGFeRD PDF/A-3b with factur-x.xml). Response headers carry the cost (X-BigAPI-Cost) and notes about your input (X-BigAPI-Warnings).
400 pdf_needs_zugferd | format was not zugferd. Send format=zugferd together with file. |
400 invalid_invoice_data | A field in invoice is missing or wrong; field names the place (e.g. seller.vat_id). Details are German, the code is stable. |
422 already_einvoice | The PDF already contains an e-invoice. Send the PDF without embedded invoice data. |
422 encrypted_pdf | The PDF has a password. Remove it first (/v1/pdf/unlock). |
422 invoice_invalid | The invoice data does not pass the official check; the rule codes are in detail. Not charged. |
Connect BiGapi as an MCP server: https://api.bigapi.dev/mcp (hosted) or npx -y @bigapi/mcp (local). Then ask in plain words; the agent finds einvoice_create on its own.
Here is my invoice RE-2026-0042 as PDF. Make it a ZUGFeRD e-invoice: seller Muster GmbH, buyer Kunde AG, two hours of consulting at 95 euros.