Resetting import_id's stored on account

Hello,

I am testing importing transactions from Starling and have made good progress, however to continue testing I'd like to delete the imported transactions and re-import them again.

Even though I've removed the actual transactions imported via API, it seems the import_id's still exist elsewhere, as when attempting to re-import these transactions following deletion they come up as duplicates:

:transaction_ids=>[], :duplicate_import_ids=>["YNAB:-13390:2018-05-09:1", "YNAB:141570:2018-05-09:1", "YNAB:86720:2018-05-09:1"]

This feels like the right behavior, as you wouldn't want a deleted transaction to be continuously re-imported and have to delete it each time (maybe... although I don't know why you'd want to delete a legitimate transaction and have it never come back)

For the purpose of testing is there any way to reset the import_id dataset so I can re-import them?

Thanks

6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • I just hit this as well. During testing, I've imported a few, then deleted them via the UI. However, I can no longer import again because it flags as duplicates. It seems to me a logical behavior would be if I delete them, then their import_id's should go away too.

    Reply Like
  • This came up when I was testing too.

    You can append a random number at the end of import_id to avoid being marked as duplicate.

    Reply Like
      • Robert
      • robertmiles3
      • 1 yr ago
      • Reported - view

      Wessel Appending a random number to the end of it would then bypass duplicate detection, but I *want* duplicate detection to avoid, obviously, creating duplicates. I think it just makes sense that if I delete a transaction, I should be able to re-import it without it flagging as a duplicate (since I knowingly deleted it).

      Reply Like
  • I join the question. How do I delete old import_id transactions?

    Reply Like
  • I'd guess that the reason for this is that if you delete a transaction that you imported from your bank, you want it to _stay_ deleted.  If the import ID were reset, it would just end up getting re-imported and show up again as a new transaction.

    Reply Like
    • Emanuel Borsboom - Yes, that's exactly the reason.  If the import_id were to be reset when deleting imported transactions they would be imported again, later, which would usually not be what a user would want.  Currently, you cannot update an import_id through the API.  It seems like this topic is dealing with testing specifically, so I would recommend using  another, but deterministic, import_id for subsequent imports after a previous transaction was deleted.  Or, since the import_id is tied to an account, you could create a new account and test against it.

      Reply Like 1
Like Follow
  • 1 mth agoLast active
  • 6Replies
  • 1010Views
  • 6 Following