Creating a transaction is failing with base Entry Type is invalid

Hello,

I’m posting

{“bank_transaction_explanation”:{“bank_transaction”:“https://api.freeagent.com/v2/bank_transactions/xxxxx",“dated_on”:“2016-01-28”,“gross_value”:"33.8”}}

to

https://api.freeagent.com/v2/bank_transaction_explanations

but the API is returning a 422 with

{“errors”:[{“message”:“base Entry Type is invalid”}]}

Any ideas?

Hi Tomas,

From the JSON you’ve posted it appears that you’re missing the explanation
part of the bank_transaction_explanation. In order to account correctly for
this transaction FreeAgent needs to know what it was for - if that is not
provided you will see the error message you’re getting.

From FreeAgent Developer Dashboard

In general the explanation type is chosen by setting the category

parameter. However, for paying an invoice, bill or transferring funds
between bank accounts, the category is not required. To make a Smart User
Payment, set the paid_user parameter, but omit the category parameter. To
create explanations for other kinds of user payments set both the paid_user
parameter and the relevant category parameter.

To summarise, you need to supply one of category, paid_invoice, paid_bill,
or paid_user so that FreeAgent can create the explanation for you.

Hope that helps,
Paul.On Friday, 29 January 2016 09:22:13 UTC, Tomas McGuinness wrote:

Hello,

I’m posting

{“bank_transaction_explanation”:{“bank_transaction”:"
https://api.freeagent.com/v2/bank_transactions/xxxxx
",“dated_on”:“2016-01-28”,“gross_value”:“33.8”}}

to

https://api.freeagent.com/v2/bank_transaction_explanations

but the API is returning a 422 with

{“errors”:[{“message”:“base Entry Type is invalid”}]}

Any ideas?