Connectors and webhooks

dataImports.commit

Start an import in the background with the mapping and decisions: create or choose customers and contractors, link or skip invoice numbers already in Oatmilk, and import or skip possible duplicate payments. Invoices keep their original numbers without using the invoice sequence, paid rows get their payment, the first PDF becomes the invoice's PDF, and Notion rows are linked for sync. Contractor payments are recorded as paid outside Wise; no money is sent and nobody is emailed. Rows already imported are skipped. Returns the import to follow with dataImports.get. Supply idempotencyKey.

POST/api/v1/accounting/dataImports.commit

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_data_imports_commit

Fields

  • targetenumRequired
    invoicescontractor_payments
  • sourceenum

    Where the record came from.

    notion

    Default "notion"

  • databaseIdstringRequired

    1–200 characters

  • mappingobjectRequired

    No other fields

  • decisionsobject

    No other fields

  • rowIdsarray of strings

    A list of record IDs.

    1–2000 items · each 1–200 characters

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

Example

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

More in Connectors and webhooks.