All guidesGuides · 03 GET /documents/{id}bash 200 OKjson Open the guideExporting to CSV, JSON or XML
Retrieving the extracted data
Read the structured fields, the confidence and the check results.
When the status is extracted (or approved after review), retrieve the document and its structured data with a simple GET on the id obtained at upload time.
curl https://app.locrai.com/api/v1/documents/9b1f0e2c-1c2d-4f5a-8e9b-0a1b2c3d4e5f \
-H "Authorization: Bearer idp_live_xxxxxxxxxxxxxxxxxxxx"{
"data": {
"id": "9b1f0e2c-1c2d-4f5a-8e9b-0a1b2c3d4e5f",
"status": "extracted",
"document_type": "invoice",
"extraction_path": "text",
"confidence": 0.93,
"validation_checks": [
{ "code": "totals_match", "ok": true, "label": "Imponibile + IVA = Totale" },
{ "code": "valid_vat", "ok": true, "label": "Partita IVA valida" },
{ "code": "valid_iban", "ok": true, "label": "IBAN valido" }
],
"extracted_data": {
"invoice_number": "2026/123",
"invoice_date": "2026-06-10",
"supplier": { "name": "Acme S.r.l.", "vat": "IT01234567890" },
"subtotal": 1000.0,
"vat_amount": 220.0,
"total": 1220.0,
"line_items": [
{
"description": "Servizi di consulenza",
"quantity": 1,
"unit_price": 1000.0,
"vat_rate": 22,
"line_total": 1000.0
}
]
}
}
}What the response contains
Besides extracted_data you'll find confidence, a reliability score between 0 and 1; extraction_path, the method used to read the document — one of xml, text, ocr or vision; and validation_checks, the list of objective checks performed: each entry has a code, an ok result and a label (for example totals_match, valid_vat, valid_iban).
The default threshold for human review is 0.85: below this value the document goes to review_needed instead of carrying on by itself.
Ready to integrate LOCRAI?
Generate an API key from the dashboard and get started, or write to us: we'll help you connect LOCRAI to your systems, including custom connectors.
Contact us