Python ShopifyAPI Order.find(status=any) not returning orders data

I’m using the shopify python API.

After creating a session, when I run these commands, I get the data back for Customers, but nothing is returned for Orders:

orders = shopify.Order.find(status=any)
customers = shopify.Customer.find(status=any)

Trying (what I think is) the same query for orders from the command line does return the Orders data successfully:

curl -X GET "https://xxxxxxxxxx.myshopify.com/admin/api/2023-01/orders.json?status=any" -H "X-Shopify-Access-Token:xxxxxxxxxx"

I tried the same python code to connect to a test store, and that returns the Orders data from the test store fine. It just doesnt work on my real shopify store.

I compared the access scopes between the test store and my real store and they’re identical. I even reduced the access scope on both to only read_orders. The test store still returned orders and the real store still returned no data. I tried removing the read_orders scope on the real store and this time it throws an error instead of no data.

I can’t see what I’m doing wrong here. Any help would be much appreciated!

ok - figured this out! Hopefully this will stop others from going mad!

It looks like the python library has defaults which make only unfulfilled orders return unless explicitly requested. I managed to the full list of orders back, but only when I passed in ‘any’ for both status and fulfilment_status params ie

print(shopify.Order.find(status='any',fulfillment_status='any'))

If you use ‘all’ instead of ‘any’, or you leave out either of these params, you only get back unshipped and partially unshipped orders.

Time for a celebratory kitkat I think…

Hi, I tried passing the arguments that you mentioned, but I am getting an empty list. If I do not pass anything then unfulfilled orders get generated. Can you please help?