Connectors and webhooks

dataImports.preview

Read every row of the database with a column mapping and group the rows: ready, needs a decision (a new or ambiguous customer or contractor, an invoice number already in Oatmilk, or a possible duplicate payment), already imported, can't import (with the reason), or left out. Nothing is saved. Payment and tax columns are never read, and what they hold is hidden anywhere else in the preview.

GETPOST/api/v1/accounting/dataImports.preview

Permissions

accounting:read

Who can call it

admin, finance

Retries

Safe to retry: it only reads

MCP

accounting_data_imports_preview

Fields

  • targetenumRequired
    invoicescontractor_payments
  • sourceenum

    Where the record came from.

    notion

    Default "notion"

  • databaseIdstringRequired

    1–200 characters

  • mappingobjectRequired

    No other fields

Example

curl https://app.getoatmilk.com/api/v1/accounting/dataImports.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": "invoices",
  "databaseId": "example",
  "mapping": {
    "columns": {}
  }
}'
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/dataImports.preview
curl https://app.getoatmilk.com/api/v1/accounting/dataImports.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": "invoices",
  "databaseId": "example",
  "mapping": {
    "columns": {}
  }
}'

More in Connectors and webhooks.