Skip to main content

Import and Send CSV Invoices (Asynchronous)

POST 

/api/v1/invoices/import/csv

Upload a CSV file. The file is parsed synchronously (header validation, row count, default-seller resolution) and an ImportJob is created. Heavy per-row processing (BIS XML render โ†’ optional signing โ†’ UBL 2.1 schema and Schematron via Saxon-HE โ†’ queue-for-send) runs asynchronously in the background so this request returns within seconds even for large files (tens of thousands of rows). A row that fails the UBL 2.1 schema or the Schematron is not sent: it appears in the job result's errors with validation_layer: COMPLIANCE_GATE and the rule ids (UBL-XSD for the schema).

The response is 202 Accepted with a job_id. Poll GET /api/v1/import-jobs/{job_id} for progress (counts and status) and GET /api/v1/import-jobs/{job_id}/result.json for the final transactions + errors payload once status is terminal (validated, partially_validated or failed).

Duplicates are skipped by default. An invoice whose number this organisation has already sent, or already holds as a draft in the Invoice Hub, is not sent again: it appears in the job result's errors with reason_code: DUPLICATE_INVOICE_NUMBER and is counted in duplicates. Pass the multipart field allow_duplicates=true to send them anyway.

Requestโ€‹

Responsesโ€‹

Successful Response