Skip to main content
After DocIntell processes your document, you receive two types of results: classification (what type of document it is) and extraction (the actual data pulled from the document). This guide explains how to retrieve and understand these results.

What You Get After Processing

Once a document completes processing (status: completed), you have access to:
  1. Classification - What type of document was detected and why
  2. Extraction - The actual data extracted from the document
  3. Field Metadata - Confidence scores, page numbers, and source locations for each field
  4. Validation Results - Whether the extraction passed validation rules

Getting Full Extraction Results

Use GET /v1/jobs/{job_id}/results to retrieve the complete extraction output for a job:
When to use /results vs /documents/{id}/data:
  • Use /jobs/{job_id}/results for full extraction output with all metadata
  • Use /documents/{id}/data for filtered data based on your custom views (see Views Guide)

Understanding Classification

The classification tells you what type of document was detected and why.

Classification Fields

document_type
string
required
The detected document type code (e.g., invoice, capital_call, k1)
confidence
number
required
Classification confidence score from 0.0 to 1.0 (higher is more confident)
reasoning
string
required
1-2 sentence explanation of why this type was chosen
citation
string
Direct quote from the document that supports the classification
citation_page
integer
Page number where the citation was found (1-indexed)

Example Classification

DocIntell uses a multi-stage classification process:
  1. Visual analysis - Layout, headers, and document structure
  2. Text analysis - Key phrases, terminology, and language patterns
  3. Template matching - Common document formats (W-9, K-1, invoices, etc.)
The confidence score reflects how strongly the document matches the identified type. Scores above 0.90 are typically very reliable.

Understanding Extracted Data

The extraction contains the actual data pulled from your document.

Extraction Fields

document_type
string
required
Document type (matches classification)
page_count
integer
Number of pages in the document
extraction_model
string
LLM model used for extraction (e.g., google-vertex:gemini-2.5-flash)
processing_time_ms
integer
How long extraction took in milliseconds
data
object
required
The extracted fields as key-value pairs. Field names are in snake_case.
field_metadata
object
Per-field metadata including confidence scores, page numbers, and source locations
validation
object
Validation results with hard/soft violations

Example Extraction (Invoice)

Understanding Field Metadata

Field metadata provides provenance and confidence information for each extracted field.
confidence
number
Self-reported confidence from the LLM (0.0 to 1.0). Directionally useful but not calibrated - a 90% confidence does not mean 90% accuracy.
page_number
integer
Page where the value was found (1-indexed). Useful for manual verification.
location_hint
string
Qualitative description of where on the page (e.g., “top header”, “in summary table”, “footer”)
raw_text
string
The original text as it appeared in the document before parsing

Example Field Metadata

Confidence Score Guidelines:
  • 0.95+ - Very high confidence (rarely wrong)
  • 0.85-0.94 - High confidence (generally reliable)
  • 0.70-0.84 - Moderate confidence (worth verifying)
  • Below 0.70 - Low confidence (manual review recommended)

Understanding Validation Results

Validation checks whether the extracted data meets expected constraints.

Validation Types

  1. Hard Violations - Critical errors that indicate extraction failure
  2. Soft Violations - Warnings that may require attention but don’t fail the extraction
is_valid
boolean
required
true if all hard constraints passed, false if any hard violations exist
hard_violations
array
List of critical validation failures
soft_violations
array
List of warnings or optional field issues

Example Validation (Passing)

Example Validation (Failing)

When is_valid is false, the extracted data may be incomplete or unreliable. Review hard_violations to understand what went wrong.

Complete Example: Invoice

Here’s a full response for an invoice extraction:

Complete Example: Capital Call

Here’s a full response for a capital call extraction:

Error Handling

Job Not Completed

If you try to get results before the job completes:
HTTP Status: 400 Bad Request Fix: Wait for the job to complete or use webhooks for notifications.

Job Not Found

HTTP Status: 404 Not Found Possible Causes:
  • Job ID does not exist
  • Job belongs to a different tenant
  • Typo in the job ID

Best Practices

Check Confidence Scores

Review field-level confidence scores for critical data. Fields with low confidence may need manual verification.

Use Page Numbers

The page_number and location_hint help you quickly locate and verify extracted values in the original PDF.

Handle Soft Violations

Soft violations are warnings, not errors. They may indicate missing optional fields or minor inconsistencies.

Log Validation Failures

When is_valid is false, log the hard_violations for debugging and quality monitoring.

Next Steps

Views Guide

Learn how to create custom views to filter extracted data

Webhook Setup

Get notified when extraction completes

Document Types

Browse all supported document types and their schemas

Error Handling

Handle extraction failures gracefully