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.
Auto-classification is applied when the folder id or template id are left empty. Auto-classification will select the folder and templates that fit best the uploaded document. When auto-classification fails, the files have to manually be classified on the platform. Only use this feature if you are using both the api and the platform. For more information, check out the Classifier automatiquement
Upload file
POSThttps://api.koncile.ai/v1/upload_file
Upload a list of files to the koncile API
Limitations
Maximum number of pages per document: 150
Supported file formats: PDF, JPEG & PNG
Maximum file size in MB: 300MB for PDF | 10 MB for PNG/JPEG
Rate limits: We don't enforce rate limits, but we ask that you use the API responsibly
Path / Query parameters
folder_id Integer The id of the folder in which the document will be stored
template_id Integer The id of the template containing the fields to extract
doc_id Integer Feature 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 "[email protected]"from koncile_sdk.client import KoncileAPIClient
from koncile_sdk.clients.fields import FieldFormat
client = KoncileAPIClient(
api_key=API_KEY
)
files = [
"./files/invoice_2f05c4c2-ca00-441a-8efc-f6d0c5a86402.pdf", # exemple file path
"./files/invoice_31462760-3070-4f7c-ba55-da3fdd6cddf6.pdf", # exemple file path
]
response = client.files.upload(
folder_id=folder_id,
template_id=template_id,
file_paths=files
)const { Koncile } = require('koncile-js');
require('dotenv').config();
const sdk = new Koncile(process.env.API_KEY);
files = [
"./files/invoice_2f05c4c2-ca00-441a-8efc-f6d0c5a86402.pdf", # exemple file path
"./files/invoice_31462760-3070-4f7c-ba55-da3fdd6cddf6.pdf", # exemple file path
]
const response = await sdk.files.upload(
folderId,
templateId,
files,
);
Detailed Response Schema (Returned Schemas)
{
task_ids: ["EOBdOSUX4Uv57YWsLYc4JQ", "cUrsd2ClWXa8vzupWQ2zGQ"]
}Last updated
Was this helpful?

