invoiceninja / sdk-php

PHP wrapper for Invoice Ninja's REST API
https://www.invoiceninja.com
83 stars 42 forks source link

How to get invoices by client id? #105

Open evrim opened 7 months ago

evrim commented 7 months ago

Hello,

I have been fiddling with the API and I must admit, it seems very nice, kudos to the devs. I have a small problem pertaining to the indexing function.

So, /api/v1/clients rets the client id hashed such as "VolejRejNm". When I pass this key to invoices index, I don't get proper results ;( In particular, I make a call to /api/v1/invoices?filter=VolejRejNm and the results are empty. I understand that in order to hide database keys, there has been a hashing algo in place but no insights are given in the documentation on how to pass these back and forth. Therefore these ID's does not lead much help when trying to follow relations in the objects graph. Any ideas? I mite be also interested in disabling the hiding mechanism since the API is restricted and not public if thats an easier approach.

best, evrim.

turbo124 commented 7 months ago

/api/v1/invoices?client_id=xxxxxxxx

evrim commented 7 months ago

I am also interested in finding invoices for a particular recurring_id. I think that's not possible atm, right?

Btw, client_id does not appear in the parameter/query list when I generate openapi specs.

turbo124 commented 7 months ago

currently not possible, I would filter by client_id and then with the response filter by recurring_id