Get sales report via Admin API

4 0 2

How to get a sales report  as shown at screenshots 

Sales report.png


According to docs, I have two options to get such report: Rest Admin API and ShopifyQL. I will try to describe problems with both options  

1) Rest Admin API

We able to do such request to Admin API.

Here a sample of the report that we can create from the response.

And there we will get all metric except "Returns" that happened at the specified date range. This endpoint doesn't return orders which were refunded.       

Your API allows getting refunded orders via this endpoint           

But this endpoint doesn't allow to specify a date range. So, we don't know which orders were refunded at given day. Due to we have a discrepancy with Shopify UI in the total line. For our customers very important to get precise data. 

2) ShopifyQL is possible to use via Embedded SDK. If we right understand embedded apps don't allow pull data to third-party databases. We have our own UI, where customers want to see data from Shopify. So, that is why ShopifyQL is not suited to our case. 

We considered this feature also

Such way we able to do create a report that will be published to the Report page in Shopify admin. Meanwhile, we need to pull data to our databases.    

Can somebody please take a look here and help me find a solution. Our final goal to create sales report over time as shown on screenshots. Is the any other easiest way do it?