Question about URL filter

When we use the GET API to filter data, is there a possibility to optimize the way we send multiple values ?

For exemple, if I use a “linked_with” or even an “in” operator, I currently have to do something like this for each value :
where[0][rules][0][value]=6411e0d04b25f138c
where[0][rules][0][value]=6411e0bc198af96ea

So my URL grows really quickly.

Is it possible to send a list of values separated by commas, or to use a different method ?

There is no alternative way to filter. Maybe you’d rather use a subQuery? When you filter products by brand, for example, when filtering by in in the modal window, you can not only choose which brands you are interested in, but you can filter the brands at your own discretion and select all of them. Thus, a subQuery will be added to the main product filter. Try it, I think it will significantly reduce the size of the query.

Thanks for your answer !

I didn’t know the “subquery” but I don’t think I can do what I want with it.

My problem is that my users have a stock of products. Managing stock is in my software, not in Atropim. In some screens in my application, I have to filter the products that are in stock for a user and apply different filters after that (like categories/attributes/…). My users can have 300 products in stock, and I can’t use subquery to know which one, and it’s complicated to “split” the call because of the offset/limit of the tables in the application.

It would be nice to be able to just separate the values with a comma, or to be able to use an API with a body (like a post) to filter long object. Do you think it’s something that it can be possible on your side ?

To be honest, if this happens, it will not happen in the near future. There are many much more important things that need to be addressed. In general, I understand the problem you describe. The moment we start changing something in the API, I will remember your case and we will definitely take it into account.