I want to calculate Gross Sales using Shopify API. I have already readed the shopify API documentation and tried the formula they used to calculate gross sales and failed to get the same result they have at the shopify reports website.
I used this shopify endpoint to retrieve all orders
PS: The number of orders from shopify API and shopify Dashboard is equal. ( I am getting all the orders correctly, 141 orders)
I tried to use the sum of total_line_items_price, but I got a different result from Shopify Reports.
Shopify API results after summing the total_line_items_price: 13124.62
Also, I tried to use the formula they provided at Shopify API documentation where they mentioned that Gross Sales = product selling price x ordered quantity and I got the same result as sum of the total_line_items_price: 13124.62
Shopify Gross Sales at the financial report dashboard: 13082.76
Shopify API sum of total_tax: 48.2 Which is equal to the financial report taxes.
Please I need your help to calculate Gross Sales Correctly