About this endpoint
What it does
Creates an e-invoice from the JSON request body and returns the generated invoice output in the format described by the response schema. The request includes the invoice data, and the response includes the rendered file content plus metadata and calculated totals.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| format | ENUM | No | Output format. Allowed values: pdf, xml, json.pdf is the default for zugferd/facturx.xml is the default for xrechnung/peppol, and returns the bare CII for zugferd/facturx.json returns the file as a data URI plus the XML, totals, and warnings. |
| invoice | Object | Yes | Invoice data. Required fields: number, issue_date, seller, buyer, lines. See nested fields below. |
| invoice.note | String | No | Free-text note (BT-22). Max 1000 characters. |
| invoice.type | ENUM | No | Invoice type. Allowed values: invoice, credit_note. Default: invoice.invoice maps to type code 380, credit_note to 381. |
| invoice.buyer | Object | Yes | Buyer party details. Required fields: name, city, postal_code, country. |
| invoice.buyer.city | String | Yes | City. Min 1, max 200 characters. |
| invoice.buyer.name | String | Yes | Legal name (BT-27 / BT-44). Min 1, max 200 characters. |
| invoice.buyer.email | String | No | Email address. Max 200 characters. |
| invoice.buyer.phone | String | No | Phone number. Max 64 characters. |
| invoice.buyer.street | String | No | Street address. Max 200 characters. |
| invoice.buyer.vat_id | String | No | VAT identifier (BT-31 / BT-48). Max 64 characters. |
| invoice.buyer.country | String | Yes | ISO 3166-1 alpha-2 country code. Must match ^[A-Z]{2}$. |
| invoice.buyer.tax_number | String | No | Seller's national tax number, e.g. German Steuernummer (BT-32). Seller only. Max 64 characters. |
| invoice.buyer.postal_code | String | Yes | Postal code. Min 1, max 32 characters. |
| invoice.buyer.contact_name | String | No | Contact name. Max 200 characters. |
| invoice.buyer.registration_id | String | No | Company register number, e.g. HRB 12345 or SIREN (BT-30 / BT-47). Max 64 characters. |
| invoice.buyer.electronic_address | String | No | Delivery address for e-invoices (BT-34 / BT-49). Must be either an email address or a Peppol participant ID in scheme:id form, matching `^([0-9]{4}:\S+ |
| invoice.lines | Object Array | Yes | Invoice lines. At least 1 item, at most 500. Each item requires description, quantity, unit_price, vat_rate. |
| invoice.lines[].note | String | No | Line note (BT-127). Max 1000 characters. |
| invoice.lines[].unit | String | No | Unit code. Default: C62.UN/ECE Rec 20 unit code such as C62, HUR, DAY, MON, KGM, LTR, or a plain name like hour. |
| invoice.lines[].quantity | Number | Yes | Line quantity. Must be greater than -1000000000 and less than 1000000000. |
| invoice.lines[].vat_rate | Number | Yes | VAT percent for this line (BT-152). Must be between 0 and 100. |
| invoice.lines[].unit_price | Number | Yes | Net price per unit, before VAT (BT-146). Must be at least 0 and less than 1000000000. |
| invoice.lines[].description | String | Yes | Item name (BT-153). Min 1, max 1000 characters. |
| invoice.lines[].vat_category | ENUM | No | EN 16931 VAT category (BT-151). Allowed values: S, Z, E, AE, K, G, O, L, M.Defaults to S when vat_rate > 0.Required when the rate is 0: Z zero rated, E exempt, AE reverse charge, K intra-EU, G export, O outside the scope of VAT. |
| invoice.number | String | Yes | Invoice number (BT-1). Min 1, max 64 characters. |
| invoice.seller | Object | Yes | Seller party details. Required fields: name, city, postal_code, country. |
| invoice.seller.city | String | Yes | City. Min 1, max 200 characters. |
| invoice.seller.name | String | Yes | Legal name (BT-27 / BT-44). Min 1, max 200 characters. |
| invoice.seller.email | String | No | Email address. Max 200 characters. |
| invoice.seller.phone | String | No | Phone number. Max 64 characters. |
| invoice.seller.street | String | No | Street address. Max 200 characters. |
| invoice.seller.vat_id | String | No | VAT identifier (BT-31 / BT-48). Max 64 characters. |
| invoice.seller.country | String | Yes | ISO 3166-1 alpha-2 country code. Must match ^[A-Z]{2}$. |
| invoice.seller.tax_number | String | No | Seller's national tax number, e.g. German Steuernummer (BT-32). Seller only. Max 64 characters. |
| invoice.seller.postal_code | String | Yes | Postal code. Min 1, max 32 characters. |
| invoice.seller.contact_name | String | No | Contact name. Max 200 characters. |
| invoice.seller.registration_id | String | No | Company register number, e.g. HRB 12345 or SIREN (BT-30 / BT-47). Max 64 characters. |
| invoice.seller.electronic_address | String | No | Delivery address for e-invoices (BT-34 / BT-49). Must be either an email address or a Peppol participant ID in scheme:id form, matching `^([0-9]{4}:\S+ |
| invoice.payment | Object | No | Payment details. If provided, includes fields such as bic, iban, terms, means_code, and account_name. |
| invoice.payment.bic | String | No | Payee BIC (BT-86). Max 11 characters. |
| invoice.payment.iban | String | No | Payee IBAN (BT-84). Max 34 characters. |
| invoice.payment.terms | String | No | Payment terms (BT-20). Max 1000 characters. |
| invoice.payment.means_code | String | No | UNCL 4461 payment means (BT-81). Must be 1 to 3 digits. Defaults to 58 with an IBAN, otherwise 1. |
| invoice.payment.account_name | String | No | Account holder (BT-85). Max 200 characters. |
| invoice.currency | String | No | ISO 4217 currency code (BT-5). Must match ^[A-Z]{3}$. Default: EUR. |
| invoice.due_date | String | No | Due date in YYYY-MM-DD format (BT-9). |
| invoice.issue_date | String | Yes | Issue date in YYYY-MM-DD format (BT-2). |
| invoice.delivery_date | String | No | Date goods or services were delivered (BT-72). |
| invoice.buyer_reference | String | No | Buyer's reference (BT-10). Required by XRechnung for German public buyers as the Leitweg-ID; Peppol needs this or order_reference. Max 200 characters. |
| invoice.order_reference | String | No | Purchase order number (BT-13). Max 200 characters. |
| invoice.preceding_invoice | String | No | Invoice that a credit note corrects (BT-25). Max 64 characters. |
| invoice.vat_exemption_reason | String | No | Reason VAT is not charged (BT-120). Required when any line uses E, AE, K, G, or O. Max 1000 characters. |
| download | Boolean | No | Add Content-Disposition: attachment. Default: false. |
| standard | ENUM | No | Invoice standard. Allowed values: zugferd, facturx, xrechnung, peppol.Default: zugferd.zugferd / facturx produce a PDF/A-3 invoice with embedded XML for Germany and France.xrechnung produces XRechnung 3.0 XML (UBL), required by German public buyers.peppol produces Peppol BIS Billing 3.0 XML (UBL). |
Response
Returns a JSON object with xml, bytes, cache, pages, engine, format, totals, data_uri, standard, warnings, queued_ms, render_ms, media_type, and engine_version fields. The format field indicates whether the response payload is pdf or xml, and xml contains the invoice XML, which is also embedded in the PDF for zugferd/facturx.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| xml | String | No | The invoice XML. Also embedded in the PDF for zugferd/facturx. |
| bytes | Integer | No | Response size in bytes. |
| cache | ENUM | No | Cache result. Allowed values: hit, miss. |
| pages | Integer | No | PDF page count. Nullable; null for DOCX/HTML. |
| engine | String | No | Rendering engine used. |
| format | ENUM | No | Output format. Allowed values: pdf, xml. |
| totals | Object | No | Computed totals and VAT breakdown. |
| data_uri | String | No | data:<media_type>;base64,… payload. |
| standard | String | No | Invoice standard used. |
| warnings | String Array | No | Warning messages returned by the service. |
| queued_ms | Integer | No | Time spent queued, in milliseconds. |
| render_ms | Integer | No | Rendering time, in milliseconds. |
| media_type | String | No | Media type of the returned content. |
| engine_version | String | No | Version of the rendering engine. |



