> For the complete documentation index, see [llms.txt](https://developer.doctranslate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.doctranslate.io/document-translation-api/translation-api/data-entry-api.md).

# Data Entry API

Auto-fill a template document with data extracted from one or more source files. **New** — v3-only (not part of the legacy contract). **Paid** (deducts credit per completed task).

* **Endpoint:** `POST /v3/data-entry` (`multipart/form-data`)
* **Base URL:** `https://doctranslate-api.doctranslate.io`
* **Auth:** header `X-API-Key: <key>` (or `Authorization: Bearer <key>`)

## What it does

Give it **source file(s)** to read data from plus a **template** (a DOCX, XLSX, or fillable PDF form). It extracts the relevant fields and returns a filled copy of the template. Async: you get a `task_id`, then poll `get_result`.

## Parameters

| Param           | Required | Type    | Meaning                                                                            |
| --------------- | :------: | ------- | ---------------------------------------------------------------------------------- |
| `files`         |     ✅    | file(s) | Source file(s) to extract data from (multipart field `files`, one or more).        |
| `template`      |    ⚠️    | file    | The form/template to fill. **Required unless `template_id` is given.**             |
| `template_id`   |    ⚠️    | integer | A template already saved on this account — an alternative to uploading `template`. |
| `target_lang`   |          | string  | Output language for the filled values.                                             |
| `domain`        |          | string  | Domain hint (exact enum string; a `422` lists valid values).                       |
| `custom_prompt` |          | string  | Extra extraction/fill instructions.                                                |
| `dictionary`    |          | string  | JSON-encoded dictionary array (term overrides).                                    |

## Response

* `200` → `{ "data": { "task_id": "..." } }` — queued. Poll `GET /v3/result/{task_id}` for the filled file's `url_download`.
* `401` invalid/missing key · `402` not enough credits · `404` `template_id` doesn't resolve · `422` bad/missing field (`detail[].loc`).

## Quick start (cURL)

```bash
# submit — fill template.docx using data read from source.pdf
curl -s https://doctranslate-api.doctranslate.io/v3/data-entry \
  -H "X-API-Key: dtl_xxx" \
  -F "files=@source.pdf" \
  -F "template=@template.docx" \
  -F "target_lang=en"
# -> { "data": { "task_id": "..." } }

# poll
curl -s https://doctranslate-api.doctranslate.io/v3/result/<task_id> \
  -H "X-API-Key: dtl_xxx"
# -> { "data": { "status": "success", "url_download": "https://..." } }
```
