question

zendeyo avatar image
zendeyo asked cloveruser808 edited

API Requests

Is the production environment identical to the sandbox environment in regards to API requests? The reason is being according to https://docs.clover.com/docs/api-usage-rate-limits we shouldn't experience any issues with multiple requests. However, we are running into issues, so we are wondering if the sandbox environment is more limited in terms of API calls

REST API
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered

I don't believe so, can you explain the problem you are having in more detail?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

zendeyo avatar image
zendeyo answered David Marginian Deactivated commented

Our app is pulling in order information form Clover. With 1 or 2 devices it works fine, however if we plug up 5 or 6 devices running our app, there seems to be a huge delay. I would think that with 5 or 6 devices sending api requests every 10 seconds, we should have no problem. Let me know if it's easier for me to email you directly.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·
Are you sure you are not getting rate limited? WIthout more details it is really difficult to offer you any assistance. What requests are you making, what responses are you receiving, how are you making the requests (from native Clover device via our Android SDK? From Android tablet? )
0 Likes 0 ·
zendeyo avatar image
zendeyo answered

Let me get these details and I will update this thread

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

cloveruser808 avatar image
cloveruser808 answered cloveruser808 edited

FYI, something I experienced with multiple online devices: You mentioned you have 5 or 6 devices sending api requests every 10 seconds. If these devices are live and in stores, and your stores get consistent traffic, you will often see bursts of multiple requests per second.

I ran into this when applying discounts to an order via webhook and API. In my test environment with one device, it was straightforward. But when I tried it on live, I noticed an order was getting the same discount applied over and over again, inside of the same second.

The webhook was being hit many times per second and it was causing my code to cycle through the same discount for the same order. What this showed me (among other things) was that it can be very easy to hit a rate limit if you don't otherwise handle the limit errors.

One way to test this is create a temporary table (if you're using a database) and create a record every time there's an API request. This could show you how many times the API is actually running.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community