Item sales for a store
Scope: `sales:read`. Ranked by amount (price x quantity, before order discounts and tax). Items voided before billing are not included.
Scope: sales:read. Ranked by amount (price x quantity, before order discounts and tax). Items voided before billing are not included.
apiKeyAuthorizationBearer <tmb_live_<prefix>_<secret> or tmb_test_<prefix>_<secret>>Scopes (set per key, narrowed by the merchant's grant): stores:read, stores:write, menu:read, orders:read, orders:write, rider:write, sales:read, customers:pii, mcp:use (the key may be used on the MCP endpoint POST /mcp; by default one MCP-enabled app per merchant account).
store_id*stringfrom*stringdateto*stringInclusive; at most 31 days after from.
dateorder_state?stringWhich orders to report: fulfilled (sales, default) or cancelled (cancellation report). Complimentary orders are always reported apart (free_total, free_count).
"fulfilled""fulfilled""cancelled"order_type?stringComma-separated billing type values (up to 20), e.g. 1 (Dine In), 2 (Takeaway), 4 (Zomato). Values are store-configured; see group_by=order_type.
^\d{1,6}(,\d{1,6}){0,19}$length <= 140time_from?stringTime-of-day window start, store local HH:MM (meal slots, shifts). Needs time_to. If time_from > time_to the window wraps past midnight (e.g. 22:00-02:00).
^([01]\d|2[0-3]):[0-5]\d$time_to?stringTime-of-day window end, exclusive, store local HH:MM. Needs time_from.
^([01]\d|2[0-3]):[0-5]\d$group_by?stringitem = one row per item; category = one row per category (item_id and name are the category name)
"item""item""category"category?stringComma-separated category names (up to 20), exact match
length <= 1300limit?integer1 <= value <= 10050cursor?stringOpaque; pass next_cursor from the previous page with the same other parameters. null next_cursor = last page.
length <= 512Items by amount
application/json- response
group_by*string"item""category"currency*CurrencyISO 4217
as_of*stringData freshness; when this result was read from the store data
date-timefinal*booleanfalse when the range includes any of the last 3 days in store local time (late syncs and edits can still change them)
next_cursor*string|nulldata*array<>curl -X GET 'https://openapi.tmbill.com/v1/sales/items?store_id=string&from=2019-08-24&to=2019-08-24'{ "group_by": "item", "currency": "INR", "as_of": "2019-08-24T14:15:22Z", "final": true, "next_cursor": "string", "data": [ { "item_id": "string", "name": "string", "quantity": 0, "amount": "249.00" } ]}