Dates Different between UI and API?

I noticed that when fetching a budget from /v1/budgets/ that the dates for the transaction objects seem to be the "transaction date", while in the UI the transactions have their posted dates.

So for example, let's say I make a Credit Card transaction on 1/1/2020 which eventually posts on 1/2/2020. In the UI, I'll see:


But in the API I'll get:







This is surprising given language from YNAB staff that YNAB specifically chooses the posted date and seemingly ignores the transaction date (example).

Is this a known issue? And if so, are there any known workarounds?

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Sudeep Y !

    We do use the posted date in the UI for exactly the reason Nicole mentioned in that post:


    Since financial institutions don’t always give us the “transaction” date, we use “posted” dates (which all institutions provide) instead.

    If you can tell me a bit more about what you're hoping to use the API for (whether it's getting data into YNAB or out of it, for example) that may help in identifying the differences between the dates of the transactions.


      • Sudeep Y
      • sudeepy
      • 5 mths ago
      • Reported - view

      Chrissy thanks for the reply. In my case, I’m just displaying transactions and offering various filters (by date, by month, by quarter, etc). So I would like the API to return the same date as what’s shown in the YNAB UI so its consistent. So that’s why the fact that the dates are different is a problem.

      In terms of solutions, I can think of two:

      1) change’s value to be the posted date.

      2) add a new field like transaction.postedDate. So then the transaction object would have two fields: date and postedDate. And in some cases those values may be the same depending on what data is given to YNAB by financial institutions.

      I would think #2 would be better overall since it wouldn’t change the behavior of the existing field.

      Does that make sense?

  • Or I could be totally wrong and is actually the posted date, but the value is just off by one from what is shown in the YNAB UI. If that’s the case, that’s an easy fix on my end.

    • Sudeep Y Are you seeing this with all of your transactions? If you're pulling data out of YNAB, we don't store the transaction date, just the posted date which means that you should be getting the same data out that you're getting in. I do think Emanuel Borsboom  could be right as those dates should line up. 

  • Just a thought - could it be a time zone issue?  Have you inspected the raw JSON you're receiving from the YNAB API to check if the date is wrong there?

Like Follow
  • 5 mths agoLast active
  • 5Replies
  • 299Views
  • 3 Following