> For the complete documentation index, see [llms.txt](https://docs.mindee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindee.com/v1/off-the-shelf-products/financial-documents-ocr.md).

# Financial Documents OCR

## Overview

The Financial Document API is ideal for applications where you might receive both invoices and receipts and want a single integration point. The core functionality of this API involves a two-step process:

1. **Document Classification:** Upon receiving a document, the API first analyzes it to determine whether it is an invoice or a receipt.
2. **Intelligent Routing:** Based on the classification, the document is then automatically routed to the appropriate underlying API for detailed information extraction.

This approach simplifies your integration by eliminating the need to pre-classify documents on your end and choose which specific API to call.

## Underlying APIs

The Financial Document API leverages the capabilities of our dedicated Invoice and Receipt APIs. Once a document is classified, it is processed by one of these APIs. You can find their respective documentation here:

* [Invoice API Documentation](/v1/off-the-shelf-products/invoice-ocr.md)
* [Receipt API Documentation](/v1/off-the-shelf-products/receipt-ocr.md)

Understanding the specific functionalities and responses of these underlying APIs can be helpful when working with the Financial Document API.

## Financial Documents Data Fields Summary

### Field-by-Field Explanation

This section provides details about specific fields within the Financial Document API response and highlights how their behavior **might differ based on whether the processed document was classified as an invoice or a receipt.**

### Category & Subcategory

The `category` field in the API response provides information about the type of the financial document. However, its interpretation **depends on the document type:**

* **Invoice:** For documents classified as invoices, the category field \*\*will always return \*\*the value `miscellaneous`. This is because our primary invoice processing focuses on extracting key financial details rather than granular categorization.
* **Receipt:** For documents classified as receipts, the category field reflects the output of our dedicated receipt categorization model. This model analyzes the receipt content to determine the specific category (e.g., `toll`, `food`, `parking`, `transport`, `accommodation`, `gasoline`, `telecom`, `miscellaneous`.).

### Due Date

The `due_date` field represents the expected payment date for a financial document. However, its source and meaning differ slightly between invoices and receipts:

* **Invoice:** For invoices, the `due_date` field accurately reflects the **actual due date** explicitly stated on the invoice document. Our system extracts this information to provide you with the correct payment deadline.
* **Receipt:** Receipts generally do not have a concept of a formal "due date." In the context of our Financial Document API, when a receipt is processed, the **date of the transaction** (the date printed on the receipt) is copied into the `due_date` field. This is done to maintain consistency across the API response structure. Therefore, for receipts, the `due_date` essentially represents **the transaction date, not a payment deadline.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mindee.com/v1/off-the-shelf-products/financial-documents-ocr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
