E-Invoicing

Export e-invoice XML

Generate and return an e-invoice XML document for the invoice in one of 9 supported formats. Optionally sign with XAdES-EPES (Facturae only). Conforms to EN16931 semantic model.

Supported formats: Facturae 3.2.2, XRechnung-CII, XRechnung-UBL, Factur-X (EN16931), FatturaPA 1.2.2, PEPPOL-BIS-3, FA-2-KSeF (Polish KSeF FA(3)), UBL 2.1, CII D16B.

Trust Area: COMPLIANCE — Requires owner role or API key with einvoice:* scope.

post/v1/invoices/{invoiceId}/einvoice/export

Request

  • Base URL: https://api.frihet.io
  • URL: https://api.frihet.io/v1/invoices/{invoiceId}/einvoice/export
  • Auth: API key in header X-API-Key

Path parameters

invoiceIdstring required

Invoice unique identifier

Request body

format'Facturae' | 'XRechnung-CII' | 'XRechnung-UBL' | 'Factur-X' | 'FatturaPA' | 'PEPPOL-BIS-3' | 'FA-2-KSeF' | 'UBL' | 'CII' required

Target e-invoice format.

  • Facturae: Spanish B2G (Agencia Tributaria, FACe)
  • XRechnung-CII/UBL: German B2G (PEPPOL/ZRE/OZG-RE)
  • Factur-X: French standard (PDF/A-3 XML component)
  • FatturaPA: Italian SDI clearance
  • PEPPOL-BIS-3: Pan-European PEPPOL network
  • FA-2-KSeF: Polish KSeF FA(3) XML
  • UBL/CII: Generic cross-border EU
signedboolean

Sign the XML with XAdES-EPES. Only supported for format: Facturae. Requires a valid PKCS#12 certificate uploaded in Settings > Compliance.

Example request

{
  "format": "Facturae"
}

Response

E-invoice XML generated successfully

Example response

{
  "data": {
    "contentType": "application/xml",
    "filename": "F2026-001_Facturae.xml",
    "format": "Facturae"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.