Replay a past CSV sync (destructive)
POST/csv/resync
Deletes the transactions a previous csv-kind sync produced, then re-parses the exact same files from storage. Use it after a parser fix, or when an import came out wrong.
Scope is that sync run only — API-fetched data and other CSV imports on the same integration are untouched. Legs the transfer detector consumed into a merged Transfer are included: on a transfer shared with another integration, only this import’s leg is removed and the surviving side is relabelled from what remains, so it re-pairs once the files are back in.
Every file linked to the sync is replayed, including ones that previously ended failed or partial — that is usually the reason to resync at all.
Returns a NEW syncId to poll via GET /sync/{syncId}; the old run is linked as retryOfSyncId and its deletion counts land on the new sync’s deletionReport. The delete runs in the worker ahead of the re-parse, so a 202 means queued, not finished.
User-owned fields (label, fiat value, notes, comments, tags, per-leg price overrides, COA journals) are carried across the replay and re-applied to the re-imported rows.
Request
Responses
- 202
- 400
- 404
- 409
CSV resync queued
Not replayable. SYNC_KIND_MISMATCH (not a csv sync), SYNC_INTEGRATION_MISMATCH, NO_UPLOADS_FOR_SYNC (nothing linked — e.g. a legacy single-file upload), or SOURCE_FILE_MISSING (a source file is no longer in storage, so nothing is deleted and the request is refused).
Resource not found
SYNC_ALREADY_IN_PROGRESS — the integration has a sync running; a resync deletes before it writes, so it must not race one. UNATTRIBUTABLE_DETECTION_ROWS — the wallet holds detector-produced transfer/swap legs written before per-sync attribution existed (no sync_id, no trxs_merged), which no per-sync delete can reach; replaying past them would duplicate them, so re-sync the integration from start once to rewrite them, then retry.