This document introduces how to create review tasks via REST API. Creating a review task requires specifying a rule repository and a list of extraction task IDs. The system will automatically match rules in the rule repository with extraction tasks and execute review for matched rules.
A review task is one execution of applying a rule repository to extraction tasks. After creating a review task, the system will automatically execute the review and generate review results.
The rule repository ID is the identifier of the review rule repository you created. The system will use all rules in this repository to review extraction tasks.Getting Rule Repository ID:
Extraction task ID is the identifier of a task that has completed document extraction. Only tasks that have completed extraction can be used as review objects.Important Notes:
If a parent task ID is provided (e.g., a parent task generated by file split or multi-image crop), the system will automatically retrieve all child tasks of that parent task as input
If both batch_number and extract_task_ids are provided, the system will merge all tasks from the batch with extract_task_ids (with automatic deduplication)
Getting Extraction Task ID:
From the task_id returned by the file upload interface
From the file query interface (/api/app-api/sip/platform/v2/file/fetch) to get file information, where task_id is the extraction task ID
Batch number is used to specify tasks for review in batches. When batch_number is provided, the system will retrieve all tasks under that batch for review.Use Cases:
Batch review of all files uploaded in the same batch
Combined with extract_task_ids for more flexible task selection
Extraction Task Status: Only tasks that have completed extraction (recognition_status == 1) can be used as review objects
Parent Task Handling: If a parent task ID is provided (e.g., a parent task generated by file split or multi-image crop), the system will automatically retrieve all child tasks of that parent task as input for review
Batch Number and Task ID Combination: If both batch_number and extract_task_ids are provided, the system will merge all tasks from the batch with extract_task_ids (with automatic deduplication)
Rule Matching: The system will match rules based on the rule’s category_ids and the extraction task’s categories. Only matched rules will execute review
Field Association: Ensure that fields referenced by rules exist in extraction results, otherwise it may affect review accuracy
Asynchronous Execution: Review tasks are executed asynchronously. After creating a task, you need to query review status and results via the Get Review Results interface