Integration Overview

Complete guide to integrating Doc-Vision via REST API, Email, and Webhooks for automated document extraction

What is the Doc-Vision API?

The DocVision API lets you programmatically upload documents, retrieve AI-extracted structured data, and manage your document pipeline. Whether you're building an automated accounts payable workflow, a document processing microservice, or connecting to an ERP system, the API provides everything you need.

Key benefits:

  • No templates required - AI automatically understands document structure
  • Multi-format support - PDF, images, Excel, CSV files accepted
  • Structured JSON output - Clean data ready for your downstream systems
  • 50+ languages - Automatic language and currency detection
  • 99.8% accuracy - Enterprise-grade extraction with Vision OCR+ models

Integration Methods

DocVision offers three ways to integrate with your documents:

MethodBest ForSetup Time
REST APIProgrammatic integrations, automation pipelines5 minutes
EmailManual forwarding, email-based workflows1 minute
WebhooksReal-time notifications when processing completes10 minutes

Quick Start

Get up and running in under 5 minutes:

1. Get your credentials from Organization Settings - you'll need your webhookId and optionally a webhook secret.

2. Upload a document:

curl -X POST https://app.doc-vision.com/api/webhook/{webhookId}/document/upload \
  -H "Authorization: {your-webhook-secret}" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/invoice.pdf"}'

3. Poll for results (or use webhook callbacks):

curl "https://app.doc-vision.com/api/webhook/{webhookId}/document/get?docId={documentId}" \
  -H "Authorization: {your-webhook-secret}"

4. Get structured JSON with all extracted fields and line items.

For a complete working example with error handling and polling logic, see the Upload + Polling Example.

API Endpoints

The API provides three core endpoints for document management:

1. Upload Document

POST /api/webhook/{webhookId}/document/upload

Upload documents via URL (recommended), multipart form data, or base64. The endpoint returns a documentId immediately - extraction happens asynchronously.

Show example
curl -X POST https://app.doc-vision.com/api/webhook/{webhookId}/document/upload \
  -H "Authorization: {your-webhook-secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/documents/invoice.pdf"
  }'

View full Upload API documentation →

2. Get Document

GET /api/webhook/{webhookId}/document/get?docId={docId}

Retrieve document status and extracted data by document ID. Returns extraction status, header fields, and line item tables.

Show example
curl "https://app.doc-vision.com/api/webhook/{webhookId}/document/get?docId=doc_abc123xyz" \
  -H "Authorization: {your-webhook-secret}"

View full Get API documentation →

3. Delete Document

POST /api/webhook/{webhookId}/document/delete

Permanently delete a document and all associated data including extracted fields, search index entries, and files.

Show example
curl -X POST https://app.doc-vision.com/api/webhook/{webhookId}/document/delete \
  -H "Authorization: {your-webhook-secret}" \
  -H "Content-Type: application/json" \
  -d '{
    "docId": "doc_abc123xyz"
  }'

View full Delete API documentation →

Authentication

Document Processing Pipeline

When you upload a document, it goes through an automated AI-powered pipeline:

  1. Upload - File is received and stored securely
  2. Classification (PARTIAL) - AI identifies the document type (invoice, receipt, bank statement, etc.)
  3. Extraction (EXTRACTED) - AI extracts all fields and line items based on your Extraction Template
  4. Indexing (INDEXED) - Extracted data is indexed for search and the document is ready

Average processing time is 30 seconds per page. You can check the status by polling the Get API or by setting up Webhook Callbacks for automatic notifications.

Supported File Types

FormatTypesNotes
PDFAny PDF documentScanned and digital PDFs supported
ImagesJPG, JPEG, PNG, GIF, WebP, TIFFPhotos of documents work too
SpreadsheetsXLS, XLSX, XLSM, CSVAuto-converted to CSV text format

Best Practices

  • Use URL uploads (recommended) for better reliability and larger file support
  • Implement polling with exponential backoff - start at 5 seconds, poll every 10 seconds (see Upload + Polling Example)
  • Set up Webhook Callbacks instead of polling for high-volume integrations
  • Use HTTPS for all API calls in production
  • Store secrets securely - never commit webhook secrets to version control
  • Handle errors gracefully - implement retry logic for transient failures

Common Integration Patterns

Accounts Payable Automation

Upload invoices via API, extract vendor details, line items, and amounts, then push structured data to your ERP or accounting system.

Email-to-Data Pipeline

Forward emails with document attachments to your organization email address, receive extracted data via webhook callbacks.

Document Classification Service

Upload documents of unknown types - DocVision automatically classifies them and applies the correct Extraction Template.

Frequently Asked Questions

How long does extraction take?

Average processing time is 30 seconds per page. Complex multi-page documents may take longer. See FAQ for details.

What accuracy can I expect?

Vision OCR+ MAX achieves 99.8% accuracy on average. See Pricing for model comparison.

Can I process documents in bulk?

Yes. Upload multiple documents in parallel - each upload returns immediately with a documentId. Use polling or webhooks to collect results.

What languages are supported?

50+ languages with automatic detection. No configuration needed.

Next Steps