Add transaction: misleading error message

Hi there,

I get the error message 

HTTP response body: {
    "error":  {
        "id": "400",
        "name": "bad_request",
        "detail": "date must not be in the future or over 5 years ago (index: 0)"

when sending the following transaction:

    'account_id': 'x',
    'date': '2018-09-24',
    'amount': '-29950',
    'memo': 'Mobilfunk Kundenkonto x Rg x/11.09.2018',
    'payee_id': None,
    'payee_name': 'Telekom Deutschland GmbH',
    'import_id': 'YNAB:-29950:2018-09-24:1'

And I am wondering what exactly am I doing wrong here? Many other transactions could be added without problems.

Just in case it is helpful, here are the request headers:

HTTP response headers: HTTPHeaderDict({
    'Server': 'Cowboy',
    'Date': 'Thu, 20 Sep 2018 05:42:17 GMT',
    'Connection': 'keep-alive',
    'Content-Type': 'application/json; charset=utf-8',
    'X-Rate-Limit': '41/200',
    'Vary': 'Accept-Encoding, Origin',
    'Cache-Control': 'no-cache',
    'X-Request-Id': '3cf58881-b61e-494e-afb3-9b11473ad7c8',
    'X-Runtime': '0.020125',
    'Strict-Transport-Security': 'max-age=15552000; includeSubDomains',
    'Transfer-Encoding': 'chunked',
    'Via': '1.1 vegur'
2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • chbndrhnns
    • Cloud Test Engineer
    • Magenta_Deer_43f0695638
    • 9 mths ago
    • Reported - view

    I see of course what is going on here. It's a pending transaction from my bank which is dated in the future - as suggested by the error message. I was a bit slow in reading.


    Reply Like
  • chbndrhnns Yes, we don't currently support adding transactions with a future date because YNAB handles these a bit different.  You could always put a guard in your script to keep these from being imported until the date is not future anymore or adjust the date, if that makes sense in your case.

    Reply Like
Like Follow
  • 8 mths agoLast active
  • 2Replies
  • 420Views
  • 2 Following