About this endpoint
What it does
Reads an XRechnung, ZUGFeRD, Factur-X or UBL e-invoice and returns the invoice and its lines as JSON, with consistency checks.
Request Body
| Parameter | Type | Description |
|---|---|---|
| xml | String | The e-invoice XML as text. Required if fileContent is not sent. |
| fileContent | String | Base64 of the XML file, or of a PDF with the invoice XML inside. Required if xml is not sent. Used instead of xml when both are sent. |
| fileName | String | File name returned in sourceFile. Default: invoice. |
Response
Returns a JSON object with count and items. The first item is the invoice (type: invoice) and each following item is one line (type: line). count is therefore the number of lines plus one.
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Number of items. |
| items[].type | ENUM | Allowed values: invoice, line. |
Invoice item
| Parameter | Type | Description |
|---|---|---|
| items[].number | String | Invoice number. |
| items[].documentType | String | For example Invoice or Credit note. |
| items[].standard | String | Detected standard, for example XRechnung, Peppol BIS or ZUGFeRD / Factur-X. |
| items[].syntax | String | XML syntax, for example CII (UN/CEFACT) or UBL 2.1. |
| items[].profile | String | Profile identifier from the file. |
| items[].source | String | XML or PDF with embedded XML. |
| items[].sourceFile | String | Your fileName, or invoice. |
| items[].issueDate, dueDate, deliveryDate | String | Dates as YYYY-MM-DD. Empty when absent. |
| items[].currency | String | Currency code. |
| items[].buyerReference, orderReference, paymentReference | String | References. Empty when absent. |
| items[].paymentTerms | String | Payment terms text. |
| items[].iban, bic, accountName | String | Payment account details. |
| items[].seller, buyer | Object | name, street, postcode, city, country, vatId, contact, email, phone. |
| items[].notes | String Array | Notes from the invoice. |
| items[].lineCount | Integer | Number of invoice lines. |
| items[].totals.lines | Number | Sum of line amounts. Nullable. |
| items[].totals.net, vat, gross, payable | Number | Header amounts. Nullable. |
| items[].totals.allowances, charges, prepaid | Number | Null when absent. |
| items[].vatBreakdown[] | Object Array | category, percent, base, amount, reason. The three amounts are nullable. |
| items[].checks[] | Object Array | check (name), ok (Boolean), detail (explanation). |
| items[].allChecksOk | Boolean | false when a check fails. |
Line item
| Parameter | Type | Description |
|---|---|---|
| items[].invoice | String | Invoice number the line belongs to. |
| items[].lineId | String | Line identifier from the file. |
| items[].name, description | String | Product or service. |
| items[].sellerItemId, buyerItemId | String | Item identifiers. |
| items[].quantity | Number | Billed quantity. Can be a decimal. Nullable. |
| items[].unitCode, unit | String | Unit code and its readable name. |
| items[].unitPrice, netAmount | Number | Price and line amount. Nullable. |
| items[].vatCategory | String | VAT category code. |
| items[].vatPercent | Number | VAT rate. Nullable. |
Checks
The checks cover required fields, valid dates, currency and document type codes, line amounts, line totals, VAT sums and rates, gross amount, amount due and IBAN. Which checks run depends on the data in the file. They are not a full EN 16931 or XRechnung schema validation.
Errors
A 400 response has code, error and message. For example, code is invalid_input when:
- neither
xmlnorfileContentis sent - a field has the wrong type
- the input is not an e-invoice
- a PDF has no invoice XML inside
- the XML has a DOCTYPE or ENTITY declaration
- the file is larger than 10 MB
Notes
- Maximum file size: 10 MB.
- UTF-8 and UTF-16 XML files are accepted.



