API documentation

POST /v1/convert

Creates a validated ZUGFeRD/Factur-X invoice (PDF/A-3, EN 16931) from invoice data (JSON or CII XML) and an optional visual PDF. multipart/form-data with these fields:

FieldTypeDescription
invoiceJSONInvoice data in the eunormia schema (form field or file). Required unless you use XML passthrough.
xmlfile/textReady-made CII XML (passthrough): embedded 1:1, checked by the gate. A pdf is then required.
pdffileYour visual PDF (max. 10 MB). Without a PDF, eunormia renders a default template from the invoice data.
optionsJSONSee below.

Options

OptionDescription
profileEN16931 (default), EXTENDED, XRECHNUNG, BASIC, BASICWL, MINIMUM. Note: MINIMUM/BASICWL do not qualify as e-invoices under German VAT law.
includeUblAdditionally return XRechnung UBL 2.1 XML (ubl), experimental.
kositAdditionally validate with the official KoSIT validator (XRechnung/DE). Result under report.kosit — informational, does not block delivery. Slightly slower.
frCtcAdditionally check the French CTC rules (FNFE-MPE). Result under report.frCtc.
sandboxDeliberately create a watermarked sample (does not consume quota).

Response

200: {"pdf": "<base64>", "filename": "…", "report": {…}, "ubl": "…"?}. The report includes verapdf and xml (always PASS — otherwise nothing would be delivered), watermark, sha256 and, if requested, kosit/frCtc. Business errors return 422 with error, stage and human-readable details — totals mismatches are never silently corrected.

Quickstarts

cURL — JSON → ZUGFeRD

curl -X POST https://eunormia.com/v1/convert \
  -H "Authorization: Bearer eun_live_YOUR_TOKEN" \
  -F 'invoice={"number":"RE-2026-0042","issueDate":"2026-07-08","dueDate":"2026-08-07","currency":"EUR","seller":{"name":"Muster GmbH","street":"Musterstraße 1","zip":"4020","city":"Linz","country":"AT","vatId":"ATU12345678"},"buyer":{"name":"Beispiel GmbH","street":"Beispielweg 2","zip":"80331","city":"München","country":"DE","vatId":"DE123456789"},"items":[{"name":"Leistung","quantity":1,"unit":"C62","unitPrice":100.0,"vatPercent":20}]}'

cURL — JSON + PDF → ZUGFeRD

curl -X POST https://eunormia.com/v1/convert \
  -H "Authorization: Bearer eun_live_YOUR_TOKEN" \
  -F 'invoice=@rechnung.json;type=application/json' \
  -F 'pdf=@rechnung.pdf;type=application/pdf'

cURL — XML-Passthrough

curl -X POST https://eunormia.com/v1/convert \
  -H "Authorization: Bearer eun_live_YOUR_TOKEN" \
  -F 'xml=@factur-x.xml;type=application/xml' \
  -F 'pdf=@rechnung.pdf;type=application/pdf'

cURL — XRechnung + KoSIT

curl -X POST https://eunormia.com/v1/convert \
  -H "Authorization: Bearer eun_live_YOUR_TOKEN" \
  -F 'invoice=@rechnung.json;type=application/json' \
  -F 'options={"profile":"XRECHNUNG","kosit":true}'

Python (requests)

import requests, json, base64

invoice = {
  "number": "RE-2026-0042", "issueDate": "2026-07-08", "dueDate": "2026-08-07",
  "currency": "EUR",
  "seller": {"name": "Muster GmbH", "street": "Musterstraße 1", "zip": "4020",
             "city": "Linz", "country": "AT", "vatId": "ATU12345678"},
  "buyer":  {"name": "Beispiel GmbH", "street": "Beispielweg 2", "zip": "80331",
             "city": "München", "country": "DE", "vatId": "DE123456789"},
  "items": [{"name": "Leistung", "quantity": 1, "unit": "C62",
             "unitPrice": 100.0, "vatPercent": 20}]
}
r = requests.post("https://eunormia.com/v1/convert",
    headers={"Authorization": "Bearer eun_live_YOUR_TOKEN"},
    files={"invoice": (None, json.dumps(invoice))})
r.raise_for_status()
data = r.json()
open(data["filename"], "wb").write(base64.b64decode(data["pdf"]))
print("Gate:", data["report"]["verapdf"]["result"], data["report"]["xml"]["result"])

PHP (cURL)

<?php
$invoice = json_encode([
  "number" => "RE-2026-0042", "issueDate" => "2026-07-08", "dueDate" => "2026-08-07",
  "currency" => "EUR",
  "seller" => ["name"=>"Muster GmbH","street"=>"Musterstraße 1","zip"=>"4020",
               "city"=>"Linz","country"=>"AT","vatId"=>"ATU12345678"],
  "buyer"  => ["name"=>"Beispiel GmbH","street"=>"Beispielweg 2","zip"=>"80331",
               "city"=>"München","country"=>"DE","vatId"=>"DE123456789"],
  "items"  => [["name"=>"Leistung","quantity"=>1,"unit"=>"C62",
                "unitPrice"=>100.0,"vatPercent"=>20]]
]);
$ch = curl_init("https://eunormia.com/v1/convert");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["Authorization: Bearer eun_live_YOUR_TOKEN"],
  CURLOPT_POSTFIELDS => ["invoice" => $invoice],
]);
$resp = json_decode(curl_exec($ch), true);
file_put_contents($resp["filename"], base64_decode($resp["pdf"]));

C# (HttpClient)

using System.Net.Http;
using System.Text.Json;

var invoice = File.ReadAllText("rechnung.json");
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer eun_live_YOUR_TOKEN");
var form = new MultipartFormDataContent { { new StringContent(invoice), "invoice" } };
var resp = await client.PostAsync("https://eunormia.com/v1/convert", form);
var doc = JsonDocument.Parse(await resp.Content.ReadAsStringAsync());
var pdf = Convert.FromBase64String(doc.RootElement.GetProperty("pdf").GetString());
File.WriteAllBytes(doc.RootElement.GetProperty("filename").GetString(), pdf);

Node.js (fetch)

import { readFileSync, writeFileSync } from "node:fs";

const form = new FormData();
form.append("invoice", readFileSync("rechnung.json", "utf8"));
const r = await fetch("https://eunormia.com/v1/convert", {
  method: "POST",
  headers: { Authorization: "Bearer eun_live_YOUR_TOKEN" },
  body: form
});
const data = await r.json();
writeFileSync(data.filename, Buffer.from(data.pdf, "base64"));