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.
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. ThecustomField parameter allows you to specify additional fields to extract beyond the standard schema. Some examples include:
storeNumber- Store or branch identifierdeliveryDate- Expected delivery datefinancialCharges- Additional financial chargeslineTotal- Total amount for line itemspurchaseOrderRef- Purchase order reference numbercustomerReference- Customer reference numberdepartmentCode- 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
ThelineItemStructure 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
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
Thebody 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.
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
- CURL
- JavaScript/Node.js
- Python
- C#
- Java
- PHP