File Uploading

File upload is a key step to initiate data processing in Koncile. This endpoint allows you to send files for analysis while specifying the necessary parameters, such as the folder identifier (folder_id) and the extraction template (template_id). Once the file is uploaded, the API returns a list of task IDs (task_ids), corresponding to the individual processes associated with your file.

Upload file

POSThttps://api.openai.com/v1/upload_file

Upload a list of files to the koncile api

Path parameters

Folder_id Integer Required The id of the folder in which the document will be stored

Template_id Integer Required The id of the template containing the fields to extract

Doc_id Integer Optional The id from the document the uploaded file will complete. For more informations check the Amendment logic.

Request body

Files files Required The list of File object (not file name) to be uploaded.

Returns

Task_ids Integer A list of task ids, used to retrieve the generated document

The example below demonstrates how to make a cURL request to upload a file, including the essential information to be included in the headers and parameters.

curl api.koncile.ai/v1/upload_file/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d '{
	  "folder_id": $folder-id,
	  "template_id": $template-id
   }' \
  -F "files=@test.txt"

Detailed Response Schema (Returned Schemas)

{
	task_ids: ["EOBdOSUX4Uv57YWsLYc4JQ", "cUrsd2ClWXa8vzupWQ2zGQ"]
}

Last updated

Was this helpful?