422 - Invoice not found for this company

I’m trying to use the bank_transaction_explanation API endpoint, sending
through the following data:

  • bank_transaction
  • paid_invoice
  • dated_on
  • gross_value

When making the POST, I get the error “422 - Invoice not found for this
company” - am I missing some fields of information that are required?

Any help greatly appreciated.

Gavin

Hi Gavin,

Can you double check that the invoice exists for the company? For example,
if your POST request to create the Bank Transaction Explanation is:

{ “bank_transaction_explanation” :
{
“bank_transaction”:
https://api.freeagent.com/v2/bank_transactions/111”,
“dated_on”:“2013-09-12”,
“gross_value”:“10.0”,
“paid_invoice”: “https://api.freeagent.com/v2/invoices/222
}
}

… then you could check the invoice by doing a GET request to
https://api.freeagent.com/v2/invoices/222.

If that invoice doesn’t exist, please check that you’re using the correct
invoice URL (the last part is the ID, not the invoice reference). You can
see all your invoices by sending a GET request to
https://api.freeagent.com/v2/invoices.

Best wishes,
BenOn Thursday, 12 September 2013 04:18:41 UTC-7, Gavin Courtney wrote:

I’m trying to use the bank_transaction_explanation API endpoint, sending
through the following data:

  • bank_transaction
  • paid_invoice
  • dated_on
  • gross_value

When making the POST, I get the error “422 - Invoice not found for this
company” - am I missing some fields of information that are required?

Any help greatly appreciated.

Gavin