Sales API discrepancy

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:

{
    "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!

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

Thanks, Jesse.

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

Thanks!

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