Other ways of getting filtervalues and attributes?

aalaal Member Posts: 2

Hi.

I'm building a product feed with your api.

I would like to include both filters and attributes for each product but it seems these are only possible to get in a "pr. product" type request? We would like to run these feeds a couple of times pr. day but with rate limiting on the api this becomes difficult for shops with many products. 

Are there any other way of getting these values? I'm thinking like the "tagsProduct" call where you get a map of tag id's and product id's that are connected.

3 comments

  • LeahLeah Moderator, Lightspeed Staff Posts: 134 moderator

    Hi @aal you can use product webhooks to grab newly added products to update your feed. It's not advised to populate your feed from scratch several times a day, and the webhooks will allow you to update your database any time a product is created, modified, or deleted. More details on webhooks can be found here: https://developers.lightspeedhq.com/ecom/endpoints/webhook/

    API Support
    Lightspeed HQ
  • aalaal Member Posts: 2

    @Leah I understand the benefits of only requesting updated/changed products, especially when building the feed multiple times pr. day - but how am i going to build the feed for the first time?

  • LeahLeah Moderator, Lightspeed Staff Posts: 134 moderator

    @aal As long as you keep an eye on the headers you can sleep your application to avoid hitting the rate limits during initial sync. More details on those headers can be found in this article: https://developers.lightspeedhq.com/retail/introduction/ratelimits/

    Your initial sync may take some time, depending on the size of the account, but once that's done, updating the feed using webhooks should improve your feed sync efficiency.

    API Support
    Lightspeed HQ
Sign In or Register to comment.