# Sales API discrepancy

**URL:** <https://forums.ordoro.com/t/sales-api-discrepancy/499>\
**Category:** Bug Reports\
**Created:** [November 25, 2019, 4:39pm UTC](https://forums.ordoro.com/t/sales-api-discrepancy/499 "2019-11-25T16:39:10Z")\
**Posts on this page:** 4\
**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:** [November 25, 2019, 4:39pm UTC](https://forums.ordoro.com/t/sales-api-discrepancy/499/1 "2019-11-25T16:39:10Z")

</div>

Hello!

The interface shows that product MS-PRD-100323-light-graphite-2XL was ordered at Nov 23, 2019 at 11:15am: `https://app.ordoro.com/app#/order/2-MS-00024092`

However, if I try `api.ordoro.com/product/MS-PRD-100323-light-graphite-2XL/n_day_sales/?days=2`  
there is no sale for this product.

To show some sales, I need to inform 4 days: `@api.ordoro.com/product/MS-PRD-100323-light-graphite-2XL/n_day_sales/?days=4`:

```auto
{
    "MS-PRD-100323-light-graphite-2XL": {
        "53502": 2
    }
}

```

Should days=4 be for four days ago, the 21st?

If that is correct, why can’t I see the sales for this product 2 days ago, the 23th?

Thanks!

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.ordoro.com/jesse/32/68_2.png) [@jesse](https://forums.ordoro.com/u/jesse)\
**Post date:** [November 25, 2019, 4:48pm UTC](https://forums.ordoro.com/t/sales-api-discrepancy/499/2 "2019-11-25T16:48:38Z")

</div>

Hi Sergio,

Ordoro uses the Central US timezone (UTC-6:00). This could be what’s causing your discrepancy, depending on the timezone in which you are located.

For example, if the product was ordered at 11:15am Pacific time (UTC-8:00) on the 23rd and you try to access the `n_day_sales` endpoint at 11:15am Pacific time on the 25th, our API will interpret it as you as accessing the endpoint at 1:15pm Central time (1:15pm on the 25th - 2 days = 1:15pm on the 23rd, two hours _after_ the order was created). For this reason, using `days=3` should work.

-Jesse

---

<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:** [November 25, 2019, 5:40pm UTC](https://forums.ordoro.com/t/sales-api-discrepancy/499/3 "2019-11-25T17:40:01Z")

</div>

Thanks, Jesse.

I see.  
Another question: is an order considered a sale only after it ships?

Thanks!

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.ordoro.com/jesse/32/68_2.png) [@jesse](https://forums.ordoro.com/u/jesse)\
**Post date:** [November 25, 2019, 5:56pm UTC](https://forums.ordoro.com/t/sales-api-discrepancy/499/4 "2019-11-25T17:56:37Z")

</div>

Yes, that is correct. This endpoint only considers products which have shipped to have been sold.
