
500 error on POST to the transactions endpoint
I'm getting a 500 error when doing a POST to /transactions, similar to the issues described in this topic and this one. I already had ISO-formatted the date and wrapped my request in a transaction object.
I've tried POSTing each of the following transactions separately:
{ "transaction": { "account_id": "<acct id>", "date": "2021-02-16", "amount": 116.91, "payee_id": "<payee id>", "payee_name": "Payee Name", "category_id": "<category id>", "memo": "Auto-generated from email dated 2021-01-27" } } { "transaction": { "account_id": null, "date": "2021-02-16", "amount": 0, "payee_id": null, "payee_name": null, "category_id": null, "memo": "TEST" } }
What'd I miss?
-
Hey Joseph H ! A couple of issues there -- one, the amount needs to be in milliunits, so an amount of 116.91 should be 116910.
Second, the YNAB API does not currently support creating Scheduled (future-dated) transactions. For now you'll need to create any transactions with a date in the future yourself.I can definitely pass along as feedback to our team though that you were wanting to use the API to create those future-dated transactions!