> ## Documentation Index
> Fetch the complete documentation index at: https://docs.matil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Entries

> Every processed result is stored as an entry — retrieve, review, and correct them.

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:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "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
}
```

| Field                     | Description                                                   |
| ------------------------- | ------------------------------------------------------------- |
| `entry_id`                | Unique ID for this result.                                    |
| `resource_type`           | Always `"structure"`.                                         |
| `resource_id`             | The structure used for extraction.                            |
| `resource_version_number` | The version of the structure applied.                         |
| `data`                    | The extracted data as structured JSON.                        |
| `errors`                  | Validation errors, if any. `null` when everything is correct. |
| `status`                  | `completed`, `completed_with_errors`, or `failed`.            |
| `time_ms`                 | Processing time in milliseconds.                              |
| `price`                   | Cost of this request.                                         |

## Retrieving entries

Fetch a specific entry by its ID:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "entry_id": "01934b1a-89ab-7def-0123-456789abcdef",
  "patches_applied": 1
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Structures" href="/en/guides/structures">
    Define what data gets extracted into entries.
  </Card>

  <Card title="Error handling" href="/en/api-reference/error-handling">
    Handle processing errors and edge cases.
  </Card>
</CardGroup>
