Skip to main content
Every time Matil processes a document, the result is stored as an entry. An entry contains the extracted data, any validation errors, processing metadata, and a unique ID. Entries are your record of what was extracted. You can retrieve them later, review the results, and submit corrections.

What’s in an entry?

When you process a document synchronously, the response is:
{
  "entry_id": "01934b1a-89ab-7def-0123-456789abcdef",
  "resource_type": "structure",
  "resource_id": "01934b1a-1234-7abc-0000-111122223333",
  "resource_version_number": 1,
  "data": {
    "invoice_number": "INV-2024-001",
    "date": "2024-01-15",
    "total": 1250.00
  },
  "errors": null,
  "status": "completed",
  "time_ms": 2340,
  "price": 0.05
}
FieldDescription
entry_idUnique ID for this result.
resource_typeAlways "structure".
resource_idThe structure used for extraction.
resource_version_numberThe version of the structure applied.
dataThe extracted data as structured JSON.
errorsValidation errors, if any. null when everything is correct.
statuscompleted, completed_with_errors, or failed.
time_msProcessing time in milliseconds.
priceCost of this request.

Retrieving entries

Fetch a specific entry by its ID:
curl "https://api.matil.ai/v3/entries/{entry_id}" \
  -H "x-api-key: your-api-key"

Corrections

If the extracted data isn’t quite right, you can submit a correction:
curl -X POST "https://api.matil.ai/v3/entries/{entry_id}/correction" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "invoice_number": "INV-2024-001",
      "total": 1350.00
    }
  }'
The response confirms how many patches were applied:
{
  "entry_id": "01934b1a-89ab-7def-0123-456789abcdef",
  "patches_applied": 1
}

Next steps

Structures

Define what data gets extracted into entries.

Error handling

Handle processing errors and edge cases.