Patch a transaction with subtransactions

I have an existing transaction with no subtransactions ("subtransactions": []).

I'd like to PATCH this transaction and add new subtransactions. When I try this, I get a 200 and other fields are updated, but my subtransactions remain empty.

How do I update an existing transaction to include subtransactions? The documentation indicates this should be possible.

9replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Navy Blue Wizard Is the transaction you are trying to PATCH an imported transaction (import_id != null)?  If so, we do not allow an imported transaction to have subtransactions specified.  The documentation isn't clear about this so we can get it updated.

  • Oh I see, they do have import IDs. Can I set the "import_id" to null, and then update the subtransactions?

    Ya, it would be super helpful if the documentation was updated to say this! And hopefully we can add this to the API soon! 🙏

    • Navy Blue Wizard Once a transaction has been given an imported_id it is considered imported and the import_id cannot be nulled out.  I'm working on a change that will allow imported transactions to be splits so it should be supported in the not too distant future.

    • Brady Awesome! Is there a way for me to find out when that change is shipped?

    • Navy Blue Wizard Someone will post back here when it ships.

    • Navy Blue Wizard We share API News in the YNAB Release Notes too!

  • I just want to say thanks for the update. It makes using YNAB a lot easier and faster for me! :)

    Like 1
  • Yes, this has been fixed! Navy Blue Wizard you should be able to include subtransactions/splits on those transactions now!

  • 🎉 So excited to see this! YNAB's API and the ability for my to customize some of my budgeting workflows was a big reason I switched to YNAB. I was definitely considering trying another application but now that this works, I'll be sticking with YNAB. Thank you!

    Like 1
Like Follow
  • 1 yr agoLast active
  • 9Replies
  • 223Views
  • 6 Following