API reference

https://invoiceapi.io/v1OpenAPI 3.1 JSONBack to start

Endpoints

POST
/templates/{id}/invoices
Generate an invoice from a template

Generates a ZUGFeRD PDF/A-3 and/or an XRechnung XML from the template and payload. Idempotent per Idempotency-Key: a repeat with the same key and an identical body replays the original invoice with a 200 instead of creating a new one. Supply the optional `deliverEmail` block to also email the finished invoice: delivery is attempted synchronously and its outcome is reported on the 201, but a delivery failure NEVER fails the request — the invoice is archived either way.

Parameters
FieldInRequiredDescription
idpath
Required
Resource id.
outputqueryRepeatable. Which artifact kind(s) to produce. Defaults to zugferd_pdf when omitted.
Idempotency-KeyheaderClient-supplied key. A repeat with the same key and body returns the original invoice (200); the same key with a different body returns 409.
Response
200
Idempotency-Key replay: the invoice already generated for this key and body. A replay NEVER sends email and never reports delivery — the `deliverEmail` field is absent, even if the replayed request carried a `deliverEmail` block. The original request owns the delivery; consult the invoice to see its state.
application/json
FieldTypeRequiredDescription
idstring
Required
Invoice id.
numberstring
Required
Invoice number (BT-1).
mode"live" | "test"
Required
status"generated" | "delivered" | "delivery_failed"
Required
templateVersioninteger
Required
createdAtstring
Required
validationobject
Required
validation.summarystring
Required
outputsobject[]
Required
outputs[].kind"zugferd_pdf" | "xrechnung_xml" | "pdf"
Required
outputs[].sha256string
Required
outputs[].bytesinteger
Required
outputs[].urlstring
Required
Signed GET URL (expires in <= 15 minutes).
201
Invoice generated. `deliverEmail` reports the delivery outcome, or is null.
application/json
400
Malformed payload or deliverEmail block (schema validation failed).
application/problem+json
401
Missing or invalid API key (Authorization: Bearer <key>).
application/problem+json
402
Monthly quota exceeded (only enforced when billing is enabled).
application/problem+json
404
Template, template version, or profile not found.
application/problem+json
409
Idempotency-Key reused with a different request body.
application/problem+json
422
Compliance validation failed (KoSIT / veraPDF findings).
application/problem+json
429
Rate limit exceeded; see the Retry-After header.
application/problem+json
GET
/invoices
List invoices

Cursor-paginated. Test-mode invoices are excluded unless mode=test.

Parameters
FieldInRequiredDescription
profilequeryFilter by profile id.
fromqueryFilter by record creation time (createdAt), lower bound, inclusive (any Date.parse-able value). NOT the invoice issue date (BT-2).
toqueryFilter by record creation time (createdAt), upper bound, inclusive (any Date.parse-able value). NOT the invoice issue date (BT-2).
modequerylive (default) or test.
cursorqueryOpaque pagination cursor from a previous nextCursor.
limitqueryPage size, clamped to [1, 100] (default 25).
Response
200
A page of invoices.
application/json
FieldTypeRequiredDescription
dataPublicInvoice[]
Required
data[].idstring
Required
Invoice id.
data[].numberstring
Required
Invoice number (BT-1).
data[].mode"live" | "test"
Required
data[].status"generated" | "delivered" | "delivery_failed"
Required
data[].templateVersioninteger
Required
data[].createdAtstring
Required
data[].validationobject
Required
data[].validation.summarystring
Required
data[].outputsobject[]
Required
data[].outputs[].kind"zugferd_pdf" | "xrechnung_xml" | "pdf"
Required
data[].outputs[].sha256string
Required
data[].outputs[].bytesinteger
Required
data[].outputs[].urlstring
Required
Signed GET URL (expires in <= 15 minutes).
nextCursorstring | null
Required
400
Invalid profile/cursor/from/to query parameter.
application/problem+json
401
Missing or invalid API key (Authorization: Bearer <key>).
application/problem+json
429
Rate limit exceeded; see the Retry-After header.
application/problem+json
GET
/invoices/{id}
Retrieve an invoice

Returns invoice metadata with freshly signed artifact URLs.

Parameters
FieldInRequiredDescription
idpath
Required
Resource id.
Response
200
The invoice.
application/json
FieldTypeRequiredDescription
idstring
Required
Invoice id.
numberstring
Required
Invoice number (BT-1).
mode"live" | "test"
Required
status"generated" | "delivered" | "delivery_failed"
Required
templateVersioninteger
Required
createdAtstring
Required
validationobject
Required
validation.summarystring
Required
outputsobject[]
Required
outputs[].kind"zugferd_pdf" | "xrechnung_xml" | "pdf"
Required
outputs[].sha256string
Required
outputs[].bytesinteger
Required
outputs[].urlstring
Required
Signed GET URL (expires in <= 15 minutes).
401
Missing or invalid API key (Authorization: Bearer <key>).
application/problem+json
404
No such invoice for this account.
application/problem+json
429
Rate limit exceeded; see the Retry-After header.
application/problem+json
GET
/templates
List templates

Unpaginated: org template counts are small (plan-limited).

Response
200
The account templates.
application/json
FieldTypeRequiredDescription
dataPublicTemplate[]
Required
data[].idstring
Required
data[].namestring
Required
data[].layoutId"classic" | "modern" | "compact" | "bold" | "minimal"
Required
data[].versioninteger
Required
data[].profileIdstringPresent only for profile-scoped templates.
data[].createdAtstring
Required
401
Missing or invalid API key (Authorization: Bearer <key>).
application/problem+json
429
Rate limit exceeded; see the Retry-After header.
application/problem+json
GET
/templates/{id}
Retrieve a template
Parameters
FieldInRequiredDescription
idpath
Required
Resource id.
Response
200
The template.
application/json
FieldTypeRequiredDescription
idstring
Required
namestring
Required
layoutId"classic" | "modern" | "compact" | "bold" | "minimal"
Required
versioninteger
Required
profileIdstringPresent only for profile-scoped templates.
createdAtstring
Required
401
Missing or invalid API key (Authorization: Bearer <key>).
application/problem+json
404
No such template for this account.
application/problem+json
429
Rate limit exceeded; see the Retry-After header.
application/problem+json
POST
/validate
Validate an invoice document

Validates an XRechnung/UBL/CII XML or a ZUGFeRD PDF against KoSIT (Schematron) and veraPDF. Quota-exempt. Findings are translated to DE/EN.

Accepted content types
application/xml
application/pdf
multipart/form-data
FieldTypeRequiredDescription
filestring
Required
The XML or PDF document to validate.
Response
200
The validation report.
application/json
FieldTypeRequiredDescription
validationobject
Required
Raw compliance-engine validation result (engine-specific shape).
versionsobject
findingsobject[]
Required
findings[].pathstring
Required
findings[].btstring
findings[].codestring
findings[].messageobject
Required
findings[].message.destring
Required
findings[].message.enstring
Required
findings[].untranslatedboolean
400
Empty body, or the compliance engine could not decode it.
application/problem+json
401
Missing or invalid API key (Authorization: Bearer <key>).
application/problem+json
429
Rate limit exceeded; see the Retry-After header.
application/problem+json
502
The compliance engine is unreachable.
application/problem+json
GET
/health
Liveness and dependency reachability

Public. Reports compliance-engine reachability and engine versions.

Response
200
Service health.
application/json
FieldTypeRequiredDescription
status"ok" | "degraded"
Required
compliance"ok" | "unreachable"
Required
versionsobject