Lodol Docs

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

ParameterTypeRequiredDescription
document_idstringYesThe 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

ParameterTypeRequiredDescription
inbox_idstringYesThe ID of the inbox to list documents from
pagenumberNoPage number for pagination
from_datestringNoFilter documents from this date (YYYY-MM-DD)
to_datestringNoFilter documents to this date (YYYY-MM-DD)
statusstringNoFilter by document status (e.g. parsed, fail, new)
querystringNoSearch 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

ParameterTypeRequiredDescription
inbox_idstringYesThe ID of the inbox to upload the document to
file_urlstringNoURL of the document file to upload (alternative to file_path)
file_pathstringNoUploaded file reference to upload (alternative to file_url).
metadataobjectNoOptional metadata to attach to the document

Response

{
  "document_id": "doc-abc123",
  "status": "success"
}

On this page