[BUG] 0 orders returned for merchant with 1000 orders

Shopify Partner
6 0 3

Hi, we have a Shopify app that analyzes a shop's orders. Unfortunately, we're experiencing a weird issue with one of our customers - although they have lots of orders, the Shopify API returns none and the count returns 0.

The merchant has installed our app and has reported that we are showing no data.

I have checked the issue and, indeed, when asking the Shopify API for their orders, it returns an empty list. When we ask for the order count, it returns 0. However, the merchant states that they have around 1000 orders, and has sent us a screenshot of their order list that confirms this.

Below are the API requests we tested (with sensitive data eliminated), with the corresponding response from Shopify. Note that we don't receive any authentication error and are able to get the product list, which does not come empty.

It seems it's not a problem on our side. Can you please help? This is impacting one of our users and is blocking us from providing a good service.

$ curl 'https://SHOP_NAME.myshopify.com/admin/orders.json'; \
-D - -G \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: TOKEN'

RESPONSE:

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 25 Sep 2014 11:31:35 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept-Encoding
Status: 200 OK
X-XSS-Protection: 1; mode=block; report=/xss-report/XXXX?source%5Baction%5D=index&source%5Bcontroller%5D=admin%2Forders&source%5Bsection%5D=admin
X-Content-Type-Options: nosniff
X-UA-Compatible: chrome=1
X-ShopId: XXXX
X-ShardId: 3
X-Shopify-Shop-Api-Call-Limit: 1/40
HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT: 1/40
X-Stats-UserId: 0
X-Stats-ApiClientId: XXXX
X-Stats-ApiPermissionId: XXXX
X-Frame-Options: SAMEORIGIN
Set-Cookie: request_method=GET; path=/
Set-Cookie: _secure_admin_session_id=XXXX; path=/; secure; HttpOnly
X-Request-Id: XXXX
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
X-Served-With: ZX_Spectrum/1997 (Sinclair_BASIC)

{"orders":[]}

$ curl 'https://SHOP_ID.myshopify.com/admin/orders/count.json'; \
-D - -G \

-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: TOKEN'

RESPONSE:

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 25 Sep 2014 11:32:55 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Accept-Encoding
Status: 200 OK
X-XSS-Protection: 1; mode=block; report=/xss-report/XXXX?source%5Baction%5D=count&source%5Bcontroller%5D=admin%2Forders&source%5Bsection%5D=admin
X-Content-Type-Options: nosniff
X-UA-Compatible: chrome=1
X-ShopId: XXXX
X-ShardId: 3
X-Shopify-Shop-Api-Call-Limit: 1/40
HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT: 1/40
X-Stats-UserId: 0
X-Stats-ApiClientId: XXXX
X-Stats-ApiPermissionId: XXXX
X-Frame-Options: SAMEORIGIN
Set-Cookie: request_method=GET; path=/
Set-Cookie: _secure_admin_session_id=XXXX; path=/; secure; HttpOnly
X-Request-Id: XXXX
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"
X-Served-With: ZX_Spectrum/1997 (Sinclair_BASIC)

{"count":0}
 

Can anyone help? Thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
591 0 45

The orders are probably archived, which is why they aren't showing up in your queries. Include the query parameter status=any to your get request.

2 Likes
Shopify Partner
6 0 3

Thanks, that worked. Missed that in the documentation, unfortunately.

0 Likes
Shopify Staff
Shopify Staff
83 0 6

Hello, I've submitted a change to the Order API docs which will hopefully make that piece of information clearer for others. It should be published soon.

Adam Doeler, API Team, Developer at Shopify
0 Likes
Shopify Partner
6 0 3

Thank you - that's quality of service!

1 Like