Prerequisites
Before you begin, ensure you have:- A Documind account with available credits
- An API key (see Authentication)
- A document to process (PDF, JPG, JPEG, PNG, TIFF, or BMP)
Complete Example
This guide walks through a complete extraction workflow: upload -> extract -> handle results.1
Upload Document
Upload your document and receive a document ID.Response:
2
Define Extraction Schema
Create or generate a JSON schema defining what data to extract.
- Manual Schema
- Generate from Sample
Invoice Schema
3
Extract Data
Process the document with your schema.Response:
4
Handle Review Workflow
If
needs_review is true, implement polling to wait for human review.Your automation now handles both immediate results and reviewed data seamlessly!
Extraction Mode Comparison
Choose the right mode for your use case:- Basic (Fastest)
- VLM (Balanced)
- Advanced (Most Accurate)
Best for: Simple documents, high-volume processing
Request
- Fastest processing
- Single model
- No confidence scores
- No automatic review flagging
Common Patterns
Batch Processing
Submit multiple uploaded documents as one asynchronous batch, then poll for aggregate status:Python
Error Handling
Handle common error scenarios:Python
Check Credits Before Processing
Avoid failures by checking credits first:Python
Testing Your Integration
Use these test scenarios:- Simple Document: Single-page invoice with clear text
- Complex Layout: Multi-column form or table
- Poor Quality: Scanned or low-resolution image
- Edge Cases: Missing fields, unusual formats
Next Steps
Extraction Flow
Deep dive into the complete extraction workflow
Review Polling
Advanced patterns for handling reviews in automation
Data Endpoints
Query and filter extraction results
Error Handling
Robust error handling strategies