Upload Invoices (with AI)

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 outlet parameter 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:

ParameterTypeRequiredDescription
outletstringYesThe outlet ID to associate with all invoices
supplierstringNoThe supplier ID to associate with all invoices
purchase_ordersstringNoComma-separated list of purchase order IDs to link to all invoices
file[0], file[1]...binaryYesThe 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.

Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!