On this page

Invoice API

API overview

All invoice routes live under /api/v1. Send either header below — not both, and never the dashboard login JWT.

Header

X-API-Key: einv_…

or

Authorization: Bearer einv_…
Try it in the interactive API →
01

Create

POST JSON. The path picks the file you download.

UBL

200 → UBL 2.1 XML. 400 → INVALID_INVOICE.

POST/api/v1/create/ubl

Canonical create body. Other create routes reuse this JSON and only change the file you download.

Request body

invoicereq

object

The invoice. JSON is camelCase.

invoiceNumberreq

string

Invoice number (BT-1).

issueDatereq

string

YYYY-MM-DD (BT-2).

currencyreq

string

ISO 4217, e.g. EUR.

dueDateopt

string

Due date (BT-9).

typeCodeopt

string

Default 380 (commercial invoice).

buyerReferenceopt

string

Buyer ref / Leitweg-ID (BT-10).

businessProcessTypeopt

string

Process id (BT-23).

sellerreq

object

Supplier party.

namereq

string

Legal name.

postalAddressreq

object

Postal address.

countryreq

string

ISO alpha-2 (DE, FR, PL).

line1opt

string

Street.

cityopt

string

City.

postCodeopt

string

Postal code.

vatIdentifieropt

string

VAT id. Seller needs this or another legal identifier.

electronicAddressopt

object

identifier + schemeId (e.g. 0088 GLN).

contactopt

object

name, phone, email.

legalRegistrationopt

object

Company register id.

buyerreq

object

Customer party. Same shape as seller.

namereq

string

Legal name.

postalAddressreq

object

Postal address.

countryreq

string

ISO alpha-2 (DE, FR, PL).

line1opt

string

Street.

cityopt

string

City.

postCodeopt

string

Postal code.

vatIdentifieropt

string

VAT id. Seller needs this or another legal identifier.

electronicAddressopt

object

identifier + schemeId (e.g. 0088 GLN).

contactopt

object

name, phone, email.

legalRegistrationopt

object

Company register id.

paymentDetailsopt

object

How the buyer pays.

paymentMeansCodeopt

string

UNCL 4461, e.g. 30 = credit transfer.

paymentAccountIdentifieropt

string

IBAN.

linesreq

object[]

At least one line.

quantityreq

number

Quantity.

unitCodeopt

string

Default C62.

priceDetails.netPricereq

number

Net unit price.

vatInformation.rateopt

number

VAT percent. Default 0.

vatInformation.categoryCodeopt

string

Default S (standard).

item.namereq

string

Line description.

options.profileopt

string

Default peppol-bis-3. Also: en16931, nlcius, ehf, pint, xrechnung.

create-ubl.json
{
  "invoice": {
    "invoiceNumber": "INV-2026-001",
    "issueDate": "2026-07-01",
    "dueDate": "2026-07-31",
    "currency": "EUR",
    "buyerReference": "04011000-1234512345-06",
    "seller": {
      "name": "Acme GmbH",
      "vatIdentifier": "DE123456789",
      "postalAddress": {
        "line1": "Musterstr. 1",
        "city": "Berlin",
        "postCode": "10115",
        "country": "DE"
      }
    },
    "buyer": {
      "name": "Example Corp",
      "vatIdentifier": "FR12345678901",
      "postalAddress": {
        "line1": "12 Rue de Rivoli",
        "city": "Paris",
        "postCode": "75001",
        "country": "FR"
      }
    },
    "paymentDetails": {
      "paymentMeansCode": "30",
      "paymentAccountIdentifier": "DE89370400440532013000"
    },
    "lines": [
      {
        "quantity": 10,
        "priceDetails": { "netPrice": 150 },
        "vatInformation": { "rate": 19, "categoryCode": "S" },
        "item": { "name": "Consulting Services" }
      }
    ]
  },
  "options": { "profile": "peppol-bis-3" }
}
02

Validate

POST a file. Path selects the ruleset.

UBL

JSON on this path. Append /report for a PDF. Header X-Invoice-Valid.

POST/api/v1/validate/ubl

Request

filereq

file

UBL XML

Response JSON

validreq

boolean

Pass or fail.

errors[]opt

object[]

rule, layer, severity, field, message.

warnings[]opt

object[]

Same shape as errors.

syntax / profileopt

string

Detected format.

validated_atopt

string

Timestamp.

validate-response.json
{
  "valid": false,
  "errors": [
    {
      "rule": "BR-CO-15",
      "layer": "en16931",
      "severity": "error",
      "field": "invoice.lines[0]",
      "message": "VAT category code missing"
    }
  ],
  "warnings": [],
  "syntax": "ubl",
  "profile": "peppol-bis-3",
  "validated_at": "2026-07-01T12:00:00Z"
}
03

Convert

Always source → canonical → target. facturx / zugferd targets return PDF.

UBL → CII

CII XML

POST/api/v1/convert/ubl/to/cii
filereq

file

UBL XML

CII → UBL

UBL XML

POST/api/v1/convert/cii/to/ubl
filereq

file

CII XML

Any pair

Target XML or PDF

POST/api/v1/convert/{source}/to/{target}

Replace source and target with ubl, cii, xrechnung, facturx, zugferd, fatturapa, or ksef.

filereq

file

Source invoice file

04

Extract

Pull structured data or attachments out of a file.

JSON

{ "invoice": { …same fields as Create } }

POST/api/v1/extract/json
filereq

file

PDF with embedded XML, or invoice XML

XML

Embedded or standalone invoice XML

POST/api/v1/extract/xml
filereq

file

Hybrid PDF or XML

Attachments

ZIP of PDF attachments

POST/api/v1/extract/attachments
filereq

file

PDF

05

Render

Visual PDF only — not a Factur-X hybrid. Use Embed for that.

XML → PDF

application/pdf

POST/api/v1/render/xml/to/pdf
filereq

file

UBL, CII, or XRechnung XML

Aliases: /render/ubl/to/pdf, /render/cii/to/pdf, /render/xrechnung/to/pdf.

06

Embed

Attach CII XML to a visual PDF as PDF/A-3.

Factur-X

invoice-facturx.pdf (PDF/A-3)

POST/api/v1/embed/facturx
pdfreq

file

Visual PDF

xmlreq

file

CII XML

ZUGFeRD

invoice-zugferd.pdf (PDF/A-3)

POST/api/v1/embed/zugferd
pdfreq

file

Visual PDF

xmlreq

file

CII XML