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?

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • 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!

    Like 1
      • Joseph H
      • joseph_h
      • 7 mths ago
      • 1
      • Reported - view

      Sarah (YNAB Support) Thanks, future-dated transactions would be great.

      FWIW, my use case is that I have a vendor that bills me monthly, but the transaction amount changes every month (e.g. natural gas bill). They send me an email a couple of weeks before the transaction with the amount, date, etc.; I scrape the email; and I want to post it to YNAB.

      Like 1
    • Sarah (YNAB Support) This is so very thorough and clear. I feel like a lead magnet pro now that I’ve read this. Great work!!

Like Follow
  • 3 mths agoLast active
  • 3Replies
  • 231Views
  • 4 Following