canonical: https://jentic.com/apis/invoicedataextraction.com/invoicedataextraction

# Invoice Data Extraction API

The Invoice Data Extraction API turns uploaded invoices and similar documents into structured rows, following a plain-language prompt that says what to extract. A caller uploads files through a multipart upload session, submits an extraction with a task_name, prompt, and output_structure of per_invoice, per_line_item, or automatic, and waits on the extraction until it finishes. Results are read as JSON rows or downloaded as an XLSX, CSV, or JSON file, and an extraction submitted with ask_questions can pause to ask the caller about anything the documents leave unsettled before it continues.

## For AI agents

Upload invoices, extract fields or line items into rows from a plain-language prompt, answer clarifying questions, and download the results as XLSX, CSV, or JSON.

## Scope

Does not handle invoice creation, bill payment, or posting entries to an accounting ledger. Use for extracting structured data from uploaded documents only.

## Capabilities

- Upload invoice files in parts through an upload session with signed part URLs
- Submit an extraction that describes in plain words which fields to pull from the files
- Choose one row per invoice or one row per line item with the output_structure setting
- Answer the questions an extraction pauses to ask, then let it continue
- Read extracted rows as JSON with offset and limit, or fetch a download URL for XLSX, CSV, or JSON
- Check the account's credit balance before submitting a large batch

## Use cases

### AI bookkeeping agent turning invoices into rows

A developer's agent connected through Jentic finds the Invoice Data Extraction operations by intent and calls them with the API key injected at execution time. It uploads the invoices a user attached, submits an extraction asking for supplier, invoice number, date, and total, waits for it to finish, and hands back a spreadsheet, without the key ever entering the agent's context.

Example prompt: POST `/uploads/sessions` with an upload_session_id and files, complete each file's upload, POST /extractions with task_name 'October invoices', a prompt asking for supplier, invoice number, date, and total, and output_structure per_invoice, then poll GET `/extractions/{extraction_id}` until it completes

### Line-item extraction for accounts payable

Accounts payable teams need every line on every invoice, not just the totals. Setting output_structure to per_line_item returns one row per line item with the invoice-level fields repeated, so the rows drop straight into a spreadsheet or import file. A single extraction can reference many uploaded files through its file_ids list.

Example prompt: POST /extractions with output_structure per_line_item and a prompt asking for description, quantity, unit price, and amount, then GET `/extractions/{extraction_id}/output` with format csv

### Human-in-the-loop clarification

Real invoices are messy, and a silent guess produces wrong rows. With ask_questions enabled in the submission options, an extraction can stop and ask about something the documents leave unsettled, the caller posts answers, and processing continues from there.

Example prompt: When GET `/extractions/{extraction_id}` reports the extraction is waiting on questions, POST `/extractions/{extraction_id}/answers` with the answers the user gave

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/uploads/sessions` | Create an upload session |
| POST | `/uploads/sessions/{upload_session_id}/complete` | Complete a file's upload |
| POST | `/extractions` | Submit an extraction |
| GET | `/extractions/{extraction_id}` | Wait on an extraction's status |
| GET | `/extractions/{extraction_id}/results` | Get extracted rows as JSON |
| GET | `/extractions/{extraction_id}/output` | Get a download URL for an output file |
| POST | `/extractions/{extraction_id}/answers` | Answer an extraction's questions |

## Key resources

- **Upload sessions** — Create a session, get signed part URLs, complete files, or import files attached in an assistant conversation
- **Extractions** — Submit, list, wait on, cancel, delete, and answer questions on extractions
- **Results and output** — Extracted rows as JSON and download URLs for XLSX, CSV, or JSON output files
- **Credits** — The account's credit balance

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 66 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 55 / 100
  - Developer Experience & Jentic Compatibility: 70 / 100
  - AI-Readiness & Agent Experience: 54 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 87 / 100
- **View full report:** https://jentic.com/apis/invoicedataextraction.com/invoicedataextraction/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Invoice Data Extraction by hand means a bearer key, a multipart upload flow with signed part URLs and completion calls, and a long-poll on the extraction status before results are ready. Through Jentic you install once, import it from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Invoice Data Extraction puts the extraction id in the URL path (`/extractions/{extraction_id}/...`), so a rule can bound your agent to the operations it needs, such as reading results and downloads. You choose the operations it may call, so destructive ones like deleting or cancelling an extraction are not included unless you add them.
- **Credential handling:** Your Invoice Data Extraction API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'extract data from invoices' or 'download extraction results', and Jentic returns the matching Invoice Data Extraction operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Veryfi** — Receipt and invoice OCR with a fixed extraction schema
- **Mindee** — Document parsing APIs for invoices, receipts, and IDs
- **Rossum** — Transactional document processing with review queues
- **Xero Accounting** — Accounting ledger where extracted bills are recorded

## FAQ

### What authentication does the Invoice Data Extraction API use?

Per its OpenAPI spec, every operation uses bearer authentication: an API key created in the Invoice Data Extraction dashboard, sent as Authorization: Bearer with the key. A team admin's key sees the team's extractions by default. Through Jentic the key is stored by your own instance and attached at call time.

### Which output formats does the Invoice Data Extraction API support?

GET `/extractions/{extraction_id}/results` returns the extracted rows as JSON, paged with offset and limit. GET `/extractions/{extraction_id}/output` returns a fresh download URL for an output file, with format set to xlsx, csv, or json.

### Is the Invoice Data Extraction API free?

According to the OpenAPI spec, every account includes 50 free pages a month, and GET `/credits/balance` returns the account's remaining credits. Paid pricing is listed on the Invoice Data Extraction website.

### What are the rate limits for the Invoice Data Extraction API?

The OpenAPI spec does not specify numeric rate limits. Check the API reference at https://invoicedataextraction.com/docs/api for current limits.

### Is there an Invoice Data Extraction MCP server?

You don't need an MCP server to give your agent Invoice Data Extraction. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the upload, extraction, and download operations it needs, discovered on demand rather than loaded into its context.

### Can I limit what my agent is allowed to do with Invoice Data Extraction?

Yes. For example, write a rule that allows only GET `/extractions/{extraction_id}/results` and GET `/extractions/{extraction_id}/output`, so the agent can read and download finished extractions but cannot submit new ones that spend credits or delete existing ones, and every call it makes is logged.

### How do I extract invoice totals through Jentic?

Import the Invoice Data Extraction API from the Jentic API Directory and store your API key once. Your agent searches for 'extract data from invoices', uploads the files with POST `/uploads/sessions`, submits POST /extractions with a prompt naming the fields, and reads the rows when it completes. To run it on your own infrastructure, install Jentic One from its GitHub repo.
