Fetch products by category and suppliers

Hi,
Is it possible to make an api request and get all the products in category and/or supplier hierarchy?

So I mean response in a form sort of like:

{
  "data": {
    "category1": [<products array>],
    "category2": [<products array>]    
  }
}

Thanks

At the moment, no. And honestly that might be too much to send back in a single response (we have implementations with 100s of categories and 10,000s of SKUs).

Could you explain in detail what you’re trying to do from the API client perspective?

We could probably add an endpoint like this, so that you could retrieve all products under a single category.

GET /api/categories/:id/products  

That way you could iterate over the categories

GET /api/categories

and then fetch the products for each category.

Otherwise, you to pull all products (including category)

/api/products

and then let the client build the category-to-products map.