# How to update the type of a bank transaction explanation

**URL:** <https://api-discuss.freeagent.com/t/how-to-update-the-type-of-a-bank-transaction-explanation/1709>\
**Category:** Documentation\
**Created:** [29 October 2019 17:14 UTC](https://api-discuss.freeagent.com/t/how-to-update-the-type-of-a-bank-transaction-explanation/1709 "2019-10-29T17:14:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Glynn](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/ben_glynn/32/227_2.png) [@Ben\_Glynn](https://api-discuss.freeagent.com/u/Ben_Glynn)\
**Post date:** [29 October 2019 17:14 UTC](https://api-discuss.freeagent.com/t/how-to-update-the-type-of-a-bank-transaction-explanation/1709/1 "2019-10-29T17:14:31Z")

</div>

Hello FreeAgent API forum!

I would like to update the type of a bank transaction explanation. The [docs](https://dev.freeagent.com/docs/bank_transaction_explanations) don’t go into enough detail unfortunately. For example: an explanation has a type of “Payment” with a category of 280 and I want to update it with `PUT` to an explanation with a type of “Money paid to user”, a category of 907 and (an additional field for this type) a paid user of 706069. If I try this:

```
PUT https://api.freeagent.com/v2/bank_transaction_explanations/167295407
{
    "bank_transaction_explanation": {
        "category": "https://api.freeagent.com/v2/categories/907",
        "is_money_paid_to_user": true,
        "paid_user": "https://api.freeagent.com/v2/users/706069"
    }
}

```

I get the following response:

```
400 Bad Request
{
    "errors": {
        "error": {
            "message": "unknown attribute 'category' for BankAccountEntry."
        }
}

```

}

Confusing! I have a large batch of these to update, so any help would be much appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![Anup\_Narkhede](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/anup_narkhede/32/95_2.png) [@Anup\_Narkhede](https://api-discuss.freeagent.com/u/Anup_Narkhede)\
**Post date:** [4 November 2019 13:09 UTC](https://api-discuss.freeagent.com/t/how-to-update-the-type-of-a-bank-transaction-explanation/1709/2 "2019-11-04T13:09:23Z")

</div>

Hi Ben,

Apologies, the error message is indeed misleading. It looks like the underlying cause is the missing `gross_value` parameter. The following request should work:

```auto
PUT https://api.freeagent.com/v2/bank_transaction_explanations/167295407
{
   "bank_transaction_explanation" : {
      "gross_value" : [AMOUNT]
      "category" : "https://api.freeagent.com/v2/categories/907",
      "paid_user" : "https://api.freeagent.com/v2/users/706069"
   }
}

```

Thanks,

Anup
