# Product/n\_day\_sales

**URL:** <https://forums.ordoro.com/t/product-n-day-sales/251>\
**Category:** Uncategorized\
**Created:** [June 19, 2018, 7:48pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251 "2018-06-19T19:48:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergio.nader](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sergio.nader](https://forums.ordoro.com/u/sergio.nader)\
**Post date:** [June 19, 2018, 7:48pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/1 "2018-06-19T19:48:57Z")

</div>

Hello,  
Can you please confirm if product/n\_day\_sales is ref the sales by sku of the current day server time (not 24 hour period) based on the timestamp of the pull?  
Thanks,  
Sergio

---

<div class="post-metadata">

**Author:** ![sophie](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.ordoro.com/sophie/32/19_2.png) [@sophie](https://forums.ordoro.com/u/sophie)\
**Post date:** [June 19, 2018, 7:56pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/2 "2018-06-19T19:56:42Z")

</div>

It’s based on the CST now() timestamp - the delta of n days.

---

<div class="post-metadata">

**Author:** ![sergio.nader](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sergio.nader](https://forums.ordoro.com/u/sergio.nader)\
**Post date:** [June 19, 2018, 8:10pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/3 "2018-06-19T20:10:16Z")

</div>

Thank you, Sophie.

1. Would you please provide us an example of how to call it?

While [http://api.ordoro.com/product/n\_day\_sales/](http://api.ordoro.com/product/n_day_sales/) works, [http://api.ordoro.com/product/n\_day\_sales/](http://api.ordoro.com/product/n_day_sales/)2/ will not work. What is the correct way to inform the delta of n days?

Regards!

Sergio

---

<div class="post-metadata">

**Author:** ![sergio.nader](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sergio.nader](https://forums.ordoro.com/u/sergio.nader)\
**Post date:** [June 19, 2018, 9:01pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/4 "2018-06-19T21:01:59Z")

</div>

Shopie  
,  
looks like we have figured it out:  
/product/n\_day\_sales/?days=10

Just to make sure, when we say 10 days from today June-19, 5 PM CST (), does is go back up to Jun-9 00:00 AM CST or to Jun-9  
2 PM CST?

Thanks,

---

<div class="post-metadata">

**Author:** ![sergio.nader](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sergio.nader](https://forums.ordoro.com/u/sergio.nader)\
**Post date:** [June 20, 2018, 12:20pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/5 "2018-06-20T12:20:43Z")

</div>

Sophie, in addition to this question

> 1. Just to make sure, when we say 10 days from today June-19, 5 PM CST (), does is go back up to Jun-9 00:00 AM CST or to Jun-9  
> 2 PM CST?

1. We are not being able to conciliate what we see under the Analytics tab and the API response.  
The attached image shows the highest selling products from Jun-19-29 to Jun-19-18 and the API queries no days what I suppose should be today as the n days delta to the current day should be 0 (/?days=0) won’t work.

As you can observe, the values will not match: [https://screencast.com/t/nNmk5nSYk](https://screencast.com/t/nNmk5nSYk)

1. when the API is called without the days parameter, does it mean “today”?

Thanks in advance!!!

Sergio

---

<div class="post-metadata">

**Author:** ![sergio.nader](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sergio.nader](https://forums.ordoro.com/u/sergio.nader)\
**Post date:** [June 20, 2018, 9:17pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/6 "2018-06-20T21:17:45Z")

</div>

Hello, Sophie! Do you have any updates?  
thanks!

---

<div class="post-metadata">

**Author:** ![andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@andy](https://forums.ordoro.com/u/andy)\
**Post date:** [June 22, 2018, 3:54am UTC](https://forums.ordoro.com/t/product-n-day-sales/251/7 "2018-06-22T03:54:08Z")

</div>

Hi Sergio,

> 1. Just to make sure, when we say 10 days from today June-19, 5 PM CST (), does is go back up to Jun-9 00:00 AM CST or to Jun-9 2 PM CST?

If you call it with days=10 on June 19 at 5 PM CST, it would go back to June 9 at 5 PM CST.

> 1. We are not being able to conciliate what we see under the Analytics tab and the API response.  
> The attached image shows the highest selling products from Jun-19-29 to Jun-19-18 and the API queries no days what I suppose should be today as the n days delta to the current day should be 0 (/?days=0) won’t work.

The analytics tab uses a different internal service and API (which, unfortunately, is not readily available for public consumption). In the provided screenshot, you are seeing the analytics page results for **only** the day of June 18. The `/n_day_sales` query is returning the previous 30 days worth of sales.

> 1. when the API is called without the days parameter, does it mean “today”?

If it is called without the days parameter, it defaults to 30 days.

---

<div class="post-metadata">

**Author:** ![sergio.nader](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sergio.nader](https://forums.ordoro.com/u/sergio.nader)\
**Post date:** [June 25, 2018, 2:34pm UTC](https://forums.ordoro.com/t/product-n-day-sales/251/8 "2018-06-25T14:34:39Z")

</div>

We got it now. Thank you for your reply.
