Upload a single or multiple invoices in a batch.
This endpoint allows you to create multiple invoice records simultaneously by uploading multiple invoice files in a single request. This is particularly useful for batch processing of invoices, reducing the number of API calls needed when processing several invoices at once.
Calling this endpoint also starts the content extraction from the uploaded files. The uploaded files get processed asynchronously to populate the invoice records with information that can be extracted from them. Additionally, the invoice files are linked to one or more purchase orders whenever feasible.
This process accepts files in the PDF format.
Initialization
This endpoint creates a separate invoice record for each file that gets uploaded. All files are automatically classed as type INVOICE
.
The invoices are all linked to the same outlet, supplier, and purchase orders if those are provided in the request.
Request Parameters
The request must use themultipart/form-data
format with the following parameters:
Parameter | Type | Required | Description |
---|---|---|---|
outlet | string | No | The outlet ID to associate with all invoices |
supplier | string | No | The supplier ID to associate with all invoices |
purchase_orders | string | No | Comma-separated list of purchase order IDs to link to all invoices |
file[0], file[1] ... | binary | Yes | The invoice files to upload |
The interactive console on this page may not work as expected.
While developing, pay close attention to the request's content-type. Here, it's especially recommended to use a library that can handle sending multiple files via HTTP.
Tracking Results
All uploaded files will be processed as invoice files, not supplementary documents.
A successful request will include a bulk_importation_id
value that can be used to track the progress of the file processing. The Get Invoices endpoint offers an optional filter on this field, enabling users to query invoices from a bulk upload request.
If any errors occur for some file during the bulk upload, those errors will be included in the response, but the processing will continue for the remaining files in the batch.