Get orders that have specefic vendor

Melonendk
New Member
8 0 0

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.

Reply 1 (1)
Dive
Shopify Partner
22 1 1

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,

Thomas.

E-commerce analytics should be easier, that is why we have created diveanalytics.co