Import one or more invoices with automatic AI-powered data extraction.
This endpoint allows you to create invoice records by uploading invoice files, with automatic AI-powered data extraction from the uploaded files.
When to Use This Endpoint
Use this endpoint when you want to:
- Import one or more invoices and create new invoice records
- Automatically extract invoice data (invoice number, date, amounts, supplier, etc.) using AI
- Process multiple invoices in a single batch request
- Have the system automatically link invoices to purchase orders when possible
Key Features
- Creates new invoice records: Each uploaded file creates a separate invoice record in the system
- Automatic AI extraction: Invoice data is automatically extracted from the uploaded PDF files using AI
- Minimal required information: Only the
outletparameter is required; all other invoice data is extracted automatically - Batch processing: Upload multiple invoice files in a single request
- Automatic purchase order linking: The system automatically links invoices to purchase orders when feasible
This process accepts files in the PDF format.
How It Works
This endpoint creates a separate invoice record for each file that gets uploaded. All files are automatically classed as type INVOICE.
The uploaded files are processed asynchronously to extract invoice information using AI. The extracted data includes invoice numbers, dates, amounts, supplier information, and line items. The invoices are all linked to the same outlet (required), and optionally to the same 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 | Yes | 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 an Upload Invoices (with AI) request.
If any errors occur for some file during the upload, those errors will be included in the response, but the processing will continue for the remaining files in the batch.
