Instructions
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 instruction 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
)const { Koncile } = require('koncile-js');
require('dotenv').config();
const sdk = new Koncile(process.env.API_KEY);
const response = await sdk.instructions.create(templateId, content, 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
The instruction object
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
)const { Koncile } = require('koncile-js');
require('dotenv').config();
const sdk = new Koncile(process.env.API_KEY);
const response = await sdk.instructions.get(instructionId);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
The instruction object
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
)const { Koncile } = require('koncile-js');
require('dotenv').config();
const sdk = new Koncile(process.env.API_KEY);
const response = await sdk.instructions.update(instructionId);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
)const { Koncile } = require('koncile-js');
require('dotenv').config();
const sdk = new Koncile(process.env.API_KEY);
const response = await sdk.instructions.delete(instructionId);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
Last updated
Was this helpful?

