Is there a way to filter products

hi there
i would like to get active skus of the products in my catalog.
https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-products-skus
this returns every possible product (even the ones that are out of stock)
how can i get only the active products ?

Hello!

Please take a look in this API.
https://developers.vtex.com/vtex-rest-api/reference/productsearchfilteredandordered

hi there thank you for your reply
but i have 2 problems:

  • that api doesnt return total number of results
  • that api doesnt allow me to paginate, i get this error : “Parameter _to can’t be greater than 50.”

Hi @alierdem

Do you want the active products, available products, or active SKU into a specific product?

Admin

  • Go to {{account}}.myvtex.com/admin/Site/Produto.aspx
  • Button “Filter results or do a search”
  • On the “Status” field select “Active”
  • Click on the “Search” button

Only the available products will be returned and the total number will be displayed in the right corner, like “21 Product Found”.

Spreadsheet

  • Go to {{account}}.myvtex.com/admin/Site/Relatorio_Skus.aspx
  • Button “Filter results or do a search”
  • On the “Status” field select “Active”
  • Click on the “Search” button
  • Export/Import
  • Click on “Export to excel”

You will receive an excel file of all active SKUs.

API

The Search APIs are public, so only active and visible products will be returned.
If you want the active SKUs of a product, I think you must get the SKUs ID first, and then get into the SKU API if it is active or not.

Another option is the use of the API to list the ids and use the search API for each sku to check if its active in the site.

like i said: i want to get every product an user can go on the website and can buy right now (active and available at the same time). i have to do this through api .
only solution i can find right now get all the product ids and send a request for each of them but that takes a lot of time since my client have 1.3 million products and only 200 thousand of them are active

but that takes tremendous amount of time