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,
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022