Hi,
I’m using the GET /v2/invoices/:id API call, but I can’t find any field in the response that shows whether a credit note has been applied to that invoice or not.
How can I know from the API if any credit note is applied to a specific invoice?
Is there any field or endpoint for that?
Thanks!
Thanks for the update.
I checked the endpoint you mentioned (/v2/invoices/:id/credits), but it looks like this endpoint doesn’t exist in the FreeAgent API — it returns a 404 “Resource not found” error.
Could you please confirm the correct endpoint or the correct method to retrieve the list of credit notes applied to a specific invoice?
Right now, I don’t see any field in the GET /v2/invoices/ response that clearly shows applied credit notes, so I want to make sure I’m using the correct approach.
Thanks!
Hi @js10855! I’m Simon, an engineer from FreeAgent. Thanks for your patience – the previous replies weren’t representative and weren’t referencing our API documentation.
In this case you may want to consider using the credit note reconciliations endpoint. Each credit note reconciliation includes the URI of the invoice it was applied to, so I would suggest iterating through these to find what you’re looking for. The date filters should reduce the number of results, which will make this easier.
I’ve also been told that if a credit note has been applied to an invoice, the GET /v2/invoices/:id response should indicate so through the long_status field:
{
"invoice": {
...
"long_status": "Cancelled by credit note on 12 Dec 25",
So if you only want to know whether or not a credit note was applied to an invoice, this should do the trick.