Development discussions around Shopify APIs
So im runnig around figureing how to get specific all orders for at month within an specific vendor as im trying to get sales by that and sort it pr item i dont need the price just the items count thats it.
what would be the best approach with graphql or rest api.
Hello @Melonendk ,
Can't really help with GraphQL, but with definitly can with REST, that we use at Dive, I would have done it this way:
- Collect all orders based on the date range you will use. (Use pagination like -> since_id=last_order_id_you_collect). You can't apply a filter at line_item level unfortunately...
- Split all orders by line_items and filter by the following field -> line_item.vendor.
- Count number of line_items that match previous criterias.
At the same time, we are developing an annalytics tool that will do exactly what you need !
If you are interested, do not hesitate to request access from our homepage
Hope it helps,
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...By Jacqui Mar 10, 2023
Upskill and stand out with the new Shopify Foundations Certification programBy SarahF_Shopify Mar 6, 2023
One of the key components to running a successful online business is having clear and co...By Ollie Mar 6, 2023