Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple IDs for project_id (on invoice) and invoice_id (on invoice payments) filter #260

Open
dddesign opened this issue Mar 11, 2023 · 3 comments
Labels

Comments

@dddesign
Copy link

I thought I can get e.g. invoices of two projects by global filters:
/api/v1/invoices?project_id=123,124
but I only geht the result of the first id. same for payments:
/api/v1/invoices/payments?invoice_id=567,568
what am I doing wrong?

@agileapplications
Copy link
Member

Hi @dddesign you cannot retrieve both invoices with one query in this regard. You would need to make 2 calls. The param project_id expects a single project id only. Or did you read that somewhere that this should be possible?

@dddesign
Copy link
Author

here in the documentation https://hundertzehn.github.io/mocoapp-api-docs/sections/invoice_payments.html#get-invoicespayments I red about the global filters https://hundertzehn.github.io/mocoapp-api-docs/entities#global-filters and thought that "Allows you to filter by IDs and fetch multiple entities comma-separated" would also fit on invoice_id, same for https://hundertzehn.github.io/mocoapp-api-docs/sections/invoices.html#get-invoices and project_id.

so, where can I use global filters?

@nethad
Copy link
Contributor

nethad commented Apr 5, 2023

Hi @dddesign

Global filters only apply to the filters ids and updated_after. We'll look into this for our next API update cycle to make project_id and invoice_id accept multiple ids. We always mark it in the documentation if you can supply multiple IDs, in your example we only show one ID on purpose.

@nethad nethad changed the title how is Global Filter working? Multiple IDs for project_id (on invoice) and invoice_id (on invoice payments) filter Apr 5, 2023
@nethad nethad added PLANNED and removed CLARIFY labels Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants