Can Shopify API retrieve orders by discount code?

romainb94
Visitor
1 0 0

Hello, 

I need to follow regularly orders made with discounts code begining with... (generated together)

2 questions for this topic but any solution would be great:

One solution would be to do it with API: Anyone sees a way to get orders by discount through API?

On backoffice, we can use the omnisearch and enter the discount code to search related orders but is there a way to have an exportable listing of orders for a certain kind of discounts?

Thanks for your help!

Reply 1 (1)

ReturnPrime
Shopify Partner
438 63 102

Hello,

Something like this could work for your case;

/admin/orders.json?status=any&order=total_discounts desc


 If you feel like my answer is helpful, please Like and mark it as a solution. Let me know if you have any further questions.
Thank you!
Mritunjay