Skip to main content

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:

  1. PROCESSING - Task is being actively processed by the system
  2. REVIEWING - Task is ready for human review or API interaction
  3. COMPLETED - Task has been completed and moved to the next pipeline step
  4. FAILED - Task processing encountered an error
  5. DISCARDED - Task was intentionally removed from the pipeline
  6. FILTERED - Task was automatically filtered out based on rules

Common Workflows

Quality Control Workflow

  1. Use GET /task/{id} to retrieve task details
  2. If quality issues are found, use POST /task/{id}/report to flag them
  3. Either fix and POST /task/{id}/complete or PUT /task/{id}/discard

Correction Workflow

  1. Use PUT /task/{id}/unlock to unlock a completed task
  2. Make necessary corrections
  3. Use POST /task/{id}/complete to reprocess with corrected data

Batch Processing Workflow

  1. Retrieve multiple tasks from uploads
  2. Process each task programmatically
  3. Use POST /task/{id}/complete with extracted data
  4. Handle errors with POST /task/{id}/report or PUT /task/{id}/discard

Authentication & Permissions

All task endpoints require API key authentication with appropriate scopes:

  • task.read - Required for GET operations
  • task.edit - Required for all modification operations (unlock, complete, discard, report)

Error Handling

The API returns standard HTTP status codes:

  • 200 OK - Operation successful
  • 201 Created - Resource created (for reports)
  • 400 Bad Request - Invalid request or task state
  • 401 Unauthorized - Invalid API key
  • 404 Not Found - Task not found
  • 207 Multi-Status - Partial success (for reports with external API issues)

Next: Get Task →