Missing field and unexpected behavior in PATCH /budgets/{budget_id}/transactions endpoint

The endpoint doc mentions the "id" field in the description, but the actual request schema does not have this field.

Also, it's usual for PATCH requests in REST-style APIs to not touch fields which were not provided, but in my tests it did overwrite everything with the content of the provided object. For example, I provided the "id", "date", "amount", "account_id" and "cleared" fields, and it overwrote the flags, payee, category, etc, behaving more like a usual PUT endpoint.

I suppose changing API semantics at this point is out of question, but you may want to consider including this behavior in the endpoint docs.

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Rafael Almeida -

    The endpoint doc mentions the "id" field in the description

    Are you referring to the "Updates multiple transactions, by ‘id’ or 'import_id’." bit (screenshot attached)?  If so, I can get that corrected.

    Also, the PATCH on /budgets/{budget_id}/transactions is for pathing the collection of resources, not patching the individual resources.  So, it is basically a bulk update endpoint.  This is why the entire representation of the resource (transaction) is still expected to be provided.

  • We just released an update that adds the "id" field in the spec and allows for patching transaction resources  on 'PATCH /budgets/{budget_id}/transactions '.

Like Follow
  • 9 mths agoLast active
  • 2Replies
  • 52Views
  • 2 Following