I'm adding a feature to my app (bar for YNAB) where I show the count of unapproved transactions. I'm using the /transactions?type=unapproved endpoint.
My problem is, in the YNAB Web UI and the iOS app, I sometimes see unapproved transactions, but they aren't reflected in the API until hours later.
Is this normal behavior? It seems like unapproved transactions should show up in the Web app, mobile apps and API at the same time.
One more strange observation about this issue. I noticed that the API requests for transactions that are unapproved does not fetch anything until after I log into YNAB and view the unapproved transactions in the web UI. Then they start appearing from the API.
This seems like a bug.
Hoping to get some insight into this because I built some really cool features in my app that depend on that /transactions?type=unapproved call.
Hi Don ,
I think I have a few answers for you on this, but let me know if you still have any more questions.
I'm not exactly sure about the difference between web and mobile, they should in theory be the same, but there can be some lagging between the two--we could definitely dig into that for you.
Also, that message is comprise of 3 things: transactions needing approval, transactions needing a category, and transactions to import.
The ones that are needing approval are the only ones you would get with the "unapproved" filter.
Needing category is a separate filter/count.
The number to import is not something we support in the API yet, so you wouldn't be able to get the same exact number comparing that in the web/mobile and the API.
Let me know if that helps!
The problem seems to be that the unapproved transactions API endpoint (/transactions?type=unapproved), does not actually return unapproved transactions until after I view my budget with the web app.
Only after that does the API start returning unapproved transactions. I'm not trying to get anything other than those types of transactions. There's a bug in the API that's preventing that API call from working.
After looking into it further, I found that transactions don't appear in the API at all (no matter what the status) until you view them in either the mobile app or the web app.
So the /transactions endpoints simply don't have updated transactions and neither do /budget calls. It's like transactions in the API don't exist until viewed in mobile or web, which is a shame because I created some really cool features in my app that assume this data (transactions) would be updated.
Chrissy Do you know if this behavior is by design or if it's a bug?
The client apps (web/mobile) are the ones that actually do the importing of transactions. So you have to use one of the apps to trigger the import. Before transactions are imported they are not visible to the API.
+1 for this. I am currently developing a WearOS app and some Android widgets to view my budgets and transactions. However, the transaction widget is kind of useless if it does not contain the latest information.