Discussions

Ask a Question
Back to all

Question about retrieving invoice categories via the Pennylane API

Hello,

We are using the Pennylane API to retrieve customer invoices and their associated categories in our application.
Currently, we need to make a separate API call for each invoice in order to fetch its categories:

GET /api/external/v2/customer_invoices/{customer_invoice_id}/categories

With over 1,000 invoices, this results in more than 1,000 additional API calls, which significantly impacts our application's performance.

In the Pennylane interface, filtering by category is very fast (a few seconds), which suggests that the data is optimized on the server side.

Question:
Is there an API endpoint that would allow us to:

Retrieve the categories of multiple invoices in a single call?

Or fetch all invoice–category associations in a single request?

If such an endpoint does not currently exist, would it be possible to consider adding this functionality in a future version of the API?

Thank you for your help.

Best regards,