Task Management API
The Task Management API allows you to interact with individual tasks in your processing pipeline. Tasks represent individual documents or pieces of work that go through various processing steps like extraction, classification, segmentation, or grouping.
Available Endpoints
Get Task
GET /v2/{team_id}/project/{project_id}/task/{task_id}
Retrieve detailed information about a specific task, including its current status, processing step, and metadata.
Unlock Task
POST /v2/{team_id}/project/{project_id}/task/{task_id}/unlock
Unlock a completed task to allow editing. Only finalized tasks (COMPLETED, DISCARDED, FILTERED) that have not been exported and whose upload is not fully processed can be unlocked.
Complete Task
POST /v2/{team_id}/project/{project_id}/task/{task_id}/complete
Mark a task as complete and proceed to the next step in the processing pipeline. The system automatically validates the task using the same logic as auto-processing. Only tasks in REVIEWING state can be completed.
Discard Task
POST /v2/{team_id}/project/{project_id}/task/{task_id}/discard
Remove a task from the processing pipeline by marking it as discarded. This action can only be performed on tasks in REVIEWING state and is useful for low-quality documents or irrelevant content.
Report Task
POST /v2/{team_id}/project/{project_id}/task/{task_id}/report
Report an issue with a task, such as poor document quality or processing errors. This helps with quality control and issue tracking.
Task Lifecycle
Tasks flow through several states during processing:
- PROCESSING - Task is being actively processed by the system
- REVIEWING - Task is ready for human review or API interaction
- COMPLETED - Task has been completed and moved to the next pipeline step
- FAILED - Task processing encountered an error
- DISCARDED - Task was intentionally removed from the pipeline
- FILTERED - Task was automatically filtered out based on rules
Common Workflows
Quality Control Workflow
- Use
GET /task/{id}to retrieve task details - If quality issues are found, use
POST /task/{id}/reportto flag them - Either fix and
POST /task/{id}/completeorPUT /task/{id}/discard
Correction Workflow
- Use
PUT /task/{id}/unlockto unlock a completed task - Make necessary corrections
- Use
POST /task/{id}/completeto reprocess with corrected data
Batch Processing Workflow
- Retrieve multiple tasks from uploads
- Process each task programmatically
- Use
POST /task/{id}/completewith extracted data - Handle errors with
POST /task/{id}/reportorPUT /task/{id}/discard
Authentication & Permissions
All task endpoints require API key authentication with appropriate scopes:
task.read- Required for GET operationstask.edit- Required for all modification operations (unlock, complete, discard, report)
Error Handling
The API returns standard HTTP status codes:
200 OK- Operation successful201 Created- Resource created (for reports)400 Bad Request- Invalid request or task state401 Unauthorized- Invalid API key404 Not Found- Task not found207 Multi-Status- Partial success (for reports with external API issues)