LogoLogo
WebsiteLoginSign up
  • Welcome to Koncile
  • Getting Started
    • Key Koncile features
    • Folders vs. Extraction Templates
    • General fields vs. Repeated fields
  • DATA EXTRACTION APP
    • Set up an Extraction Template
    • Set field format
    • How to write field descriptions
    • Import documents
      • Importing amendments
    • Export data
    • Auto-classify documents
  • Generated fields with AI
  • API Setup
    • API Key generation
    • Swagger
    • API pricing and limits
    • Libraries
    • File Uploading
    • Task Retrieval
      • Example of Python Code
    • Folders
    • Templates
    • Fields
    • Instructions
    • API status codes
    • Bubble Plugin
  • Miscellaneous
    • Q&A
Powered by GitBook
LogoLogo

Useful links

  • Website
  • Login
  • Extraction template library

@Copyright Koncile 2024

On this page
  • Step 1 - Post file
  • Step 2 - Fetch results

Was this helpful?

Export as PDF
  1. API Setup

Bubble Plugin

PreviousAPI status codesNextQ&A

Last updated 25 days ago

Was this helpful?

You can use the Koncile API directly in your Bubble applications thanks to our plugin:

You'll need to create a Koncile account to be able to use the Bubble Plugin.

Step 1 - Post file

The plugin gives you access to API actions. To send a file for extraction, select the “Post file” action:

On your koncile app, you can access the koncile_ids of your folders and extraction templates:

Use these IDs to fill out the config_id and class_id parameters of the call in the Bubble action:

You can generate your API key in the user settings of the application by following the path: Settings > API. Please note, this feature is only accessible to admin users:

Simply copy-paste your API key after “Bearer “ in the Authorization header.

Note: You might need to trigger this call in a batch or in a loop to send multiple files at once. 1 file - 1 call.

Step 2 - Fetch results

Once the file has been sent, you can retrieve the results using the “fetch results” action:

Trigger this action preferably once the Post file call returns a success code (200). You might need to trigger this call in a loop to make sure you get the full results once the task status is “DONE”. Take a look at the way it is implemented on the Bubble's plugin demo app, with a frontend workflow to post a file followed by a trigger of a backend looping workflow to fetch results.

The API returns a JSON to exploit as you wish within your Bubble app: to create things for instance. Here is a typical output to exploit:

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

Contact us at contact@koncile.ai if you have any questions about using the Bubble Koncile plugin!

https://bubble.io/plugin/koncile-ai---advanced-ocr-1733836054037x247444812903219200