The Docaffair Manual
Everything you need to know about automating your document workflows, from your first upload to deep technical integrations with Airtable, Google Sheets, and custom APIs.
Introduction
Docaffair is an intelligent document processing (IDP) platform. Unlike standard OCR which only "seeds" text, Docaffair uses advanced AI to understand the content. It identifies vendors, dates, line items, and taxes with human-level accuracy.
This manual covers the entire ecosystem: how to use the dashboard, how to configure integrations, and how to build on top of our REST API.
The Start-to-Finish Journey
1. Upload
Securely upload PDFs or Images via Dashboard or API.
2. AI Parse
Our LLM-powered engine extracts structured data instantly.
3. Review
Verify accuracy and mapping in the visual editor.
4. Export
Sync data to Airtable, Sheets, or your custom DB.
Upload & AI Parsing
Supported File Formats
We support high-resolution PDF, PNG, JPEG, and WebP files. For best results, ensure documents are not overly blurred and have a minimum resolution of 150 DPI.
How AI Parsing Works
Once uploaded, the document enters our extraction pipeline. Our AI identifies "anchors" (like "Total", "VAT No", "Date") and extracts the associated values. It also handles complex table structures, mapping line items to individual rows.
Note: Files larger than 10MB should be compressed before upload for optimal processing speed.
Template Management
While our AI is great at auto-detection, Templates allow you to enforce a specific schema for recurring documents.
Pro Tip
Use templates to map custom field names that match your internal database or accounting software.
Review & Validation
After parsing, documents appear in the Review Queue. This is where you can manually adjust any fields or confirm the AI's confidence.
- Field Validation: Click any field to see the source area highlighted in the document viewer.
- Confidence Scores: Fields with low confidence are highlighted in yellow or red.
- Status: Documents remain in "Pending Review" until you click "Verify".
Integration Deep Dives
Step-by-step technical guides to connecting your favorite tools.
Airtable Connection Guide
Advanced Setup1Generating a Personal Access Token (PAT)
- Log in to your Airtable Account.
- Navigate to Developer Hub .
- Click + Create new token.
- Scopes: You MUST add
data.records:readanddata.records:write. - Access: Select the specific Base you want to use, or "All current and future bases".
- Copy the token—this is the only time you will see it!
2Locating your Base ID
Open the Airtable API Directory and select your base. The Base ID is a string starting with app found in the introduction section of that base's documentation.
3Table Name
This is the exact name of the table tab in your Airtable interface (e.g., "Invoices" or "Expenses"). It is case-sensitive.
How it works
When you save a document in Docaffair, we send a POST request to https://api.airtable.com/v0/[BASE_ID]/[TABLE_NAME]. Your Airtable columns must match the field names exported by Docaffair (e.g., a column named "Total" for the total field).
Google Sheets Connection
Required Information
- Sheet URL: The full URL from your browser address bar (e.g.,
https://docs.google.com/spreadsheets/d/1abc.../edit). - Sheet Name: The name of the tab at the bottom of the document (default is "Sheet1").
Important: Docaffair will append data to the first empty row. Ensure your header row matches the field names you've mapped in the Export settings.
Zapier Catch Hook Setup
Zapier allows you to connect Docaffair to thousands of other apps without writing code.
1. Create a New Zap
Choose Webhooks by Zapier as the Trigger app and select Catch Hook.
2. Copy the Webhook URL
Zapier will provide a unique URL. Paste this into the Zapier Integration field in the Docaffair Dashboard.
3. Test & Map
Upload a document to Docaffair. In Zapier, click "Test Trigger" to see the real fields (total, date, vendor) and map them to your destination app.
Custom Webhooks (Developer)
Webhooks are the most powerful way to integrate Docaffair directly into your backend.
Payload Security
When you configure a webhook, you can specify a Secret Key. Every request we send will include a X-Docaffair-Signature header. Use this to verify that the request originated from us.
{
"event": "document.parsed",
"document_id": "doc_882910",
"data": {
"vendor": "DigitalOcean",
"amount": 24.00,
"currency": "USD",
"tax_total": 4.00,
"line_items": [...]
}
}Developer Reference
Build custom tools powered by the Docaffair engine.
Authentication
Generate your API keys in the Settings > Developers tab. Treat these like passwords.
Warning: Never commit your API keys to public repositories like GitHub. Use environment variables.
curl -H "Authorization: Bearer sk_live_your_key_here" https://api.docaffair.com/v1/me
Core Endpoints
Upload and Parse
Upload a binary file using multipart/form-data.
Retrieve Data
Fetch the JSON result of a processed document by its unique ID.
Error Handling
| Code | Condition | Suggested Action |
|---|---|---|
| 400 | Bad Request | Check file format or missing parameters. |
| 401 | Unauthorized | Verify your API key is active. |
| 429 | Too Many Requests | Implement exponential backoff logic. |