We are using https://github.com/Shopify/shopify_python_api with version 12.3.0 to fetch the user and order details between a certain range
import shopify
import datetime
api_version = "2023-04"
shop_domain = "lea-clothing-co.myshopify.com"
access_token = ""
# create a session with correct details
session = shopify.Session(shop_domain, api_version, access_token)
# we tried with a generic iterator to fetch details with no ending.
page = None
total_orders =[]
while True:
if page is None:
page = shopify.Order.find(from_="", updated_at_min=datetime.datetime(2023, 1, 22, 9, 59, 28, 650000),
updated_at_max=datetime.datetime(2024, 1, 22, 9, 59, 28, 651000), limit=250)
else:
page = page.next_page()
_orders = [order.to_dict() for order in page]
total_orders.extend(_orders)
While fetching the data for the last 12 months
Fetched order: ~=1184 orders
Actual Orders from the Shopify analytics: ~= 8k orders
Fetched users: ~=12k
Users on Shopify admin: ~=40k
Anything we are missing here?