Tasks retrieval

How to retrieve tasks

The Tasks Retrieval feature of the Koncile API allows you to monitor the real-time status of tasks related to the processing of submitted documents. This feature is essential for integrating automated tracking into your workflows, ensuring optimal management of documents and extracted information.

When you submit a document to Koncile, it is processed in the background. Using the dedicated Tasks Retrieval endpoint, you can:

Check the status of a specific task, whether it is completed (DONE), in progress (IN PROGRESS), duplicate (DUPLICATE), or failed (FAILED).

Access general extracted information, such as dates, prices, and supplier names, through structured fields.  

Retrieve detailed line-level data for more precise and granular processing.  

To query a specific task via the Koncile API, use the following command. This cURL command allows you to retrieve the status and associated data of a given task using its `task_id`. Be sure to replace `{task_id}` with the task ID and `$API_KEY` with your personal authentication key.

curl api.koncile.ai/tasks/{task_id}/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY"

Detailed Response Schema (Returned Schemas)

The API returns a JSON structure containing all the necessary information to analyze the status and extracted data of a task. The response is organized into two main sections:  

1. General_fields: Groups the global data extracted from the document, such as the date, total price, and supplier.  

2. Line_fields: Contains detailed line-level information, allowing for a more granular analysis of individual elements.  

Below, you will find the exact schema of the response, with the various available fields, their types, and examples of values. This structured format makes it easy to integrate the data into your systems or workflows.

{
	"status": DONE | DUPLICATE | IN PROGRESS | FAILED,
	"document_id": ID,
	"status_message": "",
	"General_fields":
		{
			"Date" : "05/08/20222",
			"Price" : "23$",
			"Supplier name" : "Koncile",
		}
	,
	"Line_fields":
		{
			"Date" : ["05/08/2022", "05/09/2022", "03/02/2023"],
			"Price" : ["23$", "12$", "5$"],
			"Supplier name" : ["Koncile", "Koncile", "Koncile"]
		}
}

Ilya Firsov

Product Designer

Related questions

No items found.