How to filter invoices using the API

I am having trouble filtering invoices while consuming the API…

For instance, https://invoicing.co/api/v1/invoices?client_id=xxxx works but filtering by status_id has no effect.

For example, I am trying to get all invoices from a certain client that have an open balance and that were not deleted.

I understand that the clients endpoint gives me the balance for a certain client but I need to know how old the actual invoice is.

The documentation is not very clear, plus I believe that it has a typo…

Lists invoices, search and filters allow fine grained lists to be generated. * * Query parameters can be added to performed more fine grained filtering of the invoices, these are handled by the InvoiceFilters class which defines the methods available

try

?client_id=xxxx&status=active

Thank you, that at least returns only invoices that are not deleted (apparently ?status=deleted does the opposite)…

Not sure how to fetch only unpaid invoices though… Where could I find the available filters?

Thanks.

?client_status=unpaid

If you inspect the folder app/filters/invoicefilter.php

you’ll see this is where we keep all the logic when filtering data.