Introduction
Extraction
- Document
- Portfolio
- Retrieve Extractions
- Get Excel From Documents
Classification
- Document
Configuration
- Document type
- Configuration
- Reference document
Create document type
Create a document type.
curl --request POST \
--url https://api.sensible.so/v0/document_types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "auto_insurance_quotes_all_carriers",
"schema": {
"fingerprint_mode": "fallback_to_all",
"ocr_engine": "microsoft",
"prevent_default_merge_lines": true,
"ocr_level": 0,
"validations": [
{
"description": "Broker'\''s email is in string@string format",
"condition": {
"match": [
{
"var": "broker\\.email.value"
},
"^\\S+\\@\\S+$"
]
},
"fields": [
"broker\\.email"
],
"severity": "warning"
}
]
}
}'
{
"name": "auto_insurance_quotes_all_carriers",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created": "2023-11-07T05:31:56Z",
"schema": {
"fingerprint_mode": "fallback_to_all",
"ocr_engine": "microsoft",
"prevent_default_merge_lines": true,
"ocr_level": 0,
"validations": [
{
"description": "Broker's email is in string@string format",
"condition": {
"match": [
{
"var": "broker\\.email.value"
},
"^\\S+\\@\\S+$"
]
},
"fields": [
"broker\\.email"
],
"severity": "warning"
}
]
}
}
Authorizations
Sensible uses API keys to authenticate requests. Keep your API keys secure and do not share them publicly accessible areas such as GitHub, client-side code, etc. Authentication to the API is performed via Bearer Authentication. Provide your API key as the bearer auth value.
Body
Unique user-friendly name for a document type
The Sensible app defaults to fallback_to_all
.
fallback_to_all
, strict
For information about each OCR engine, see OCR engine.
microsoft
, amazon
, google
, lazarus
Prevents the built-in line merging that occurs before the Merge Lines preprocessor.
Array of validations. See https://docs.sensible.so/docs/validate-extractions
User-friendly description for the test
The test for extraction written in JsonLogic.
Skip this test unless prerequisite fields are non-null.
Severity of the failing test
warning
, error
Response
Unique user-friendly name for a document type
Unique identifier
ISO 8601 date-time.
The Sensible app defaults to fallback_to_all
.
fallback_to_all
, strict
For information about each OCR engine, see OCR engine.
microsoft
, amazon
, google
, lazarus
Prevents the built-in line merging that occurs before the Merge Lines preprocessor.
Array of validations. See https://docs.sensible.so/docs/validate-extractions
User-friendly description for the test
The test for extraction written in JsonLogic.
Skip this test unless prerequisite fields are non-null.
Severity of the failing test
warning
, error
curl --request POST \
--url https://api.sensible.so/v0/document_types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "auto_insurance_quotes_all_carriers",
"schema": {
"fingerprint_mode": "fallback_to_all",
"ocr_engine": "microsoft",
"prevent_default_merge_lines": true,
"ocr_level": 0,
"validations": [
{
"description": "Broker'\''s email is in string@string format",
"condition": {
"match": [
{
"var": "broker\\.email.value"
},
"^\\S+\\@\\S+$"
]
},
"fields": [
"broker\\.email"
],
"severity": "warning"
}
]
}
}'
{
"name": "auto_insurance_quotes_all_carriers",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created": "2023-11-07T05:31:56Z",
"schema": {
"fingerprint_mode": "fallback_to_all",
"ocr_engine": "microsoft",
"prevent_default_merge_lines": true,
"ocr_level": 0,
"validations": [
{
"description": "Broker's email is in string@string format",
"condition": {
"match": [
{
"var": "broker\\.email.value"
},
"^\\S+\\@\\S+$"
]
},
"fields": [
"broker\\.email"
],
"severity": "warning"
}
]
}
}