question

voicy avatar image
voicy asked David Marginian Deactivated commented

/v3/merchants/{merchantID}/customers.csv returning fewer customer records than Merchant currently having

We have a merchant with around 10,000 customers. We've recently observed some anomalies with the /customers.csv endpoint where it returns fewer than the complete number of customers. It typical returns between 1,000 and 7,000 customer records. This anomaly can be reliably reproduced by manually calling the endpoint using Postman or curl.

We've also noticed that regardless of the number of records eventually returned, the clover API server also returns after 60 seconds. So we're wondering if the truncated results could be the effect of some kind of server timeout on Clover's end? If this is correct, will Clover provide guidance about a fix on their end, or about a suggested workaround?

Customers
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 David Marginian Deactivated commented

In a moderators only comment can you include the merchant id? Once provided I can investigate this and create an issue if it is a problem on our end.

One option for working around this is to use https://docs.clover.com/reference/customers-1#handlersgetcustomers-1 and paginate the results https://docs.clover.com/docs/paginating-elements.

5 comments
10 |2000

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

voicy avatar image voicy commented ·

merchant Id : JBXNZ24Q0N0H2

0 Likes 0 ·
voicy avatar image voicy commented ·

Hi David, as per your suggestions I'm trying to paginate the results, but I have found that even if we are using the offset as 1,00,000 we are able to retrieve the customers data. Here, I want to Confirm whether it is REST api's fault/bug or merchant itself having customers data more than 1,00,000?

merchant Id : JBXNZ24Q0N0H2

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ voicy commented ·

I don't understand what you are saying. Please reform your question to be consistent and clear.

Did you mean to say you "can't" retrieve the customers data? Offset of 1,00,000? Do you mean 100,000? You need to set your limit to 1000. First request offset 0, limit 1000, next request offset 1001, limit 1000, etc. What endpoint are you using?

0 Likes 0 ·
voicy avatar image voicy David Marginian ♦♦ commented ·

Hi David, Sorry for inconvenience. I'm able retrieve the customers data with REST API "https://api.clover.com/v3/merchants/:mId/customers?access_token=xxxxxxxxxxxxxxxxxxxxxxxxx&expand=phoneNumbers&offset=100000&limit=1000". My question is that even if we are giving offset value as 100,000 we are fetching data right, so I want to know does this merchant having customers data more than 100,000 or it is an anomoly/bug, since offset value is very huge?

merchant Id : JBXNZ24Q0N0H2

0 Likes 0 ·
Show more comments
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

The inconsistency in the result set is a known issue on our end. I don't have an ETA on the fix.

To work-around it you are going to have to utilize pagination per my original answer.

10 |2000

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