The number 4 is quantity sold, not the value sold, right?
Correct.
The number 4 is what was sold 2 days ago and not what was sold yesterday and the day before yesterday, right?
The n_day_sales endpoint counts up the sales for the days greater than or equal to the current date minus the number of days given. So if it’s 12-17-2019 and you provide days=2 you’ll get the count of products sold on 12-15, 12-16, and 12-17.
If question one is the quantity sold, where do I get the value (dollars) per product?
We don’t have an endpoint for this. You can get the item_price from the product endpoint and multiply it by the number sold from n_day_sales. Or, if the item_price may have been changed on a given order, you can iterate through all orders for the last n days and count up the line’s item_price * quantity for each order with that product.
Can you double-check it? If it’s is getting the days from the N days up to today (as you described: 12-17-2019 and you provide days=2 you’ll get the count of products sold on 12-15, 12-16, and 12-17.), is there a way to only get only a given day?
is there any way to get the order number for the sales?
I did double check. I checked our codebase before responding to you. What I said the n_day_sales endpoint does is what it does.
Is there a way to only get only a given day?
We do not have a specific endpoint for this, no.
Is there any way to get the order number for the sales?
I’m not quite sure what you mean here. There is no way to get the order information for orders which contain a product through any product endpoint. You will need to use an order endpoint and do some calculation on your end.