Customers API endpoint no longer honoring since_id

Highlighted
New Member
2 0 4

We are making GET requests on behalf of our customers and something has changed in the past day or so. It appears as though the Customers API endpoint is no longer honoring the provided since_id param:

 

GET https:<store>.myshopify.com/admin/customers.json?limit=250&since_id=789838168100&status=any&updated_at_min=2019-08-13+08%3A31%3A23%2B00%3A00&updated_at_max=2019-08-14+08%3A30%3A15%2B00%3A00

 

When this request executes, we are receiving Customer results with ID's less than the since_id, for example: 678875332644 < 789838168100. The docs indicate that since_id restricts the API response: 

Restrict results to those after the specified ID.

 

This appears to no longer be the case as of yesterday across multiple Shopify stores. What's going wrong? Was there a recent change in this behavior over the past 24 hours?

4 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 179

Hey @Stitch , 

 

I've just raised this with our customers team to investigate further. I'll let you know once I have more info to share! 

1 Like
Highlighted
Tourist
4 0 1
0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 179

Hey again @customology , @Stitch , 

 

We've identified the source of the problem, and there will be a fix pushed out for it shortly. Check back within the next hour and since_id should be working again - but let me know if you still encounter issues!

0 Likes
Highlighted
New Member
3 0 0

Is this fixed? I'm facing the same issue where since_id is not being respected by the API. I need to retrieve the list of all customer IDs but it keeps giving me the same set of users again and again.

0 Likes
Highlighted
Tourist
4 0 1

Hi Gauravsingh00

 

I am no longer experiencing this bug.  I've tested with both the 2019-07 and 2019-10 api versions.  I think you need to set since_id to 0 in your initial request.  Then for each subsequent request, set since_id to the id of the last customer object in the response, as they are (or should be) always ordered by id smallest to largest.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 179

Hey there, 

 

Yes - a fix for this went out. @customology hit the nail on the head with their explanation above as well - if you're following those steps then you should be able to paginate through all of a shop's customers.

 

0 Likes
Highlighted
Excursionist
15 1 1

Do you know if this works for Products?  I am trying to get a complete list of all the products.

0 Likes
Highlighted
Tourist
4 0 1

Hi TxBob77.

 

Yes the same approach will work with the myshopify.com/admin/api/<api_version>/products.json endpoint to fetch all products.  Set since_id=0 for the first request, then for each subsequent response, set since_id to the id of the last product in the list of product objects returned by the response.  I also recommend setting limit=250, (the max it can be) to reduce the number of API requests required.

0 Likes