Order and OrderProduct rate limit issues

ADDADD Member Posts: 5


Is there a way to get an Order and its associated OrderProduct(s) in a single call?

The problem we are having is that we pull a list of orders from the Order checkpoint (250 max per request) and then to get the OrderProduct(s) for each of those orders, we have to make a request to the OrderProduct endpoint for every single order. This very quickly exceeds the 300 per 5 min and 20 per sec request rate limits and becomes a non-workable solution.

Is there any way we can optimize this to use less requests? Even if we could get a list of all OrderProducts that would be helpful.




  • gregaricangregarican Member Posts: 926 

    Doesn't E-Com have webhooks you can use?

  • ADDADD Member Posts: 5

    I'm not sure. Hoping to get it working through regular API requests.

  • gregaricangregarican Member Posts: 926 

    It does offer webhooks. See here --> https://developers.lightspeedhq.com/ecom/tutorials/webhooks/ for details. Using these will help avoid hitting the API with requests. Unless you are performing a large initial sync.

  • ADDADD Member Posts: 5

    We are a group of end-users of Lightspeed that want to collect some information in a spreadsheet via the API. I don't think webhooks is the right solution for us but thanks for the suggestion.

  • Ali_MasoumieAli_Masoumie Moderator, Lightspeed Staff Posts: 383 moderator

    I would also recommend using webhooks, but if that's not the right solution for you, then getting the information from OrderProduct is the way to go.

  • ADDADD Member Posts: 5

    Thanks for the advice @Ali_Masoumie could you also comment on the original question? Looking for a way to optimize API calls to reduce total number of calls.

  • Ali_MasoumieAli_Masoumie Moderator, Lightspeed Staff Posts: 383 moderator
    edited July 11

    Please consider using webhooks.

    If you, for example, set up an 'orders/created' webhook, you will get a webhook with all the needed information as soon as an order is created.

    You can test this out by creating a webhook and point it to https://webhook.site/

    By using webhooks, you do not have to make any calls yourself to get the data.

  • ADDADD Member Posts: 5

    Thanks @Ali_Masoumie . Again this is for a group of Lightspeed end-users, not a group of 3rd party software developers, so implementing a webhook is probably not the right choice. If there is no way to optimize our API calls then we will work within those limits.

Sign In or Register to comment.