Hi Paul,
Thank you for keeping this discussion separate to Error with Bank Transaction Explanations - #2 by Paul_G1, and I’m sorry to hear that our API is causing frustration.
As you concluded, the issue with your first request was indeed omitting a gross_value
. I agree that the error message returned when omitting a gross_value
is very misleading, and I’ve written up an issue report so that fixing this can be prioritised.
For a little background (and for future Googler’s) entry_type
is a field used internally while
mapping explanation types (invoice receipts, user payments or assignment directly to a category) to accounts. Often, seeing an error around this would indicate the lack of a category. As you pointed out, however, this is indeed not necessary while making certain types of requests (invoice receipts, bill payments etc), as the category can be inferred.
To answer your questions directly:
why do we need to provide a description for transfers? - you ignore it anyway and put in your own description
I’ve been able to create a transfer without a description using a POST body similar to that below:
{
"bank_transaction_explanation": {
"dated_on": "2017-06-07",
"bank_transaction": "http://api.freeagent.com/v2/bank_transactions/502",
"transfer_bank_account": "http://api.freeagent.com/v2/bank_accounts/81",
"gross_value": 10
}
}
I’ll log this as a documentation issue. The same also appears to be true of invoice receipts.
why do we need to provide a dated_on when the Bank Transaction itself has a date - can’t we default to that?
This is a good question, and I’ll log a further issue for discussion. It certainly feels like this shouldn’t be necessary.
why do we need to provide a gross_value when the transaction has a value/unexplained_value?
A transaction can have many explanations (each with different categories). As we’re dealing with accounts here, I feel it makes sense to be explicit about which portion of the transaction is assigned to which category.