Save Reconciliation Config
Save or clear the reconciliation config for a reference dataset. Define anchor key columns, narrowing columns, key patterns, and per-column rules.
Persist the reconciliation config for a reference dataset. The config is stored as JSONB on the dataset and is validated at the boundary, so the persisted payload is always well-formed. Sending an empty body ({}) clears the stored config.
The anchor block controls how a document is matched to a reference row. key_columns are indexed for lookup, narrowing_columns disambiguate when several rows match the same key, and key_patterns are per-column regexes that a markdown token must match before it is eligible to anchor. The columns map assigns each reference column a role of validate, extract, or anchor, plus optional type, tolerance, threshold, and required settings.
Each key_patterns regex is checked for catastrophic backtracking before it is persisted. A pattern that could hang on a crafted input is rejected, because every later reconciliation run would otherwise inherit that risk. This guard mirrors the format-constraint ReDoS protection used elsewhere in the platform.
/v1/reconciliation/config/{referenceDataId}Response
Response fields
Request body
{
"name": "Carrier reconciliation",
"anchor": {
"key_columns": ["booking_ref"],
"narrowing_columns": ["carrier_name"],
"key_patterns": { "booking_ref": "^[A-Z]{3}[0-9]{7}$" },
"markdown_scanning": "fallback"
},
"columns": {
"freight_amount": { "role": "validate", "type": "numeric_tolerance", "tolerance": 0.02, "required": true },
"consignee": { "role": "validate", "type": "fuzzy_name", "threshold": 0.85 }
},
"haiku_validation": true
}Response
{
"saved": true
}Errors
Error responses