Create Check
Create a validation check with POST /v1/structuring/checks: pick a type (field_format, field_range, cross_field, lookup), a per-type config, and severity.
POST /v1/structuring/checks creates a validation check: an in-pipeline data quality rule that runs automatically against future structuring results for one schema. Each check has a type (field_format, field_range, field_presence, cross_field, lookup, or custom_expression), a severity label, and a type-specific config. Newly created checks are active immediately and evaluate against the next result produced under their schema — existing results are never re-evaluated retroactively.
The config shape depends on the type. For field_range, provide field plus min and/or max (and optionally allow_null: true). For field_format, provide field and a format of regex (with pattern), email, url, date, iso_date, or uuid. For cross_field, provide rule (date_before, date_after, not_equal, or sum_equals), field_a, field_b, and for sum_equals an optional tolerance (default 0.01). For field_presence, provide fields and an optional mode (all or any). For lookup, provide field and a values allowlist.
/v1/structuring/checksBody parameters
curl
curl -s -X POST https://api.talonic.com/v1/structuring/checks \
-H "Authorization: Bearer tlnc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Total amount range",
"type": "field_range",
"user_schema_id": "36ef3a00-a4dc-4e49-af6a-66ae20f9b58a",
"severity": "error",
"description": "Totals must be plausible",
"config": { "field": "total_amount", "min": 0, "max": 1000000 }
}'Response
Response fields (201 Created)
Response (201 Created)
{
"id": "5fee4bba-8380-44b8-9780-5e4548424b3c",
"user_schema_id": "36ef3a00-a4dc-4e49-af6a-66ae20f9b58a",
"name": "Total amount range",
"description": "Totals must be plausible",
"type": "field_range",
"severity": "error",
"config": { "field": "total_amount", "min": 0, "max": 1000000 },
"is_active": true,
"sort_order": 0,
"created_at": "2026-08-29T11:35:01.940Z",
"updated_at": "2026-08-29T11:35:01.940Z",
"links": {
"self": "/v1/structuring/checks/5fee4bba-8380-44b8-9780-5e4548424b3c"
}
}Errors
Error responses
A typical invoice setup pairs three checks on one schema: a field_range on the total (severity error), a field_format date check on due_date (severity warning), and a cross_field sum_equals between line_items[].amount and total_amount. Checks flag issues; to make flags block delivery, wire a gate: create one with [POST /v1/structuring/gates](create-structuring-gate) and attach a validation_pass rule with max_failures: 0, so any failing check parks the result for manual review.
Severity is worth choosing deliberately even though it never blocks anything on its own. Reserve critical for the checks that must gate delivery, then scope your gate rule with { "scope": "critical_only" } — advisory checks keep running and recording warning failures without ever holding a record. This split lets one schema carry both hard contract checks and soft data-hygiene signals through the same pipeline.