Skip to main content
Try it live: AI Invoice Parser → API Tester — send a real request from your browser.

POST /ai-invoice-parser

The AI Invoice parser automatically detects invoice layouts without the manual effort previously required to supply document parsing templates for reference.
Important
  • Only invoices will be parsed. For all other documents, please use our existing Document Parser.
  • To ensure accurate processing, each invoice must be clearly separated. If an invoice contains multiple pages, we recommend splitting it into individual PDFs using the PDF Split API.
  • While AI Invoice Parser supports multi-page invoices, the total page count for a single PDF must not exceed 100 pages. Submitting large PDFs containing multiple invoices is not recommended.
  • To retrieve results, you must poll the Background Job Check endpoint using the jobId returned in the initial response. Once the job status is marked as success, the output file will be available at the provided URL.
This method extracts data from your PDF invoices and returns a well-structured JSON format for your use.

Attributes

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" }

Custom Fields

AI Invoice Parser with custom fields support automatically detects invoice layouts and extracts both standard schema data and user-specified custom fields without requiring manual templates. The customField parameter allows you to specify additional fields to extract beyond the standard schema. Some examples include:
  • storeNumber - Store or branch identifier
  • deliveryDate - Expected delivery date
  • financialCharges - Additional financial charges
  • lineTotal - Total amount for line items
  • purchaseOrderRef - Purchase order reference number
  • customerReference - Customer reference number
  • departmentCode - Department or cost center code
If a custom field returns an empty value, please contact our support team to help improve the extraction accuracy.

Line Item Structure

The lineItemStructure attribute lets you define a custom schema for line items. Each key is a field name you choose (in camelCase) and each value is the expected data type — either "string" or "number". When provided, every object inside the lineItems array will contain exactly the fields you specified. If a value cannot be extracted from the invoice, the field will still be present with an empty or default value instead of being omitted.

Example

With the structure above, every line item in the response will include all four fields:
Use camelCase for field names (e.g., unitPrice, totalPrice). The field names you define will be used as-is in the response, giving you full control over the output keys.

Query parameters

No query parameters accepted.

Responses

Invoice Schema

The body object contains all the metadata needed to understand your invoice content and includes the following attributes:

Sections


The vendor Object

An object containing vendor details.

The customer Object

An object containing customer details.

customer.billTo

customer.shipTo


The invoice Object

An object containing the invoice details.

The paymentDetails Object

An object containing payment details.

paymentDetails.bankingInformation


The others Object

An object containing additional notes.

The lineItems Object

An object detailing the line items in an invoice.
Note: there is no common structure due to significant variability between invoices! To define your own custom structure, use the lineItemStructure attribute in your request.
A typical invoice might list purchase items with details such as name, quantity or price of each individual item.

Common Objects

There are a couble of objects which are commonly used in the schema in a few places, these are as follows.

address object

contactInformation object

Example Payload

To see the request size limits, please refer to the Request Size Limits.

Example Response

To see the main response codes, please refer to the Response Codes.
You can use jobId to identify the corresponding callback response. Use the Job Check API to poll the job status.

Example Callback Response

Setting up the Callback URL

The callback URL should be a webhook which listens to responses from the parsing results. You can setup your own webhook or use one from a provider.
If you are unsure about webhooks or callbacks, please read this Wikipedia article to get started.

Supported Languages

  • Albanian (Shqip)
  • Bosnian (Bosanski)
  • Bulgarian (Български)
  • Croatian (Hrvatski)
  • Czech (Čeština)
  • Danish (Dansk)
  • Dutch (Nederlands)
  • English
  • Estonian (Eesti)
  • Finnish (Suomi)
  • French (Français)
  • German (Deutsch)
  • Greek (Ελληνικά)
  • Hungarian (Magyar)
  • Icelandic (Íslenska)
  • Italian (Italiano)
  • Latvian (Latviešu)
  • Lithuanian (Lietuvių)
  • Norwegian (Norsk)
  • Polish (Polski)
  • Portuguese (Português)
  • Romanian (Română)
  • Russian (Русский)
  • Serbian (Српски)
  • Slovak (Slovenčina)
  • Slovenian (Slovenščina)
  • Spanish (Español)
  • Swedish (Svenska)
  • Turkish (Türkçe)
  • Ukrainian (Українська)
Inconsistent URL Encoding in cURL Output: When using cURL to make API requests, the output JSON may show URL characters encoded as Unicode escape sequences. For example, the ampersand character (&) may appear as \u0026 in the cURL output. This is normal JSON encoding behavior and does not affect the validity of the URL. The URL will function correctly when used, as JSON parsers automatically decode these escape sequences. If you’re parsing the response programmatically, your JSON parser will handle this conversion automatically.

Code Samples