Php api: get list of open invoices for customer?

Is there a way to get a list of all open (or just “all”) invoices for a customer wuth the PHP API?

I can create customers and invoices, but don’t see a way to get a list of all the invoices the customer already has.

Is this possible with the PHP API? Can you point me to an example or docs?

Thanks!

Terry

One option may be to add ?include=invoices to the /clients route

That sounds very promising, however I’m not very familiar with the architecture of the php API.

Where would I add this?

Thanks!

PS. Your tip about NinjaConfig::setPerPage(9999) for the 15 row limit was perfect! Thanks!

Includes aren’t supported with the SDK, you’d need to connect to the API directly

Hi Hillel, I was looking for this and it worked just fine.
This is who I used it: /api/v1/clients/{id}?include=invoices

Can I ask you how did you come to this conclusion?

This is not documented on invoice ninja swaggerhub page

Where can I find this operators?

Thank you.

I’m not sure, you may need to reference the source code: