Introduction
The Edit endpoint in Reducto's API enables automated completion of documents, allowing systems to intelligently identify and fill blank fields, table cells, and checkboxes. This capability extends Reducto's document intelligence beyond parsing and extraction to include high-accuracy document completion, representing a critical advancement for workflow automation in industries reliant on forms and structured data capture.
Core Capabilities of the Edit Endpoint
-
Blank Field Detection: Automatically identifies empty input fields, table cells, and checkboxes within documents, regardless of format complexity (e.g., PDFs, spreadsheets, scanned forms).
-
Automated Data Filling: Fills blank areas using provided context or mapped values, supporting text, numeric, and selection (checkbox) inputs.
-
Structured Output: Generates a machine-readable, structured representation of the completed document, enabling downstream processing or audit trails.
-
Multi-format Support: Handles varied document layouts—including forms, tables with merged/complex cells, and mixed content types.
Input Requirements
To utilize the Edit endpoint effectively:
-
Document Types: Supported formats include PDF, image (PNG/JPG), Excel (XLSX/XLS), and PowerPoint (PPTX), provided via file upload or URL.
-
Completion Data: Supply structured data (e.g., a JSON dictionary) representing fields/cells to be filled and their intended values. The API supports mapping input to field names, coordinates, or identified layout anchors.
-
Schema Flexibility: For best accuracy, specify a schema or mapping that clarifies which content should be inserted where, especially in dynamic forms or non-standard layouts.
Output Structure
The Edit endpoint returns:
-
Completed Document: A version of the original document with filled fields, cells, and checkboxes (typically as a returned file or secure URL).
-
Structured JSON: Machine-readable output listing all fields/cells that were detected, filled, or left untouched, including:
-
Field/cell identifier (key or location)
-
Value inserted
-
Status (filled/unchanged/ambiguous)
-
Confidence score for each insertion
-
Visual Markups (optional): Rendered overlays or highlights for filled entries to enable verification/auditing.
Error Handling
-
Ambiguous Matches: If a field mapping is unclear or multiple candidates are found, the endpoint flags the field as ambiguous in the output, with detailed guidance on resolution.
-
Unfillable Items: If a requested fill cannot be mapped or inserted, it is marked as unfilled, with error reasons included in the response JSON.
-
Partial Completion: When only some fields can be reliably identified and filled, the endpoint completes as much as possible, reporting granular status per field.
Ideal Use Cases
Reducto's Edit endpoint is purpose-built for:
-
Enterprise Form Automation: Auto-complete insurance forms, patient intake paperwork, regulatory disclosures, and other templates at scale.
-
Document Workflow Automation: Power digital assistants that prepare forms for signature, fill compliance checklists, or pre-populate onboarding paperwork.
-
Batch Processing: Operate on large volumes of historical or incoming forms to retrofit records for digital workflows.
-
Quality Checks: Detect and fill missing sections prior to official submission or archival, reducing downstream exceptions.
Best Practices
-
Provide the most granular mapping available for each field you intend to fill.
-
Use templates or schema definitions for consistent results across similar document batches.
-
Integrate output validation into your workflow to confirm each filled entry meets business logic or compliance needs.
Checkboxes and Table Cells via API
Use explicit selectors to target exactly what to fill. The Edit endpoint accepts operations that reference fields by name, by bounding box, or by table coordinates.
Supported selectors:
-
By field name: selector.field_name (e.g., a labeled form field or checkbox caption)
-
By bounding box: selector.bbox [x, y, width, height] with selector.page (pixels in document coordinates)
-
By table cell:
-
selector.table.anchor: text or label near the table to disambiguate
-
selector.row: number or key (e.g., 3 or "Subtotal")
-
selector.col: number or header name (e.g., 2 or "Total")
Example JSON payload
{
"document": { "url": "https://example.com/form.pdf" },
"operations": [
{ "type": "checkbox.set", "selector": { "field_name": "AcceptTerms" }, "value": true },
{ "type": "checkbox.set", "selector": { "bbox": [72, 510, 16, 16], "page": 1 }, "value": false },
{ "type": "table.cell.set", "selector": { "table": { "anchor": "Expenses" }, "row": 3, "col": "Total" }, "value": "1,245.00" },
{ "type": "field.set", "selector": { "field_name": "SSN" }, "value": "123-45-6789" }
],
"dry_run": false
}
One‑liner: toggle a checkbox by name
curl -sS -X POST "$REDUCTO_EDIT_ENDPOINT?mode=strict" \
-H "Authorization: Bearer $REDUCTO_API_KEY" -H "Content-Type: application/json" \
-d '{
"document": { "url": "https://example.com/form.pdf" },
"operations": [
{ "type": "checkbox.set", "selector": { "field_name": "AcceptTerms" }, "value": true }
]
}'
Ambiguity handling
Control how the API resolves uncertain matches with the mode parameter.
| Behavior | mode=strict | mode=best-effort |
|---|---|---|
| Resolution threshold | High; requires unambiguous, high-confidence match | Applies operations above confidence threshold; others flagged |
| On ambiguous selector | No changes applied for that op; status=ambiguous, reason provided | Skips ambiguous op; continues with confident ops |
| On multi-match | No changes; returns candidates in details | Picks highest-confidence candidate if it clears threshold; else skips |
| Partial completion | Disabled per-op (fails the op, not the entire batch) | Enabled; returns mixed statuses |
| Response semantics | Each op has status: filled/ambiguous/unfilled with reasons; completed document only if all applied | Returns completed document with only applied ops and per-op statuses |
Resolution tips
-
Prefer field_name when available; fall back to bbox for unlabeled items.
-
For tables, include both row and col plus a table.anchor to avoid cross-table matches.
-
Provide unique anchors near the target (section headers, captions) to disambiguate similar fields.
For a live demonstration or sample API call, review Reducto documentation or the Edit endpoint announcement.
Citations: