Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello Shopify Community,
I have created an third party analytics tool and I would like to access the entire sales of each product in the shop of a specific date.
So I would like to receive a list of a structure like this where I can the read the sales of each product of a specific date.
Like:
[{
'ProductId': ...,
'Price': ...,
'Quantity': ...
},
{
'ProductId': ...,
'Price': ...,
'Quantity': ...
}]
But I would like to receive only the products which had any sales at this date.
Right now I tried to get all orders of the day, but the api is returning only 50 orders per request and if the shop has thousands of orders each day it would be quit painful to make so many requests to get all the information to calculate the turnover of each product on this specific day.
Thank you for your help guys.
Hi,
You can use the bulk api for this.
You could also save some of the data to your database for example, the product id, product_title, sales_count and the date.