Airparser
API actions for the Airparser integration.
Airparser
Parse documents into structured data using Airparser's API-driven extraction.
Get parsed document
Retrieve the parsed/extracted data for a specific document.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | string | Yes | The ID of the document to retrieve |
Response
{
"document": {
"_id": "doc-001",
"data": {
"date": "2024-01-15",
"invoice_number": "INV-2024-001",
"total": 1234.56
},
"status": "parsed"
},
"status": "success"
}List documents
List documents in an Airparser inbox with optional filters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
inbox_id | string | Yes | The ID of the inbox to list documents from |
page | number | No | Page number for pagination |
from_date | string | No | Filter documents from this date (YYYY-MM-DD) |
to_date | string | No | Filter documents to this date (YYYY-MM-DD) |
status | string | No | Filter by document status (e.g. parsed, fail, new) |
query | string | No | Search query to filter documents |
Response
{
"documents": [
{
"_id": "doc-001",
"created_at": "2024-01-15T10:00:00Z",
"status": "parsed"
},
{
"_id": "doc-002",
"created_at": "2024-01-16T11:00:00Z",
"status": "parsed"
}
],
"status": "success"
}List inboxes
List all inboxes in the Airparser account.
Response
{
"inboxes": [
{
"_id": "inbox-001",
"email": "invoices@inbox.airparser.com",
"name": "Invoices"
},
{
"_id": "inbox-002",
"email": "receipts@inbox.airparser.com",
"name": "Receipts"
}
],
"status": "success"
}Upload document
Upload a document to an Airparser inbox for parsing.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
inbox_id | string | Yes | The ID of the inbox to upload the document to |
file_url | string | No | URL of the document file to upload (alternative to file_path) |
file_path | string | No | Uploaded file reference to upload (alternative to file_url). |
metadata | object | No | Optional metadata to attach to the document |
Response
{
"document_id": "doc-abc123",
"status": "success"
}