Import data from a JSON file. The file should follow the structure shown in the example below. Importing data will automatically create and link document types, targets, and variants in the database.
{
"document_type": "Invoice",
"target": "Company",
"variant": "US",
"table_name": "companies",
"primary_key": "company_id",
"classification_regex_pattern": "INVOICE|Invoice|Bill",
"extraction_regex_patterns": [
{
"field_name": "Invoice Number",
"column": "invoice_number",
"pattern": "Invoice\\s*#?\\s*(\\d+)"
},
{
"field_name": "Date",
"column": "invoice_date",
"pattern": "Date:\\s*(\\d{1,2}/\\d{1,2}/\\d{2,4})"
},
{
"field_name": "Total Amount",
"column": "total_amount",
"pattern": "Total\\s*Amount\\s*\\$?\\s*(\\d+\\.?\\d*)"
}
]
}