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
  • Create instruction
  • Request body
  • Returns
  • Fetching instruction
  • Path parameters
  • Returns
  • Update instruction
  • Path parameters
  • Request body
  • Returns
  • Delete instruction
  • Path parameters
  • Instruction Object

Was this helpful?

Export as PDF
  1. API Setup

Instructions

PreviousFieldsNextAPI status codes

Last updated 2 months ago

Was this helpful?

Instructions are taken into account by Koncile to extract the general fields of the line fields.

Create instruction

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

Creates an instruction

Request body

template_id Integer Required The ID of the template to create the instruction in

content String Required The instruction's text

type String Required Defines whether instruction is targetting the fields extracted once (General fields) or for every line (Line fields)

Returns

The created object

curl api.koncile.ai/v1/create_instruction/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d '{
    "content": string,
    "template_id": integer
  }'
from koncile_sdk.client import KoncileAPIClient


client = KoncileAPIClient(
    api_key=API_KEY
)

response = client.instructions.create(
    template_id=template_id,
    content=content,
    type=type
)

Fetching instruction

GEThttps://api.openai.com/v1/fetch_instruction/{instruction_id}

Fetches all information about an instruction, using the instruction_id

Path parameters

instruction_id Integer Required The id of the instruction to fetch

Returns

curl api.koncile.ai/v1/fetch_instruction/?instruction_id=instruction_id \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY"
from koncile_sdk.client import KoncileAPIClient


client = KoncileAPIClient(
    api_key=API_KEY
)

response = client.instructions.get(
    instruction_id=instruction_id
)

Update instruction

PUThttps://api.openai.com/v1/update_instruction/{instruction_id}

Updates an instruction, using the instruction_id

Path parameters

instruction_id Integer Required The id of the instruction to update

Request body

content String The instruction's text

type String Defines whether instruction is targetting the fields extracted once (General fields) or for every line (Line fields)

Returns

curl api.koncile.ai/v1/update_instruction/?instruction_id=instruction_id \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY"
from koncile_sdk.client import KoncileAPIClient


client = KoncileAPIClient(
    api_key=API_KEY
)

response = client.instructions.update(
    instruction_id=instruction_id
)

Delete instruction

DELETEhttps://api.openai.com/v1/delete_instruction/{instruction_id}

Deletes an instruction, using the instruction_id

Path parameters

Instruction_id Integer Required The id of the instruction to update

 curl api.koncile.ai/v1/delete_instruction/?instruction_id=instruction_id \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY"
from koncile_sdk.client import KoncileAPIClient


client = KoncileAPIClient(
    api_key=API_KEY
)

response = client.instructions.delete(
    instruction_id=instruction_id
)

Instruction Object

id Integer

content String The instruction's text

type String Whether the instruction has to be extracted once, or for every line. Can be "General fields" or "Line fields"

template_id Integer The id from the template the instruction is linked to

The object

The object

instruction
instruction
instruction