Skip to main content

Upload an invoice file

POST 

/api/v1/workspaces/:workspace_id/invoices/upload

Upload an invoice file (XML or PDF) for automatic parsing and import.

Supported formats:

  • XML: UBL 2.1 Invoice/CreditNote, UN/CEFACT CII (EN16931 compliant)
  • PDF: Factur-X / ZUGFeRD (PDF/A-3 with embedded XML)

The file is processed synchronously and the created invoice document is returned.

Pass lifecycle_state to create the invoice and enter the lifecycle in a single call, instead of following up with PATCH /api/v1/invoices/{id}/transition. The transition runs under the same rules as that endpoint. It is all-or-nothing: a refused transition returns 422 and leaves no invoice behind. A file that needs assisted extraction (a PDF with no embedded XML) cannot carry lifecycle_state and is rejected with 422 - upload it alone, then transition once processing ends.

Request​

Responses​

The invoice created by parsing and importing the uploaded file's UBL, CII, or Factur-X content.