Creating transfers between accounts?

There doesn't seem to be any way to create transfers using the API, from a quick glance at the documentation. The create transaction endpoint states that "Transfer payees are not permitted and will be ignored if supplied."

I would like to request that feature :)

24replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • I'll pass that along to our devs!

    Like
  • Sebastian Johansson That's correct, transfers and splits are not currently supported through the API.  There is a bit of a technical hurdle on our side to getting this implemented because of some under-the-hood design factors.  It's definitely on the list and on our minds. 🙂

    Like 1
  • Brady at YNAB  I just saw that the is a subtransaction in the documentation. Does that mean that this is now supported? Asking because it's also mandatory for my app because I detect atm withdrawals and transfers between different bank accounts.

     

    {
      "data": {
        "transaction": {
          "id": "string",
          "date": "string",
          "amount": 0,
          "memo": "Unknown Type: string,null",
          "cleared": "cleared",
          "approved": true,
          "flag_color": "Unknown Type: string,null",
          "account_id": "string",
          "payee_id": "Unknown Type: string,null",
          "category_id": "Unknown Type: string,null",
          "transfer_account_id": "Unknown Type: string,null",
          "import_id": "Unknown Type: string,null",
          "subtransactions": [
            {
              "id": "string",
              "transaction_id": "string",
              "amount": 0,
              "memo": "Unknown Type: string,null",
              "payee_id": "Unknown Type: string,null",
              "category_id": "Unknown Type: string,null",
              "transfer_account_id": "Unknown Type: string,null"
            }
          ]
        }
      }
    }

     

    That's how I currently do it (works in the .csv import though the webinterface): https://github.com/schurig/ynab-bank-importer/blob/master/lib/ynab/transaction.rb#L33-L46

    Like
  • Martin - GET transactions/ endpoints respond with a subtransactions array object so you can retrieve any subtransactions but the ability to specify a split or transaction on the POST/PUT transactions/ endpoints is not yet supported.  So, you can't change or create a transaction as a split or transfer.  In the meantime, you might be able to just create 2 separate and offsetting transactions on both accounts for a transfer.

    Like
  • Hey! Sorry to be a pain, but any update on this? This would be super handy for the Chrome extension I'm building to import my data from my bank.

    Like
  • Jordan Crawford Transfers support is still not available through the API but it is still on our request list.  In the meantime, you could create 2 separate and offsetting transactions on both accounts for a transfer.

    Like
  • Hi! I'm a new user of YNAB, I really need this feature. I simply want to be able to import my transactions so that e.g. cash withdrawals are recorded as transfers from a specific cash account. I spent 2 hours yesterday trying to get the API to accept my transfer payee, because I didn't notice the note that transfer payees will be ignored. This feature is a must-have for me. I hope you can prioritize this!

     

    BTW it'd could be a good idea to return a note from the API if there are ignored payees.

    Like 2
  • +1 on transfer support.

    My use case is that when I make a credit card payment my bank sends me an email. I have a program I wrote that periodically scans my email account and processes them according to some rules I define. I defined a rule to turn those emails into a transfer transaction, not realizing that this didn't work.

    Like
  • Brady said:
     In the meantime, you could create 2 separate and offsetting transactions on both accounts for a transfer.

     That doesn't work as it would not be a transfer and thus would want a category for the transactions

    Like 2
  • +1 for me as well on transfer support in the API. I love that you guys have an API now, but this seems to be a rather large omission. Hope we get it soon!

    Like
  • Update: Transfer support is actively being worked on so it is coming in the not-to-distant future.

    Like 2
  • Transfers are now supported! 🎉

    See https://www.youneedabudget.com/release-notes/ for more details.

    Like 1
      • Martin
      • Blue_Pilot
      • 2 yrs ago
      • Reported - view

      Brady that are awesome news!! Thank you so much 🎉

      Like
      • rownie23
      • Slate_Gray_Panther.7
      • 2 wk ago
      • Reported - view

      Brady I used the API in Tasker to automatically enter transactions, including transfers on My Android phone. I recently changed the account in my Tasker task to transfer to another account and it no longer works.

      The way it worked previously is the Payee ID was the string of the destination account, so that was all I changed.

      Do you have any ideas?

      Like
    • rownie23 Try specifying payee_name (not payee_id) as "Transfer : Checking" where "Checking" is the name of the destination account.  Note the space before and after the colon there.

      Like
      • rownie23
      • Slate_Gray_Panther.7
      • 2 wk ago
      • Reported - view

      Brady Ok I have set that up, I'll see what happens the next time I make a transaction. Could you speculate as to why changing the account in the way I did broke the function? I had no problems beforehand.

      Like
      • rownie23
      • Slate_Gray_Panther.7
      • 10 days ago
      • Reported - view

      Brady I tried this and got the following error:

      {"error":{"id":"400","name":"bad_request","detail":"payee name must not start with an internal payee name:(Transfer : , Starting Balance, Manual Balance Adjustment, Reconciliation Balance Adjustment)"}}

      Like
    • rownie23 Oh right, I think we're now explicitly preventing internal payees from being specified by name.  You'll want to use the payee_id for the account transfer payee.  You can grab this by fetching an account and then referencing the transfer_payee_id field.

      Like 1
      • rownie23
      • Slate_Gray_Panther.7
      • 2 days ago
      • Reported - view

      Brady That did the trick, thank you.

      Like
  • It seems like Transfers in Subtransactions aren't supported, yet. Are there any plans for implementing that?

    Like
    • Lavender Jackal That's correct, per this comment.  There are no plans to support that in the immediate future.  Can you help me understand your use case?

      Like
    • Brady Hi Brady. Thanks for your work so far :)
      I just started with the API and I immediately stumbled into this issue. I live in a household with a roommate and all common expenses like energy, grocery shopping etc.pp. are split between my "Energy" resp. "Groceries" categories and a transfer to a "virtual" account that represents the amount my roommate owes me. As you can image I have tons of those split-transfer-transactions.
      I have had modeled my roommate expenses with a category, but moved to a special account as this is much easier to handle when switching months.
      I hope this example helps to understand the need for this feature.
      Can you think of any workaround to achieve this?

      Like
    • Lavender Jackal Transfer payees in sub-transactions are now supported!

      Like 1
    • Brady You Guys are awesome!! Thanks

      Like
Like5 Follow
  • 5 Likes
  • 2 days agoLast active
  • 24Replies
  • 1950Views
  • 13 Following