# dataImports.files

Get short-lived download links for the files an imported invoice came with, and where it was imported from.

`GET | POST /api/v1/accounting/dataImports.files`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_data_imports_files`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `targetType` | enum | Yes | One of: `invoice`, `contractor_payout`. |
| `targetId` | string (ID) | Yes | The ID of the related record. |

## Example request

```bash
curl -G https://app.getoatmilk.com/api/v1/accounting/dataImports.files \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'targetType=invoice' \
  --data-urlencode 'targetId=4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a'
```

Reference page: https://app.getoatmilk.com/docs/api/dataImports.files
