"unknown attribute 'category' for BankAccountEntry"


#1

Hello,

I am trying to add a new Bank transaction via the API and am getting the following error:

unknown attribute ‘category’ for BankAccountEntry.

At the same time, omitting the category element returns an error saying the parameter is required (as expected):

category can’t be blank

Here’s the request body I’m sending:

{"bank_transaction_explanation":{"bank_account":"https://api.freeagent.com/v2/bank_accounts/561543","description":"Testing","dated_on":"2018-09-09","category":"https://api.freeagent.com/v2/categories/285"}}

Does anyone has an idea on what’s wrong? Thanks! :heart:


#2

Nevemind, I solved it.

Turns out adding a gross_value parameter made the previous error go away. The validation error message is misleading though; why would it ever complain that category is an unknown attribute? If gross_value is required I would think it would complain about that instead.


#3

Hello!

Thanks for updating us, and we’ll add a ticket for this to look into the misleading error message.

Sorry for the confusion it caused.