Changes to eCom API rate Limits

MilesbdMilesbd Moderator, Lightspeed Staff Posts: 28 moderator

Greetings eCom API Community!

We're implementing a change to the eCom API effective Monday November 22nd, 2021. We will be implementing a per-second rate limit of 5 requests/second 20 requests/second (see comment below) which will apply at the per-shop, per-key level. This change is simply a scaled-down (in timeframe) application of the existing eCom API rate limits.

For clarity, here are a couple of examples that showcase this change:

Example 1:

A shop with a single set of API credentials has an external integration that adds orders to their eCom shop. The shop processes each order sequentially, writing at 2 requests/second during the order creation process. After the rate limit change, there would be no change to their integration's functionality, as they operate well below the 20 requests/second limit.

Example 2:

A shop has three sets of API credentials, and uses them to add new customers to their customer database. They are adding customers at a rate of 25 customers a second, but spread the traffic across their three credentials, where each set of credentials is sending ~8 requests/second. After the rate limit change, there would be no change to their integration's functionality, as they each set of credentials is below the 20 requests/second limit.

Example 3:

An app developper has created an app that is connected to 300 shops. This app uses a queue to write sales to shops, and can handle write to 50 shops concurrently, writing to each shop at a rate of 10 requests/second After the rate limit change, there would once again be no change to the app's functionality, as they are staying within the limit of 20 requests/second per shop.

Example 4:

A shop has three sets of API credentials, and uses the credentials add products to their eCom shop. They wait until there are 120 products to be added to the eCom shop, and send all the requests at once, spreading the traffic across their three sets of API credentials. After the rate limit change, they would experience rate limiting as each set of credentials would be sending requests in a burst pattern, at a rate of 40 requests/second, which exceeds the 20 requests/second limit.


If you have any questions or feedback about this change, please leave a comment below!

Post edited by Milesbd on

3 comments

  • wwdanielwwdaniel Member Posts: 17

    Is there any way in which we can check how often we are currently running more than 5 requests / second, per API key?

    Implementing a queuing solution on such short notice is nearly impossible.

  • MilesbdMilesbd Moderator, Lightspeed Staff Posts: 28 moderator

    Hi @wwdaniel, Great question!

    If there is any logging present in your integration, you should be able to log events per request, including parameters such as a timestamp and an identifier per credential used.

    Plotting the events in a time-series would be able to highlight occurrences where an API key is sending over 5 requests/second.

  • MilesbdMilesbd Moderator, Lightspeed Staff Posts: 28 moderator
    edited November 22

    Hi Everyone!

    We've revised out strategy and will be increasing the rate limit from 5 requests/second per-shop, per key to 20 requests per-shop, per-key.

    The above examples and post have been edited to highlight these changes.

Sign In or Register to comment.