Is there any way to find total sales through order api?

Hey @deepanshu-mobo ,

From the Shopify documentation (https://help.shopify.com/en/manual/reports-and-analytics/shopify-reports/report-types/sales-report) we can see that Total Sales in our analytic reports is calculated as follows:

total sales = gross sales - discounts - returns + taxes + shipping charges. Where gross sales = product price x quantity (before taxes, shipping, discounts, and returns)

The ‘total_price’ field from the Orders API does take into account gross sales - discounts + taxes + shipping charges, but not take into account returns. So you will need to calculate how much money was refunded by your store separately. Once you know that information, you should be able to calculate the total sales for your store accurately.

Also one thing to point out: sales of Gift Cards are not included in to the Shopify “Total Sales” analytics report. So using the Order API you should skip any line items where you sell Gift Cards in your calculation.