Fetch products for a specific filter value

jefvlamingsjefvlamings Posts: 1Member
We are considering using the eCom API to build a webshop upon. 
From the documentation it seems there is no possibility to query products based on specific filter values.

If we, for example, have defined a filter "Color" and specified that a product is yellow, we would like a way to filter all yellow products with one call. How can this be implemented through the eCom API?

Thanks in advance.

Answers

  • Alex LugoAlex Lugo Posts: 119Administrator, Lightspeed Staff moderator
    Hello @jefvlamings,

    It is not possible to filter by product's sets. You will need to apply these filter with the data provided by your request.
    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • TradingboTradingbo Posts: 20Member

    Hi Alex, could you expand on this?

    We are trying to create an AJAX/JSON filtering system whereby products are loaded in realtime via filters in a given category.

    If you could give an example of how to filter the 'filter' data in an API request would be brilliant.

  • Adrian SamuelAdrian Samuel Posts: 416Moderator, Lightspeed Staff moderator
    edited May 3

    @Tradingbo, essentially Alex is saying, you need to request the data from the Lightspeed API, then your business logic in your application will filter for the relevant data since there isn't a way to selectively retrieve those objects from the API request.

    We could provide an example of how this would be done, but understandably, the method would differ on the language used

  • TradingboTradingbo Posts: 20Member

    Ok thanks

Sign In or Register to comment.