Transactions

imports.preview

Validate a CSV import using accountId, csv text and mapping with date, description, amount or debit/credit, and dateFormat. Returns errors without booking transactions.

POST/api/v1/accounting/imports.preview

Permissions

accounting:read

Who can call it

admin, finance

Retries

Safe to retry: it only reads

MCP

accounting_preview_bank_import

Fields

  • accountIdstring (ID)Required

    The ID of a bank, card or payment account, from accounts.list.

  • csvstringRequired

    at most 5000000 characters

  • filenamestring

    The file's name, including its extension.

    1–255 characters · Default "statement.csv"

  • currencystringRequired

    Three-letter currency code, such as CAD or USD.

  • mappingobjectRequired

    No other fields

Example

curl https://app.getoatmilk.com/api/v1/accounting/imports.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "csv": "example",
  "currency": "CAD",
  "mapping": {
    "date": "2026-09-30",
    "description": "Synthetic example from the docs",
    "dateFormat": "YYYY-MM-DD"
  }
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/imports.preview
curl https://app.getoatmilk.com/api/v1/accounting/imports.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "csv": "example",
  "currency": "CAD",
  "mapping": {
    "date": "2026-09-30",
    "description": "Synthetic example from the docs",
    "dateFormat": "YYYY-MM-DD"
  }
}'

More in Transactions.