Bulk transaction update asks for date and amount

Hello API team,

When updating a single transaction the API lets me send just the attribute that I want to update (for example, the memo):

{
    "transaction": {
        "memo": "My new memo"
    }
}

However, I tried the same with the new bulk update endpoint but it's asking me to provide a date and an amount:

{
    "transactions": [
        {
            "account_id": "dummy_account_id",
            "id": "dummy_transaction_id",
            "memo": "My new memo"
        }
    ]
}

Returns:

{
    "error": {
        "id": "400",
        "name": "bad_request",
        "detail": "date is required (index: 0), amount is required (index: 0)"
    }
}

Would it be possible to have the same behavior as in the single update endpoint and make date and amount optional (and perhaps the account_id too)?

7replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Rafael Millan - What endpoint / method are you using for that first example when only supplying a memo?

    Reply Like
  • Rafael Millan When you made that request that got the `HTTP 400` response, did a transaction with `id: 'dummy_transaction_id'` already exist? Or did it represent a new transaction you expected to be created?

    Reply Like
  • Hi Brady , for my first example I'm using PUT https://api.youneedabudget.com/v1/budgets/:budget_id/transactions/:transaction_id

    George , for the second call I used the id of an existing transaction.

    I can send the full HTTP requests/responses if you want.

    Reply Like
  • Rafael Millan - Got it.  Yes, it would be nice to only need to provide updated field values on the PATCH /budgets/:id/transactions.  I'll look at getting this changed.  I can't promise but I like this change and it seems fairly easy to make.

    Reply Like
    • Brady Great, thank you!

      Reply Like
  • We just released an update that supports patching of transaction resources  on 'PATCH /budgets/{budget_id}/transactions '.

    Reply Like
  • Fantastic. Thank you.

    Reply Like
Like Follow
  • 12 days agoLast active
  • 7Replies
  • 89Views
  • 2 Following