Download invoice in various formats
GET/api/v1/invoices/:id/download
Download an invoice in different formats.
Supported formats:
- pdf: Standard PDF document (default)
- ubl: UBL 2.1 Invoice XML (EN16931 compliant)
- cii: UN/CEFACT Cross Industry Invoice XML (EN16931 compliant)
- facturx: Factur-X / ZUGFeRD PDF/A-3 with embedded CII XML
The file is returned as an attachment with appropriate Content-Disposition header.
Request
Responses
- 200
- 400
- 401
- 404
- 422
The invoice file in the requested format, returned as a binary attachment with a Content-Disposition: attachment header.
The format query parameter is not one of pdf, ubl, cii, facturx.
The request carries no OAuth bearer token, or the token is invalid or expired.
No invoice exists with the given ID, or the invoice belongs to a workspace the token's application cannot access - both cases return this same response so cross-workspace existence is never revealed.
The requested export could not be generated. The error body reports error: "export_failed" with a message carrying the generator's own diagnosis - which EN 16931 extension the document violates, and the offending line ids where the guard names them.