Rest API Not Query not working correctly!

@Shopify_77 ,

this is a follow up to my post on the issue with the graphql query. https://community.shopify.com/topic/1925563

I have also now been able to replicate the same behavior with the REST API.

here is my query:

https://[shopname].myshopify.com/admin/customers.json?query=orders_count:0&limit=50

query returned 28 records.. but also returns a next page link.

https://[shopname].myshopify.com/admin/customers.json?limit=50&page_info=eyJsYXN0X2lkIjo2NTkzNjgyNzM1MzMxLCJsYXN0X3ZhbHVlIjoxNjc0NDA3MjEyMDAwLCJkaXJlY3Rpb24iOiJuZXh0In0; rel=“next”

This should not happen! I should only get a cursor with a next page of results if my query limit is reached and there is a next page.

Checking in the admin there are over 3k customers without orders.. so I should have a next page, but I should also get 50 results back.

using the next link returns 4 results, but also has a next page link, and following that link returns a single result.. with a next link…

update: So I tried a work around

https://[shopname].myshopify.com/admin/customers.json?limit=50&order=orders_count%20asc

returns zero results! I mean it is “asc” right?

https://[shopname].myshopify.com/admin/customers.json?limit=50&order=orders_count

-defaults to desc as per documentation.

returns 50 results

Please fix this!

Regards,

Gary

3 Likes