Transactions

imports.undo.preview

Preview selective Undo for one manual CSV or uploaded statement import, or guarded Restore for one complete Undo operation. Resolve batch, statement, transaction, or bank-row context inside the organization. Returns paged groups, treatment choices, blockers, and an exact whole-graph fingerprint while preserving originals.

GETPOST/api/v1/accounting/imports.undo.preview

Permissions

accounting:read

Who can call it

admin, finance

Retries

Safe to retry: it only reads

MCP

accounting_imports_undo_preview

Fields

Shape 1: mode: "undo"

  • mode"undo"Required
  • targetobjectRequired

    No other fields

  • cursorstring

    Where the next page starts: the nextCursor value from the previous response.

    1–512 characters

  • limitinteger

    How many results to return at most.

    1 to 500 · Default 200

Shape 2: mode: "restore"

  • mode"restore"Required
  • operationIdstring (ID)Required

    The ID of the related record.

  • cursorstring

    Where the next page starts: the nextCursor value from the previous response.

    1–512 characters

  • limitinteger

    How many results to return at most.

    1 to 500 · Default 200

Example

curl https://app.getoatmilk.com/api/v1/accounting/imports.undo.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "undo",
  "target": {
    "kind": "batch",
    "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  }
}'
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.undo.preview
curl https://app.getoatmilk.com/api/v1/accounting/imports.undo.preview \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "undo",
  "target": {
    "kind": "batch",
    "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  }
}'

More in Transactions.