Checking discount code usage from Shopify

My goal is to gather data from shopify Discount Code we have created and insert back into a google sheet.
I’m looking to find orders using a mapped discount code, and pull the data around the usage of this code and the total revenue spent from these orders.
This is based on Influencer marketing and understanding performance of unique discount codes.
Any help or similar scenarios would be super helpful!

Try out with shopify api. This should work. Check this api doc endpoint here: DiscountCode

Combination of this or such endpoint is needed. This will return yiu discount codes and all related orders.