Correct Fields
Fix wrong extraction values with PATCH /v1/extractions/:id/data. Send a map of field names to corrected values; each field is locked at confidence 1.0.
The Correct Fields endpoint, PATCH /v1/extractions/:id/data, submits corrections to specific fields in a completed extraction. The request body is a flat JSON object mapping field names to their corrected values. Corrected fields are locked at confidence 1.0 and will not be overwritten by future re-extractions, so use this to fix extraction errors programmatically.
Only the fields you include in the body change; all other extracted values remain untouched. The response returns the full updated extraction, so you can verify the applied values, the recalculated confidence, and the updated locked_fields array in one round trip.
/v1/extractions/:id/dataRequest body
{
"vendor_name": "Acme Corporation Ltd.",
"total_amount": 14500.00
}Body parameters
curl
Response
Response fields
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "complete",
"document": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filename": "invoice-0847.pdf",
"pages": 2,
"type_detected": "invoice"
},
"data": {
"vendor_name": "Acme Corp",
"invoice_number": "INV-2024-0847",
"total_amount": 14500.00,
"due_date": "2024-03-15"
},
"confidence": {
"overall": 0.98,
"fields": {
"vendor_name": 0.99,
"invoice_number": 0.98,
"total_amount": 1.0,
"due_date": 0.91
}
},
"locked_fields": ["total_amount"],
"processing": {
"duration_ms": 3420,
"pages_processed": 2,
"region": "eu-west"
},
"created_at": "2024-09-14T10:33:12.000Z",
"links": {
"self": "/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"data": "/v1/extractions/a1b2c3d4-e5f6-7890-abcd-ef1234567890/data",
"document": "/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"dashboard": "https://app.talonic.com/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Errors
Error responses