Options
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
Systematically add a filter on status
05-02-2021
16:39
by
Véronique
We almost always only need the active items in a list. The endpoints to retrieve VAT categories and inventory items don't expose a parameter to filter on the status.
Having to filter on the client side has two disadvantages:
- we have to load items that we don't need
- we can't leverage pagination as its very difficult to display paginated items that don't match the API requests. Ex: if I want to display 100 active items, I have to make multiple API calls until I reach 100 active items. When I want to display the second page of 100 active items, then I have to remember where I had left off for the first page. Very error-prone.
Of course, this parameter has less priority on the endpoints that return a short list of items.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.