Hi,
I’m trying to update an existing Bank Transaction Explanations by doing the following:
PUT https://api.freeagent.com/v2/bank_transaction_explanations/:id
The documentation says that the payload of the PUT should
… have a root
bank_transaction_explanation
element, containing elements listed under Attributes that should be updated.
From that I’d expect to be able to PUT the following, but despite receiving a 200 back, no update is made:
PUT https://api.freeagent.com/v2/bank_transaction_explanations/12345
{
"bank_transaction_explanation":
{
"description": "My new description"
}
}
As I said - I get a 200 back, containing a JSON representation of the existing explanation (with previous description) but no update is made.
I’ve also tried using a fully formed explanation object, but with the description altered, but get the same behaviour:
PUT https://api.freeagent.com/v2/bank_transaction_explanations/11111
{
"bank_transaction_explanation": {
"bank_account": "https://api.freeagent.com/v2/bank_accounts/22222",
"category": "https://api.freeagent.com/v2/categories/285",
"dated_on": "2019-06-19",
"description": "My new description",
"transaction_description": "COFFEE SHOP,GBR//DEBIT/£4.65",
"gross_value": "-4.65",
"foreign_currency_value": "0.0",
"transfer_value": "4.65",
"type": "Payment",
"is_money_in": false,
"is_money_out": true,
"is_money_paid_to_user": false,
"url": "https://api.freeagent.com/v2/bank_transaction_explanations/11111",
"bank_transaction": "https://api.freeagent.com/v2/bank_transactions/33333",
"detail": "Accommodation and Meals. Inc £0.78 VAT ",
"is_locked": false,
"marked_for_review": false,
"has_pending_operation": false,
"sales_tax_status": "TAXABLE",
"sales_tax_rate": "20.0",
"sales_tax_value": "-0.78"
}
}
Just for the sake of it, I did also try using a POST but received a 500 response (didn’t expect it to work but perhaps a 500 is not an ideal response?).
I’m sure I must be doing something wrong, I just can’t see what! Grateful for any help!