I am a bit stuck. What API must I use to get a total count of sales/orders for a specific item?
Ideally, for a date range.
Salad Avocado Bowl has been sold 25 times.
Better → Salad Avocado Bowl was sold 25 times today.
And Employee Jason has sold the Salad Avocado Bowl 25 times today.
I thought about doing it with the inventory API, but that doesn’t work.
Any thoughts? Thank you very much.
You’ll need to use the Orders API
SearchOrders to get all the orders within a given date range. Once you have the orders you can parse the items to total up all items sold for that date range.
Thank you Bryan, what about matching orders with an employee.
Say, understanding how many of item X did Bryan sell today?! Thank you very much.
In that case it may be better to first call ListPayments for a given timeframe. The payment response will have the
team_member_id. You can first parse the payments for the team member you want totals for. Then take the
order_ids from those payments and call BatchRetrieveOrders. Once you have the orders you can then parse them for the items sold.