For tasks that have completed extraction, you can use the extract specific fields API to extract additional fields or re-extract individual existing fields for the task. This API returns the complete extraction results of all fields.Documentation Index
Fetch the complete documentation index at: https://docs-docflow.textin.com/llms.txt
Use this file to discover all available pages before exploring further.
Features
- Extract Additional Fields: Add new field extraction for tasks that have completed extraction
- Re-extract Fields: Re-extract existing fields, which can be used to correct or optimize extraction results
- Support Table Fields: Can extract specific fields from tables
- Return Complete Results: Returns complete extraction results of all fields, with the same structure as
/api/app-api/sip/platform/v2/file/fetch
Field Extraction Rules
The API adopts different extraction strategies based on whether the field exists in the original classification configuration:Additional Fields (Fields Not in Original Results)
For fields that do not exist in the original extraction results (additional fields), the system will use theprompt provided in the request for extraction:
- If a
promptis provided in the request, it will be used to guide field extraction - If no
promptis provided in the request, the default extraction logic will be used
Configured Fields (Fields Already in Original Classification)
For fields that already exist in the original classification configuration, the system will prioritize using the settings from the classification configuration for extraction:- Use the
promptfrom the classification configuration (if configured) - Apply post-processing rules from the classification configuration
- Ignore the
promptparameter passed in the request
Usage Recommendations
- Extract New Fields: Provide a
promptin the request, and the system will use thatpromptfor extraction - Re-extract Existing Fields: Simply specify the
key, and the system will automatically use the rules from the classification configuration; no need to provide apromptin the request
API Endpoint
Endpoint:POST /api/app-api/sip/platform/v2/file/extract_fields
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace_id | string | Yes | Workspace ID |
| task_id | string | Yes | Task ID |
| fields | array | No | List of fields to extract, each field contains key (field name) and prompt (field hint, optional) |
| tables | array | No | List of table fields to extract, each table contains name (table name) and fields (field list) |
Field Structure
ExtractFieldReqVO:Example Code
Request Examples
Extract Basic Fields Only
Extract Table Fields Only
Extract Both Basic Fields and Table Fields
Return Data Example
Notes
- Task Status: This API is only applicable to tasks that have completed extraction (
recognition_statusis 1 or 2) - Field Name: The
keyfield name needs to match the field name in the configured field template (for configured fields) or use a custom name (for additional fields) - Field Hint (prompt):
- For additional fields (not in original results),
promptwill take effect and can be used to guide extraction logic - For configured fields (already in original classification),
promptwill be ignored, and the system will use rules from the classification configuration
- For additional fields (not in original results),
- Return Results: The API returns complete extraction results of all fields, including previously extracted fields and newly extracted fields
- Table Name: The
nameintablesneeds to match the actual table name in the document
Related Pages
- Quick Start - Quick start guide for document extraction functionality
- Basic Field Information - Basic field information structure and processing methods
- Table Field Information - Table field information structure and processing methods

