Skip to content

How can I get a list of items on stock, filtered by certain product attributes?

I want to fetch (using the REST API) a list of products that are:

  1. Above a certain price
  2. Enabled
  3. On stock

I can filter fine on the first two using the price and status fields in the rest/V1/products call, but the stock status cannot be found.

I can get stock status for a certain SKU using rest/V1/stockItem, but that would mean a lot of calls the get my list.

How can I get a list of on-stock items with a certain product filter?