Our integration creates new invoices via the API and then imports invoice receipts on a scheduled basis so that users can view the status of open invoices.
We would like to do the same by importing write off transactions, but can’t see where this information is held. Essentially we just need details of ‘write off amount’, ‘invoice_reference’ and ‘writen off date’.
Is this something we would get from the invoice API or elsewhere?
You can query the invoices endpoint for all recent invoices, then look at each one’s
status field to find those which are
Part written-off. You can then look at an invoice’s
reference attribute and
Presumably the written-off amount is the same as the
You’re exactly right Andrew, an invoice which is written off will have a status of
Part written-off and if an invoice is written off, the amount written off will be the
Write off transactions don’t exist in FreeAgent as such, rather an invoice that is written off just has an amount still outstanding which has been written off.
A slight quirk I’d like to point out here is that the
written_off_date will only be included in the response if the invoice has no payments (ie is fully written off, not partially written off).
I think it would also be worth double checking for yourself that writing off your invoices is the appropriate thing to do and this Knowledge Base article should point you in the right direction:
All the best,
Hi Peter & Andrew,
Thanks for your help, this explains well the process and should enable us to build the integration in principle, but we will require it to work for both full and partial write off scenarios.
I have added my vote to the relevant item on your trello board.