How to get the analytics data from order api?

Highlighted
Tourist
4 0 2

Analytics page shows a report with following column headers:

`orders gross_sales discounts returns net_sales shipping taxes total_sales`

I should be able to recreate all of this data using Orders API but I am having trouble understanding how Shopify is counting orders for Analytics.

Analytics gives me X while Orders API gives me Y.

I am using this API call:

https://API_TOKEN:API_SECRET@SHOPIFY_STORE_ID.myshopify.com/admin/orders/count.json?status=any&creat...

I have tried following multiple variations of following values to match it, but can't:

Timezones, status, financial_status, fulfillment_status, updated_at_min and max dates even.

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 80 163

Hey Vikram, 

There's a lot of logic behind our reports that will take some trial and error on your part if you want things to match up identically, I wouldn't be able to go through exactly how every one of them gets their numbers. 

With that being said however, we do have a glossary of how some fields should be calculated in our documentation here that I think you'll find useful. 

Hope it helps! 

1 Like
Highlighted
Tourist
4 0 2

Hi Josh - Thanks for the link to documentation. It's really helpful.

I can do the trial and error to achieve the correct result. I have one question though:

What's the timezone that I should be using while querying? Is it the timezone setup in my Shopify account? Is it the timezone for which I am looking at my analytics report? Is it just GMT or some other fixed standard value?

0 Likes
Highlighted
Excursionist
30 0 0

Hi @Vikram_Tiwari ,
I am also stuck in the same issue.Could you able to find the answer of this problem.I will not get return value because of i didn't minus that amount from gross sale.
Please help me in this matter It's urgent for me.
@Vikram_Tiwari @Josh 

 

0 Likes