Skip to Content
TMBillOpen API
Sales

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.

GET
/sales/items

Scope: sales:read. Ranked by amount (price x quantity, before order discounts and tax). Items voided before billing are not included.

Authorization

apiKey
headerAuthorizationBearer <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).

Query Parameters

store_id*string
from*string
Formatdate
to*string

Inclusive; at most 31 days after from.

Formatdate
order_state?string

Which orders to report: fulfilled (sales, default) or cancelled (cancellation report). Complimentary orders are always reported apart (free_total, free_count).

Default"fulfilled"
Value in"fulfilled""cancelled"
order_type?string

Comma-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.

Match^\d{1,6}(,\d{1,6}){0,19}$
Lengthlength <= 140
time_from?string

Time-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).

Match^([01]\d|2[0-3]):[0-5]\d$
time_to?string

Time-of-day window end, exclusive, store local HH:MM. Needs time_from.

Match^([01]\d|2[0-3]):[0-5]\d$
group_by?string

item = one row per item; category = one row per category (item_id and name are the category name)

Default"item"
Value in"item""category"
category?string

Comma-separated category names (up to 20), exact match

Lengthlength <= 1300
limit?integer
Range1 <= value <= 100
Default50
cursor?string

Opaque; pass next_cursor from the previous page with the same other parameters. null next_cursor = last page.

Lengthlength <= 512

Response Body

Items by amount

application/json
  1. response
group_by*string
Value in"item""category"
currency*Currency

ISO 4217

as_of*string

Data freshness; when this result was read from the store data

Formatdate-time
final*boolean

false 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|null
data*array<>
Example Request
curl -X GET 'https://openapi.tmbill.com/v1/sales/items?store_id=string&from=2019-08-24&to=2019-08-24'
Example Response
{  "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"    }  ]}