Skip to content
dignum eBilling

REST API · CLI · On-premise

For developers and IT

The same engine as in the browser, as a stateless REST API, as a command line with a hot folder and as a Docker image for your own infrastructure. Documents are checked with the official validators and nothing is stored.

01Overview

One API, nothing stored

The API validates, creates and converts e-invoices (XRechnung and ZUGFeRD / Factur-X). Every request is self-contained: no account, no session, no storage.

  • Stateless and minimal

    Invoice contents and file names are neither stored nor logged. A request can be repeated as often as you like.

  • Official validators

    The verdict comes from the KoSIT validator with the XRechnung configuration and from Mustang with veraPDF for hybrid PDFs. The response names the versions used.

  • One engine everywhere

    Browser, API, command line and hot folder call the same TypeScript core. What you see in the browser is what the API returns.

  • In your own house, too

    One Docker image contains the application, the API and the validators and needs no internet access at runtime.

Base URL
https://distrinode.de/ebilling/api/v1
Authentication
None on the public instance. Optionally Authorization: Bearer when you run it yourself with a key list.
Formats
XML (UBL, CII, XRechnung), PDF (ZUGFeRD / Factur-X), JSON. Responses as JSON, XML, PDF or HTML.
Errors
Always application/problem+json per RFC 9457 with a stable code.
Validate an invoiceShell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/validate" \  -H "Content-Type: application/xml" \  --data-binary @rechnung.xml | jq '.valid, .counts'

Privacy in practice

The server keeps a document in memory only for the duration of the request. There are no analytics services and no requests to third parties. Note: a request to the public instance sends the document to our server. If that is not acceptable, run the image yourself or use the browser tools, which work locally.

The machine-readable description is available as an OpenAPI 3.1 document.

02Quick start

A few lines to the first response

Pick an operation and your language. The examples run against the public instance; when you host it yourself, only the base URL changes.

Sends an XML e-invoice and receives the validation report as JSON.

shellShell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/validate" \  -H "Content-Type: application/xml" \  --data-binary @rechnung.xml

HTTP 200 does not mean valid

A validation that ran always answers 200. Whether the invoice is valid is in the valid field. If you want an error status, set fail=true: the API then answers 422 for an invalid invoice.

Reading errors

For status 400 and above the body is a problem object. Branch on code, not on title or detail: those texts are meant for people.

On the public instance, requests that use the default user agent of Python urllib are rejected. curl, Node.js, requests, PHP, .NET and Java work.

03API reference

Every endpoint, fully described

Base URL, parameters, request and response formats, examples, error model and limits. The reference follows the API's OpenAPI document.

Verdict in the body

A validation that ran always returns 200 with a report. Status codes from 400 mean that the request itself could not be processed.

Raw or multipart

Send a single document directly as the body (application/xml, application/pdf) and structured data as application/json. /convert takes multipart/form-data only. Unknown JSON members, parameters and multipart parts are rejected so that typos cannot slip through. curl -d sends a form; use --data-binary and a Content-Type.

Representation by Accept

Reports come as JSON (default), HTML or PDF, chosen with Accept or format. Artifacts come as a JSON envelope with Base64 files or directly as XML or PDF.

Target format

Depending on the endpoint the target format is an object of syntax (cii or ubl) and profile: as target in the body for create, as options.xmlTarget for convert, and through to and profile for transform. Invalid combinations return unsupported_target.

Our own output is checked

create, convert and transform check their result with the same rules as validate. If there are errors, no file is returned (422). With allowInvalid=true you get the file and the report for debugging.

Correlation

Optionally send X-Request-Id. The API returns it and names it as trace_id in errors. It never contains content from your document.

POST

/validate

Limit: heavy

Validates an XML e-invoice or a hybrid PDF.

Detects the format automatically, applies the built-in rules and asks the official validators. The response is a ValidationReport with valid, checks, findings and the engine versions, as JSON or as a self-contained HTML page. XML that is not well-formed is a failed check, not an HTTP error. There is no PDF report in v1.

Parameters

NameInDescription
levelqueryDepth of validation: built-in rules only, official validators only, or both.builtin · official · both – default both
langqueryLanguage of HTML and PDF reports. JSON always contains German and English.de · en – default de
formatqueryRepresentation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · html
failqueryAnswer a negative verdict with 422 and the code invalid_document.default false
profilequeryThe document must conform to this profile; a mismatch is reported as a finding, not as an HTTP error.minimum · basicwl · basic · en16931 · extended · xrechnung · peppol-bis-3
X-Request-IdheaderYour own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.

Request body

  • application/xmldocument directly as the body
  • text/xmldocument directly as the body
  • application/pdfdocument directly as the body
  • multipart/form-dataseveral parts or a form, files as parts

Responses

StatusMedia typeMeaning
200application/json · text/htmlProcessed successfully. For validations, read the report.
400application/problem+jsonMalformed request: syntax, unknown member or invalid parameter.
401application/problem+jsonKey missing or wrong (only when you run it yourself with a key list).
405application/problem+jsonHTTP method not allowed; the Allow header lists the permitted ones.
406application/problem+jsonNo representation matches Accept or format.
413application/problem+jsonRequest or document too large.
415application/problem+jsonThe media type is not supported by the endpoint.
422application/problem+jsonRequest understood but cannot be processed (see code).
429application/problem+jsonToo many requests, honour Retry-After.
500application/problem+jsonInternal error, quote the trace_id.
503application/problem+jsonOfficial validator unavailable or queue full.
504application/problem+jsonThe validator or Ghostscript exceeded its time limit.

Example request

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/validate" \  -H "Content-Type: application/xml" \  --data-binary @rechnung.xml

Example response (status 200)

JSON
{  "valid": false,  "format": {    "container": "xml",    "syntax": "cii",    "documentType": "invoice",    "profile": "xrechnung",    "family": "xrechnung",    "legalEInvoiceDE": true  },  "checks": [    { "id": "wellformed", "status": "passed" },    { "id": "xsd", "status": "passed" },    { "id": "en16931", "status": "passed" },    { "id": "cius", "status": "failed" }  ],  "findings": [    {      "ruleId": "BR-DE-15",      "severity": "error",      "message": {        "de": "Für eine XRechnung ist Pflicht: „Leitweg-ID / Käuferreferenz“.",        "en": "Mandatory in an XRechnung: \"Buyer reference (Leitweg-ID)\"."      },      "terms": ["BT-10"],      "source": "xrechnung",      "engine": "kosit"    }  ],  "counts": { "fatal": 0, "error": 1, "warning": 0, "info": 2 },  "engines": { "kosit": "1.6.3", "xrechnung-config": "3.0.2_2026-08-31" }}
POST

/convert

Limit: heavy

From PDF invoice to e-invoice: XRechnung XML and a ZUGFeRD PDF in one call.

Multipart with the original pdf and the confirmed data as invoice (or as xml). Without data the API reads the PDF itself and only continues if the confidence reaches minScore; otherwise it answers needs_review with the extraction result. The original PDF is upgraded to PDF/A-3 and the XML is embedded; with options.repair the server may use Ghostscript for that.

Parameters

NameInDescription
verifyqueryHow the result is checked before it is returned.none · builtin · official – default official
allowInvalidqueryReturn the result even with errors, together with the report (for debugging).default false
formatqueryRepresentation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · xml · pdf
X-Request-IdheaderYour own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.

Request body

  • multipart/form-dataseveral parts or a form, files as parts

Responses

StatusMedia typeMeaning
200application/json · application/xml · application/pdfProcessed successfully. For validations, read the report.
400application/problem+jsonMalformed request: syntax, unknown member or invalid parameter.
401application/problem+jsonKey missing or wrong (only when you run it yourself with a key list).
405application/problem+jsonHTTP method not allowed; the Allow header lists the permitted ones.
406application/problem+jsonNo representation matches Accept or format.
413application/problem+jsonRequest or document too large.
415application/problem+jsonThe media type is not supported by the endpoint.
422application/problem+jsonRequest understood but cannot be processed (see code).
429application/problem+jsonToo many requests, honour Retry-After.
500application/problem+jsonInternal error, quote the trace_id.
503application/problem+jsonOfficial validator unavailable or queue full.
504application/problem+jsonThe validator or Ghostscript exceeded its time limit.

Example request

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/convert" \  -F "pdf=@rechnung.pdf;type=application/pdf" \  -F "invoice=@invoice.json;type=application/json" \  -F 'options={"hybridProfile":"en16931","xmlTarget":{"syntax":"ubl","profile":"xrechnung"}};type=application/json' \  | jq '.valid, .officialChecked, (.files[] | [.name, .role, .sizeBytes])'

Example response (status 200)

JSON
{  "valid": true,  "officialChecked": true,  "files": [    {      "name": "RE-2026-0001.xml",      "role": "xml",      "mediaType": "application/xml",      "sizeBytes": 4127,      "sha256": "…",      "dataBase64": "…",      "report": { "valid": true }    },    {      "name": "RE-2026-0001.zugferd.pdf",      "role": "hybrid-pdf",      "mediaType": "application/pdf",      "sizeBytes": 48949,      "sha256": "…",      "dataBase64": "…",      "report": { "valid": true }    }  ],  "invoice": { "number": "RE-2026-0001" },  "findings": []}
POST

/create

Limit: built-in

Creates an e-invoice from structured invoice data, optionally with a PDF.

The server computes amounts, the VAT breakdown and totals according to EN 16931. With options.pdf.mode a visual or a hybrid PDF is added. The computed invoice is returned in the JSON envelope so that you can see what was added.

Parameters

NameInDescription
verifyqueryHow the result is checked before it is returned.none · builtin · official – default official
allowInvalidqueryReturn the result even with errors, together with the report (for debugging).default false
langqueryLanguage of HTML and PDF reports. JSON always contains German and English.de · en – default de
formatqueryRepresentation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · xml · pdf
X-Request-IdheaderYour own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.

Request body

  • application/jsonJSON document

Responses

StatusMedia typeMeaning
200application/json · application/xml · application/pdfProcessed successfully. For validations, read the report.
400application/problem+jsonMalformed request: syntax, unknown member or invalid parameter.
401application/problem+jsonKey missing or wrong (only when you run it yourself with a key list).
405application/problem+jsonHTTP method not allowed; the Allow header lists the permitted ones.
406application/problem+jsonNo representation matches Accept or format.
413application/problem+jsonRequest or document too large.
415application/problem+jsonThe media type is not supported by the endpoint.
422application/problem+jsonRequest understood but cannot be processed (see code).
429application/problem+jsonToo many requests, honour Retry-After.
500application/problem+jsonInternal error, quote the trace_id.
503application/problem+jsonOfficial validator unavailable or queue full.
504application/problem+jsonThe validator or Ghostscript exceeded its time limit.

Example request

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/create" \  -H "Content-Type: application/json" \  -H "Accept: application/xml" \  --data-binary @create-request.json \  -o rechnung.xml
POST

/extract

Limit: heavy

Reads invoice data from a PDF.

If the PDF already contains an embedded e-invoice, its XML is read. Otherwise the API analyses the layout and returns a draft with evidence boxes and a confidence from 0 to 1: a proposal for review, never a finished invoice. The web interface reads PDFs in the browser; this endpoint is meant for API clients, the CLI and the hot folder.

Parameters

NameInDescription
langqueryLanguage of HTML and PDF reports. JSON always contains German and English.de · en – default de
X-Request-IdheaderYour own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.

Request body

  • application/pdfdocument directly as the body
  • multipart/form-dataseveral parts or a form, files as parts

Responses

StatusMedia typeMeaning
200application/jsonProcessed successfully. For validations, read the report.
400application/problem+jsonMalformed request: syntax, unknown member or invalid parameter.
401application/problem+jsonKey missing or wrong (only when you run it yourself with a key list).
405application/problem+jsonHTTP method not allowed; the Allow header lists the permitted ones.
406application/problem+jsonNo representation matches Accept or format.
413application/problem+jsonRequest or document too large.
415application/problem+jsonThe media type is not supported by the endpoint.
422application/problem+jsonRequest understood but cannot be processed (see code).
429application/problem+jsonToo many requests, honour Retry-After.
500application/problem+jsonInternal error, quote the trace_id.
503application/problem+jsonOfficial validator unavailable or queue full.
504application/problem+jsonThe validator or Ghostscript exceeded its time limit.

Example request

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/extract" \  -H "Content-Type: application/pdf" \  --data-binary @rechnung.pdf | jq '.score, .draft.number'
POST

/transform

Limit: built-in

Converts an XML e-invoice: UBL ⇄ CII and profile change.

The result is checked like the output of the other endpoints. If the profile does not exist in the target syntax, the API falls back to EN 16931 and says so as a notice. Whatever the target syntax cannot carry is reported and never invented.

Parameters

NameInDescription
toqueryTarget syntax: ubl or cii. Default is the opposite syntax.ubl · cii
profilequeryTarget profile of the conversion, for example xrechnung or en16931.minimum · basicwl · basic · en16931 · extended · xrechnung · peppol-bis-3
verifyqueryHow the result is checked before it is returned.none · builtin · official – default official
allowInvalidqueryReturn the result even with errors, together with the report (for debugging).default false
formatqueryRepresentation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · xml
X-Request-IdheaderYour own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.

Request body

  • application/xmldocument directly as the body
  • text/xmldocument directly as the body
  • multipart/form-dataseveral parts or a form, files as parts

Responses

StatusMedia typeMeaning
200application/json · application/xml · application/pdfProcessed successfully. For validations, read the report.
400application/problem+jsonMalformed request: syntax, unknown member or invalid parameter.
401application/problem+jsonKey missing or wrong (only when you run it yourself with a key list).
405application/problem+jsonHTTP method not allowed; the Allow header lists the permitted ones.
406application/problem+jsonNo representation matches Accept or format.
413application/problem+jsonRequest or document too large.
415application/problem+jsonThe media type is not supported by the endpoint.
422application/problem+jsonRequest understood but cannot be processed (see code).
429application/problem+jsonToo many requests, honour Retry-After.
500application/problem+jsonInternal error, quote the trace_id.
503application/problem+jsonOfficial validator unavailable or queue full.
504application/problem+jsonThe validator or Ghostscript exceeded its time limit.

Example request

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/transform?to=ubl" \  -H "Content-Type: application/xml" \  -H "Accept: application/xml" \  --data-binary @rechnung-cii.xml \  -o rechnung-ubl.xml
POST

/render

Limit: built-in

Produces a PDF or HTML view of an invoice.

The view is for reading and is not a valid e-invoice; the response therefore always carries the header Ebilling-Not-An-E-Invoice.

Parameters

NameInDescription
langqueryLanguage of HTML and PDF reports. JSON always contains German and English.de · en – default de
formatqueryRepresentation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.pdf · html
X-Request-IdheaderYour own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.

Request body

  • application/jsonJSON document
  • application/xmldocument directly as the body
  • text/xmldocument directly as the body

Responses

StatusMedia typeMeaning
200application/pdf · text/htmlProcessed successfully. For validations, read the report.
400application/problem+jsonMalformed request: syntax, unknown member or invalid parameter.
401application/problem+jsonKey missing or wrong (only when you run it yourself with a key list).
405application/problem+jsonHTTP method not allowed; the Allow header lists the permitted ones.
406application/problem+jsonNo representation matches Accept or format.
413application/problem+jsonRequest or document too large.
415application/problem+jsonThe media type is not supported by the endpoint.
422application/problem+jsonRequest understood but cannot be processed (see code).
429application/problem+jsonToo many requests, honour Retry-After.
500application/problem+jsonInternal error, quote the trace_id.
503application/problem+jsonOfficial validator unavailable or queue full.
504application/problem+jsonThe validator or Ghostscript exceeded its time limit.

Example request

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/render" \  -H "Content-Type: application/xml" \  -H "Accept: application/pdf" \  --data-binary @rechnung.xml \  -o ansicht.pdf
GET

/health

Limit: light

Liveness and engine versions.

Very cheap, without authentication and without a rate limit. With deep=true a self-test runs through the official validators (cached for 60 seconds); not meant for container probes.

Parameters

NameInDescription
deepqueryRun a self-test through KoSIT and Mustang.default false

Responses

StatusMedia typeMeaning
200application/jsonProcessed successfully. For validations, read the report.
503application/jsonOfficial validator unavailable or queue full.

Example request

Shell
curl -sS "https://distrinode.de/ebilling/api/v1/health"

Example response (status 200)

JSON
{  "status": "ok",  "version": "0.1.0",  "apiVersion": "1.0.0",  "uptimeSeconds": 86412,  "engines": { "kosit": "1.6.3", "xrechnung-config": "3.0.2_2026-08-31", "mustang": "2.26.0", "java": "21.0.13.1" },  "available": { "java": true, "kosit": true, "xrechnung-config": true, "mustang": true, "ghostscript": true },  "validators": "up"}
GET

/openapi.json

Limit: light

The contract of this API as an OpenAPI 3.1 document.

For generating clients and for importing into tools such as Postman or Insomnia.

Responses

StatusMedia typeMeaning
200application/jsonProcessed successfully. For validations, read the report.

Example request

Shell
curl -sS "https://distrinode.de/ebilling/api/v1/openapi.json" -o openapi.json

Error model

Every error is an application/problem+json object per RFC 9457, regardless of Accept. The detail text never repeats content from your document.

Members

  • type
  • title
  • status
  • detail
  • instance
  • code
  • trace_id
  • findings
  • counts
  • report
  • extraction
  • retryAfterSeconds

Clients must ignore unknown members. findings holds the same findings as a validation report; for request errors the rule id is EBL-REQ-….

StatuscodeMeaning
400invalid_requestMalformed JSON or multipart, unknown member, invalid parameter, missing part.
401unauthorizedKey required or invalid (only when you run it yourself with a key list).
404not_foundUnknown path.
405method_not_allowedHTTP method not allowed; the Allow header lists the permitted ones.
406not_acceptableNo representation matches Accept or format; detail lists the available ones.
413payload_too_largeRequest or part above the limit.
415unsupported_media_typeThe declared Content-Type does not fit the endpoint.
422unsupported_formatThe document is neither XML nor PDF (or the wrong kind for the endpoint).
422unreadable_pdfPDF corrupt or encrypted.
422unreadable_xmlXML unreadable or with a disallowed DOCTYPE declaration.
422unsupported_targetThat combination of syntax and profile does not exist, for example ubl:minimum.
422invalid_documentValidation found errors. The report is in the report member.
422needs_reviewThe extraction is not confident enough; extraction holds the result for review.
422no_embedded_xmlThe PDF contains no embedded e-invoice.
422pdfa_repair_requiredPDF/A problems block embedding; try again with repair=true.
429rate_limitedLimit reached; Retry-After gives the wait time.
500internal_errorInternal error. Quote the trace_id; a stack trace is never returned.
503engine_unavailableOfficial validator missing or queue full.
504engine_timeoutValidator or Ghostscript timed out.
application/problem+jsonText
HTTP/1.1 422 Unprocessable ContentContent-Type: application/problem+jsonX-Request-Id: 8c1f0d0e-6b2a-4c53-9a77-1d1d4f0c7a10Cache-Control: no-store​{  "type": "https://distrinode.de/ebilling/problems/invalid_document",  "title": "The document does not pass validation",  "status": 422,  "detail": "1 error and 0 warnings. No file was produced; fix the data and retry, or pass allowInvalid=true.",  "instance": "urn:uuid:8c1f0d0e-6b2a-4c53-9a77-1d1d4f0c7a10",  "code": "invalid_document",  "trace_id": "8c1f0d0e-6b2a-4c53-9a77-1d1d4f0c7a10",  "counts": { "fatal": 0, "error": 1, "warning": 0, "info": 0 },  "findings": [    {      "ruleId": "BR-DE-15",      "severity": "error",      "message": {        "de": "Für eine XRechnung ist Pflicht: „Leitweg-ID / Käuferreferenz“.",        "en": "Mandatory in an XRechnung: \"Buyer reference (Leitweg-ID)\"."      },      "terms": ["BT-10"],      "source": "xrechnung",      "engine": "ebilling"    }  ]}

Limits and headers

The values apply to the public instance and are guidelines that we adjust. Every client has a budget of 60 tokens per minute; a built-in request costs 1 token, a heavy one (official validation, PDF work) costs 3. That makes 60 and 20 requests per minute respectively. When you host it yourself you set the budget; 0 switches the limit off.

Classrequests per minute and clientEndpoints
lightunlimitedhealth, openapi.json
built-in60validate?level=builtin, create, transform, render
heavy20validate, convert, extract
LimitValue
Whole request25 MB
XML part20 MB
PDF in MB · pages25 MB · 200
JSON body (excluding logo)4 MB
Logo (PNG or JPEG)1 MB
Time limit: built-in · official validation · hybrid and transform10 s · 60 s · 90 s

Response headers

  • Ebilling-Valid
  • Ebilling-Findings
  • Ebilling-Official-Checked
  • Ebilling-Version
  • Ebilling-Engines
  • X-Request-Id
  • Retry-After
  • RateLimit-Policy
  • RateLimit

Retry-After (seconds, on 429 and 503) is binding. RateLimit and RateLimit-Policy follow an IETF draft that is not final and may change. Ebilling-Official-Checked: false means the official validators were not involved; read checks in that case.

Versioning: the URL carries the major version (/v1). Within v1 only additive changes are made: new optional members, endpoints and rule ids. Clients must tolerate unknown members and rule ids. The validators' rule sets are released on fixed dates; if you need reproducible results, read the Ebilling-Engines header as well.

04Playground

Try it without writing code

Validate the sample invoice or paste your own XML. The page calls the same endpoint as your client and shows the report and the raw response.

Sample: XRechnung 3.0 in CII format with synthetic data. You can edit the text, for example remove the Leitweg-ID, and run the validation again.

The text is sent to this server's API for validation and is not stored.

Equivalent curl call

Shell
curl -sS -X POST "https://distrinode.de/ebilling/api/v1/validate?level=both" \  -H "Content-Type: application/xml" \  --data-binary @rechnung.xml

The result appears here once you start the validation.

05CLI and hot folder

On the command line and in a folder

The ebilling command uses the same core as the browser and the API. It validates, creates and converts single files, or watches a folder into which your ERP or a scanner drops PDF invoices.

Commands

CallPurpose
ebilling validate <file|dir|-> […]Validates files or folders (XML and hybrid PDFs) and prints a summary per file or a JSON report.
ebilling convert <file> […] [--to ubl|cii|hybrid|xml|auto]Detects the input itself: a PDF without embedded XML becomes XRechnung and ZUGFeRD, an XML file is converted between UBL and CII with to, a hybrid PDF yields its XML.
ebilling create <invoice.json|-> --target <syntax>:<profile>Creates an e-invoice from a JSON file, optionally with a visual or hybrid PDF.
ebilling extract <file.pdf> […]Reads the invoice data of a PDF as a JSON draft with evidence and confidence.
ebilling watch <root>Watches a hot folder and processes every new file.
ebilling doctorShows versions, Java and Ghostscript availability and writable folders, and runs an offline self-test.

Results go to stdout, logs to stderr. With - as input the command reads stdin; with -o - it writes a single result to stdout. Existing files are never overwritten without --force.

Global options

OptionEnvironment variableMeaning
--config <file>EBILLING_CONFIGJSON configuration file. Default: ebilling.config.json in the current folder, then in your user directory.
--company <file>EBILLING_COMPANYCompany profile with your master data (see below).
--engine builtin|official|autoEBILLING_ENGINEbuiltin uses only the built-in rules, official requires the official validators, auto uses them when present.
--validators-dir <dir>EBILLING_VALIDATORS_DIRFolder with the Java runtime, KoSIT and Mustang.
--lang de|enEBILLING_LANGLanguage of messages (default: de).
--json–Machine-readable output, one JSON document per call (one line per file with watch).
-q, --quiet / -v, --verboseEBILLING_LOG_LEVELLess or more log output.
--no-colorNO_COLORTurn colour output off.

Precedence: options over environment variables over the configuration file over defaults. Unknown keys in the configuration file are an error (exit code 2).

ExamplesShell
# Check one file, fail the build on errorsebilling validate rechnung.xml --fail-on error​# Check a folder, one JSON report per fileebilling validate ./eingang --report-dir ./reports --format json​# PDF invoice in, XRechnung XML + ZUGFeRD PDF outebilling convert rechnung.pdf --company ./company.json -o ./out --min-score 0.9​# UBL <-> CIIebilling convert cii.xml --to ubl -o ubl.xml​# Structured data in, XRechnung and hybrid PDF outebilling create invoice.json --target cii:xrechnung --pdf hybrid --template classic -o ./out​# Read the data of a PDF as JSONebilling extract rechnung.pdf -o rechnung.draft.json​# Hot folderebilling watch /data/hot --company /config/company.json --templates-dir /config/templates

Exit codes

CodeMeaning
0Success: all documents valid (warnings allowed, except with --fail-on warning).
1At least one document is invalid; with convert and create no file was written because of the findings.
2Wrong call or configuration: unknown option, invalid configuration, invalid target.
3Human review needed: extraction was not confident enough, the draft was written but no e-invoice.
4Input unusable: file missing, neither XML nor PDF, encrypted, too large or without embedded XML.
5Java, KoSIT, Mustang or Ghostscript unavailable or too slow although --engine official was requested.
10Internal error (a bug). Please report it.

With several inputs the highest code wins; with --json the code per file is part of the result. The watch command exits with 0 after SIGINT or SIGTERM; failures of single files end up in the error folder.

Hot folder

With ebilling watch you drop PDF invoices into one folder and pick up the e-invoices from another. Whatever is recognised with confidence moves to out; everything uncertain waits in review for a person.

Folder structureText
<root>/  in/        drop zone: *.pdf, *.xml, *.draft.json  out/       finished results  review/    needs a person: original PDF + draft + report  error/     could not be processed: original + <stem>.error.json  archive/   optional (--archive): originals after success  .ebilling/ lock file, health file, state (no invoice data)
  • Only *.pdf, *.xml and *.draft.json are picked up. Dotfiles, ~$*, *.tmp, *.part and *.crdownload are ignored.
  • A file counts as finished when its size and modification time stay unchanged for the settle time (--settle) and it can be opened exclusively. On SMB and NFS shares --poll helps.
  • Results are first written as .partial and then renamed atomically. Your ERP can safely read any file without .partial. An input is never deleted before a result exists.
  • The stem is the file name without extension. On a name clash -1, -2 is appended. File names do not appear in the log, only a random work id.

What lands in which folder

Caseout/review/error/
PDF recognised with confidence, validated, company profile applied<stem>.xml · <stem>.zugferd.pdf · <stem>.report.json · <stem>.original.pdf––
PDF recognised but uncertain or with errors–<stem>.pdf · <stem>.draft.json · <stem>.report.json–
Reviewed draft returned (draft and PDF with the same stem in in)<stem>.xml · <stem>.zugferd.pdf · <stem>.report.json––
XML dropped (default: validate only)<stem>.report.json (+ <stem>.<syntax>.xml with --convert-xml)–<stem>.error.json (unreadable)
Hybrid PDF dropped<stem>.report.json––
Unreadable, encrypted, too large, not a PDF or timed out––<stem>.pdf · <stem>.error.json

Review: open the draft.json file in the review folder, correct the values and put draft and PDF back into the in folder together. If the checksum of the draft does not match the PDF, the job ends up in error.

Options of watch

OptionMeaning
--in --out --review --error --archiveRename the folders so that your ERP can attach to them.
--company <file>Company profile with your master data.
--templates-dir <dir>Folder with learned layout templates.
--target <syntax>:<profile>Output format of the XML file, for example cii:xrechnung.
--hybrid-profile <profile>Profile of the ZUGFeRD PDF (default: en16931).
--min-score <0..1>From this confidence on, conversion is automatic. (default 0.9)
--settle <seconds>Seconds to wait until a file counts as finished. (default 2)
--poll <ms>Poll at an interval instead of using file system events (network drives).
--onceProcess the backlog and exit.
--report json|html|bothStore reports as json, html or both. (default json)
--learnStore a layout template after a review.
--delete-inputDelete the input after a successful result.
--repairAllow server-side PDF/A repair.
--health-file <path>File touched every 15 seconds while the loop is alive.

SIGTERM and SIGINT stop intake and the current file is finished. If the grace period runs out, it returns to the in folder.

Company profile (company.json)

Your master data serves as a hint for recognition and as defaults for the output. seller may be incomplete; defaults, output and render are optional.

company.jsonJSON
{  "schemaVersion": 1,  "seller": {    "name": "Muster Software GmbH",    "vatId": "DE123456789",    "taxRegistrationId": "143/123/45678",    "legalRegistrationId": { "value": "HRB 12345" },    "additionalLegalInfo": "Amtsgericht Berlin-Charlottenburg, Geschäftsführerin: Erika Muster",    "electronicAddress": { "value": "buchhaltung@muster.example", "scheme": "EM" },    "address": { "line1": "Musterstraße 1", "postCode": "10115", "city": "Berlin", "countryCode": "DE" },    "contact": { "name": "Erika Muster", "phone": "+49 30 1234567", "email": "buchhaltung@muster.example" }  },  "payment": {    "meansCode": "58",    "creditTransfers": [{ "iban": "DE02120300000000202051", "bic": "BYLADEM1001", "accountName": "Muster Software GmbH" }]  },  "defaults": { "currency": "EUR", "paymentTermsDays": 14, "unitCode": "H87", "vatCategory": "S", "vatRate": "19" },  "output": { "target": { "syntax": "cii", "profile": "xrechnung" }, "hybridProfile": "en16931", "lang": "de" },  "render": { "template": "classic", "logo": "logo.png", "accentColor": "#1F4E79", "girocode": true }}

Contains your bank details

The file is only read, never logged and never copied into reports. Keep it read-only, for example as a read-only volume. The values in the example are invented.

Layout templates

Each invoice layout gets a template with columns and labels but without invoice values, stored as templates/<layoutFingerprint>.json. The next PDF with the same layout uses it automatically. With --learn it is created after a review.

Structure of the report file

The hot folder stores a report with every result. It contains content from your invoice and therefore lives in your folders, not in the log.

<stem>.report.jsonJSON
{  "schemaVersion": 1,  "tool": { "name": "ebilling", "version": "…", "engines": { "kosit": "1.6.3", "mustang": "2.26.0" } },  "input": { "name": "…", "bytes": 48213, "sha256": "…" },  "outcome": "converted",  "outputs": [{ "name": "…xml", "mediaType": "application/xml", "bytes": 5120, "sha256": "…" }],  "report": { "valid": true, "checks": [], "findings": [], "counts": {}, "engines": {} },  "extraction": { "score": 0.97, "layoutFingerprint": "…", "source": "layout" }}

06On-premise

Run it in your own data centre

One Docker image contains the web interface, the API and the official validators. It runs without a database, without a cache that survives restarts and without outbound connections.

Build and start

The image is built from the source code. While building it downloads the pinned versions of the validators and verifies their SHA-256 sums. Afterwards the application is available under /ebilling.

shellShell
# build once from the source tree (downloads the pinned validators, checks their SHA-256)docker build -f docker/Dockerfile -t dignum-ebilling .​# run (open: http://localhost:3000/ebilling)docker run -d -p 127.0.0.1:3000:3000 --name ebilling dignum-ebilling
Hardened start with Docker

Like the compose file: read-only file system, temporary folders in memory, no extra privileges, limited resources.

shellShell
docker run -d --name ebilling --restart unless-stopped \  -p 127.0.0.1:3000:3000 \  --read-only \  --tmpfs /tmp:size=768m,mode=1777 \  --tmpfs /app/apps/web/.next/cache:size=64m,uid=1000,gid=1000 \  --cap-drop ALL --security-opt no-new-privileges:true \  --pids-limit 512 --memory 3g --cpus 3 \  dignum-ebilling

Docker Compose

The supplied file docker/compose.yml binds the port to localhost only. Put a reverse proxy with TLS in front.

docker/compose.ymlYAML
services:  ebilling:    build:      context: ..      dockerfile: docker/Dockerfile    image: dignum-ebilling:latest    container_name: dignum-ebilling    restart: unless-stopped    ports:      - "127.0.0.1:3000:3000"    environment:      # Requests per minute and client for the API (0 disables the limit, e.g. behind your own gateway)      EBILLING_RATE_LIMIT_PER_MINUTE: "60"      # Comma separated API keys. Empty = API usable without a key      EBILLING_API_KEYS: ""      # Maximum upload size in megabytes      EBILLING_MAX_UPLOAD_MB: "25"    read_only: true    tmpfs:      - /tmp:size=768m,mode=1777      - /app/apps/web/.next/cache:size=64m,uid=1000,gid=1000    security_opt:      - no-new-privileges:true    cap_drop:      - ALL    pids_limit: 512    mem_limit: 3g    cpus: 3

Environment variables

Service and engines are configured through environment variables. The values in the Image group are set in the image and only need changing for custom paths.

Service

VariableDefaultMeaning
PORT3000Port of the web server inside the container.
HOSTNAME0.0.0.0Address the server binds to.
EBILLING_RATE_LIMIT_PER_MINUTE60Budget in tokens per minute and client. 0 switches the limit off, for example behind your own gateway.
EBILLING_API_KEYSemptyComma-separated API keys or SHA-256 digests with the prefix sha256:. Empty: the API can be used without a key; health and openapi.json always stay open.
EBILLING_MAX_UPLOAD_MB25Largest permitted request in megabytes.
EBILLING_RATE_LIMIT_HEAVY_COST3Tokens a heavy request costs (official validation, PDF work, extraction).
EBILLING_CORS_ORIGINS*Allowed origins for browser access: * for all, a comma-separated list, or empty for no CORS headers.
EBILLING_ACCESS_LOGemptyNot set: no access log. With 1 the API writes one JSON line per request with time, route template, status, duration and id, never content.

Engines

VariableDefaultMeaning
EBILLING_API_CONCURRENCY3Simultaneous runs of the official validators; further requests wait up to 8 seconds, then 503 follows.
EBILLING_JAVA_OPTS-Xmx768m -XX:+UseSerialGCJVM options for KoSIT and Mustang. The heap is capped so that the container stays within its memory limit.
EBILLING_KOSIT_MODEdaemonauto, daemon or cli: KoSIT as a long-running internal service or started anew per request.
EBILLING_KOSIT_CONCURRENCY2Parallel KoSIT validations.
EBILLING_MUSTANG_CONCURRENCY1Parallel Mustang runs for PDFs.
EBILLING_KOSIT_TIMEOUT_MS60000Time limit per KoSIT validation in milliseconds.
EBILLING_MUSTANG_TIMEOUT_MS180000Time limit per PDF in milliseconds.
EBILLING_KOSIT_IDLE_MS300000After this idle time the KoSIT service stops and frees memory.
EBILLING_TMP/tmp/ebillingWorking folder for temporary files. It lives in the tmpfs and is emptied after every request.

Paths set in the image

VariableDefaultMeaning
EBILLING_JAVA/opt/java/openjdk/bin/javaJava executable.
EBILLING_KOSIT_JAR/opt/ebilling/kosit/validator.jarKoSIT validator.
EBILLING_KOSIT_CONFIG/opt/ebilling/kosit/configFolder with the XRechnung configuration (scenarios.xml).
EBILLING_MUSTANG_JAR/opt/ebilling/mustang/mustang-cli.jarMustang CLI.
EBILLING_GS/usr/bin/gsGhostscript for PDF/A repair.
EBILLING_GS_ICC/usr/share/color/icc/ghostscript/srgb.iccsRGB colour profile for the PDF/A output.

Health check

The endpoint /ebilling/api/v1/health answers cheaply and without authentication. The image checks it itself every 30 seconds; orchestrators can use the same path for readiness.

shellShell
curl -fsS http://127.0.0.1:3000/ebilling/api/v1/health# {"status":"ok","version":"…"}​docker inspect --format '{{.State.Health.Status}}' ebilling# healthy

Offline operation

Rule sets, fonts and colour profiles are part of the image. At runtime there are no CDN requests, no font services, no update checks and no telemetry. XML processing does not resolve external entities or schemas.

Block outbound traffic

Only the build downloads the validators from the official GitHub releases. After that you can place the container in a network without internet access.

Updating the validators

The versions are pinned in the Dockerfile and compared against a checksum file during the build. The XRechnung configuration is released twice a year; an update is a new build.

docker/DockerfileShell
# docker/Dockerfile – pinned official toolchain (current values)ARG KOSIT_VERSION=1.6.3ARG XRECHNUNG_CONFIG_TAG=v2026-08-31ARG XRECHNUNG_CONFIG_FILE=xrechnung-3.0.2-validator-configuration-2026-08-31.zipARG MUSTANG_VERSION=2.26.0
shellShell
# 1. set the new version in docker/Dockerfile and docker/toolchain.json# 2. replace the matching checksum in docker/toolchain.sha256 (the build stops if it does not match)# 3. rebuild and restartdocker compose -f docker/compose.yml up -d --build# 4. confirm the engine versionscurl -fsS http://127.0.0.1:3000/ebilling/api/v1/health

If a checksum does not match, the build stops. Enter the sums of the new files in docker/toolchain.sha256 and update the versions in docker/toolchain.json. Pin your production to an image tag.

Resources

The reference system of the public instance runs with these limits. They are experience values, not measured minimums; the Java processes are the largest item.

Memory
3 GB
CPU cores
3
tmpfs for /tmp
768 MB
Java heap
768 MB
KoSIT in parallel
2
Mustang in parallel
1

Reverse proxy

Put a proxy with TLS in front of the image. It must let uploads of up to 26 MB through and allow long requests. Log neither the body nor the query string. The image is built for the path /ebilling; to serve it under another path, rewrite it in the proxy.

nginxText
location /ebilling/ {    proxy_pass http://127.0.0.1:3000;    client_max_body_size 26m;          # API limit is 25 MB    proxy_read_timeout 200s;           # slowest engine: 180 s    proxy_set_header Host $host;    proxy_set_header X-Forwarded-For $remote_addr;    proxy_set_header X-Forwarded-Proto $scheme;}# access log: use a log_format without $request_body and without $args / $request_uri

07Architecture

One core, three ways in

The browser computes locally, the API bundles the official validators, and your systems use both paths with the same result.

Architecture of dignum eBillingThe browser contains the engine and works locally. Your systems, that is ERP, scripts, the CLI and the hot folder, call the REST API. The browser can optionally use the API for the official validation. The stateless REST API calls the official validators internally: KoSIT with the XRechnung configuration, Mustang with veraPDF, and optionally Ghostscript for PDF/A repair.Your browserValidate, create, convertDocuments stay localYour systemsERP, scripts, CLIHot folderREST APIstatelessnothing storedOfficial validatorsKoSIT Validator 1.6.3XRechnung 3.0.2 · 2026-08-31Mustang CLI 2.26.0veraPDF · PDF/A-3GhostscriptPDF/A repair (optional)optionalinternal
Browser engine
Creating, extracting and the built-in validation rules run in the browser. A document only goes to the server if you want the official validation.
REST API
The API is a pure function of the request: it processes in memory, answers and forgets. It knows neither accounts nor sessions.
Official validators
KoSIT and Mustang are the yardstick: whatever we produce has to pass there. They run in the same container as internal services and cannot be reached from outside.
CLI and hot folder
The same functions without a network as soon as the validators are available locally.

08Versions

What is checked today

All versions come from one source and are pinned in the Docker image. State of the information: November 27, 2026.

ComponentVersionRole
XRechnung3.0.22026-08-31German standard (CIUS) for e-invoices to public administration; the row shows the date of the validator configuration.
KoSIT Validator1.6.3Official validator for XML: schema, EN 16931 and XRechnung.
Mustang CLI + veraPDF2.26.0Validation of hybrid PDFs with veraPDF (PDF/A-3) and embedded XML.
EN 16931 (CEN)1.3.x1.3.17European standard EN 16931, CEN validation artefacts in the release shown.
Java (Temurin JRE)21Runtime of the validators, shipped in the image.
API v11.0.0Version of the API contract, independent of the application version.

Responses name the versions involved in the engines member and in the Ebilling-Engines header. The rule sets change on fixed dates; rule ids and the number of rules can change without the API version changing.

Changes

  1. November 27, 2026

    Validation toolchain pinned

    KoSIT validator 1.6.3, Mustang 2.26.0 with veraPDF and Java 21 are pinned in the Docker image and secured by SHA-256.

  2. November 27, 2026

    API v1, contract 1.0.0

    Endpoints validate, convert, create, extract, transform, render, health and openapi.json with a uniform error model per RFC 9457.

  3. August 31, 2026

    XRechnung 3.0.2

    Release of the validator configuration for XRechnung 3.0.2, which this application uses.

Within v1 only additive changes are made. A future major version runs alongside v1 for at least twelve months; deprecations are announced through the Deprecation and Sunset headers.