Net orders by product

Net orders by product

1 0 0

I'm trying to get net orders for all active products from the admin API (sold - cancelled)

I've been able to achieve it by fetching 250 orders at a time and looping through the line items and refund line items but that is not at all scalable.

I can't use bulk operations on the graphql API because refunds aren't yet supported. 

Other than storing the orders and refunds in our own database, is there a scalable way of getting this information?

Any help would be greatly appreciated!

Replies 0 (0)