I am currently using Tasker to grab my credit card notifications and post the transaction to YNAB using the API. Since I also have my accounts being synced with my bank I am using the import_id field and using the format YNAB:[milliunit_amount]:[iso_date]:[occurrence]
This is working very well but what I am finding is certain transactions are still being imported into YNAB from my bank. While using the API I can see that the transaction I imported using the API has the import ID with the date that the purchase was made but the transaction that was imported from the bank has an import ID with a date a couple days later. I am assuming it's the date it cleared. When YNAB imports transactions from the bank shouldn't the import ID contain the date the transaction was made and not the date it cleared and imported into YNAB?
I like to keep the bank sync running that way it will catch any transactions that may have failed through the API import or grab the one's that might have a different amount for example if I left a tip.
Thanks, asfd64 , your explanation is actually very helpful! I use some of the Auto plugins myself, so I can use what you've said as a foundation. I work in IT too, as a programmer🙂, so if I get it working, I might be able to parameterize it so that it's generic enough to publish for general use. I've been looking for something to do instead of sitting around on my *** every night, so now I've got a project!
Hi asfd64 - The import_id does generally use the cleared/posted date for the transaction. If you don't have that date or won't be able to determine it, another option would be to post the transactions without an import_id so they will be considered "user entered" and then when they do eventually get imported from your bank they should be matched since the API supports matching. That way you'll see the transactions imported immediately and they won't get duplicated when they eventually get imported from the bank in YNAB.