Correct Extraction
Override extracted field values with POST /v1/extractions/:id/correct — every corrected field is written at confidence 1.0 and locked as ground truth.
The Correct Extraction endpoint, POST /v1/extractions/:id/correct, overrides field values on an extraction. Pass a flat map of field name to corrected value; each field you set is written at confidence 1.0 and locked, so it is treated as ground truth and not re-derived. Use it to fix a misread value programmatically without re-running extraction.
This route is an exact alias of [PATCH /v1/extractions/:id/data](get-extraction-markdown): same request body, same write scope, same locking behavior, and the same response — the full updated extraction, so one round trip both applies and verifies the correction. It exists for clients and API gateways that prefer an explicit action-named POST over PATCH semantics; pick either route and stay consistent.
A typical workflow is to read the extraction with GET /v1/extractions/:id, spot the fields whose confidence is low or whose values fail your own validation, and post the known-good values here. Fields you do not include are left unchanged. A field name not present on the extraction is added as a new locked field rather than rejected, so exact key spelling matters — copy names from the extraction's data object.
Send values in their proper JSON types: a number sent as 1240.00 keeps the field numeric, while a quoted string stores a string. Corrections are visible immediately in every read — GET /v1/extractions/:id, the [data endpoint](get-extraction-fields) and its CSV export all reflect the corrected values, and the field appears in locked_fields with confidence 1.0.
/v1/extractions/:id/correctPath parameters
Body parameters
curl
curl -s -X POST https://api.talonic.com/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/correct \
-H "Authorization: Bearer tlnc_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "invoice_total": 1240.00, "currency": "EUR" }'Response (excerpt — full updated extraction)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "complete",
"data": {
"invoice_total": 1240.00,
"currency": "EUR",
"vendor_name": "Acme Corp"
},
"confidence": {
"overall": 0.98,
"fields": {
"invoice_total": 1.0,
"currency": 1.0,
"vendor_name": 0.99
}
},
"locked_fields": ["invoice_total", "currency"]
}Errors
Error responses