Get the sales report
Totals your sales for a date range: subtotal, shipping, tax, total, transaction count and item count, with sum, average, min, max and median. Set group_by to get one row per hour, day, month or year.
With no dates, the report covers yesterday in the report time zone. A date_end later than today is cut back to the end of today, and a date_start later than today is refused. The longest range is 31 days by hour, 2 years by day, 5 years by month and 10 years by year.
The time zone is your account's, or the one you send in timezone. All amounts are in your primary reporting currency, or your secondary one when you send it in currency. Needs a secret or trusted token with permission to read reports.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
date_start?stringOnly items on or after this date. Send ISO 8601 (2026-11-01T00:00:00Z or 2026-11-01T00:00:00-05:00) or a shorthand: 2026 means the start of 2026, 2026-11 the start of November, 2026-11-01 the start of that day. A date with no offset is read in timezone, or in the account's time zone when you send none. It must not be after date_end (400).
date_end?stringOnly items on or before this date. Same formats as date_start, but a shorthand means the end of the period: 2026-11 is the last instant of November, 2026-11-30 the last instant of that day. A date with no offset is read in timezone, or in the account's time zone when you send none.
timezone?stringAn IANA time zone name, such as America/New_York or UTC. It sets how date_start and date_end are read and the time zone of every date in the response. The default is the account's time zone (Settings, Technical), or UTC when it has none. A name that is not known is a 400.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falsegroup_by?stringSplit the report into one row per period. Leave it out (or send none) for one row for the whole range.
"none""hour""day""month""year"type?stringWhich transactions to count: payments, refunds (as negative amounts) or combined (payments net of refunds).
"payments""payments""refunds""combined"segment?stringWhich sales to count.
"all""all""non_subscriptions""subscriptions""new_subscriptions""renewal_subscriptions"currency?stringOne of your two reporting currencies (Settings, General). Any other value is refused. Leave it out for the primary reporting currency.
The sales report.
application/json- response
Sales totals for a date range: subtotal, shipping, tax and total, with counts, optionally split by hour, day, month or year.
object?"report.sales"The object type. Always report.sales.
"report.sales"url?stringThe URL that returns this report again, with the dates, filters and time zone it used.
uriaccount_id?stringThe account the report is for.
date_created?stringWhen the report was run, in the report time zone.
date-timedate_start?|The start of the range the report covers, in the report time zone.
date-timedate_end?|The end of the range the report covers, in the report time zone. A date_end later than today is cut back to the end of today.
date-timetimezone?stringThe time zone used to read the dates and to group the rows.
test?booleanTrue when the report covers test mode data.
type?stringWhich transactions are counted. payments (the default), refunds (as negative amounts), or combined (payments net of refunds).
"payments""refunds""combined"segment?stringWhich sales are counted. all is the default.
"all""non_subscriptions""subscriptions""new_subscriptions""renewal_subscriptions"currency?stringThe currency every amount is in: the account's primary reporting currency, or its secondary one when you asked for it with currency.
subtotal?Statistics over the subtotal of each row, in currency.
tax?Statistics over the tax of each row, in currency.
shipping?Statistics over the shipping of each row, in currency.
total?Statistics over the total of each row, in currency.
transaction_count?Statistics over the number of transactions in each row.
item_count?Statistics over the number of items (quantity) in each row.
data?array<>One row per period when group_by is set, otherwise one row for the whole range.
formatted?The report dates as display text in the shopper's language. Only present when formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/reports/sales'{ "object": "report.sales", "url": "https://api.comecero.com/api/v1/reports/sales?date_start=2026-11-01T00:00:00&date_end=2026-11-02T23:59:59&type=payments&segment=all&timezone=America/New_York", "account_id": "AB1234", "date_created": "2026-11-07T09:12:44-05:00", "date_start": "2026-11-01T00:00:00-04:00", "date_end": "2026-11-02T23:59:59-05:00", "timezone": "America/New_York", "test": true, "type": "payments", "segment": "all", "currency": "USD", "subtotal": { "sum": 149.9, "average": 74.95, "max": 99.95, "min": 49.95, "median": 74.95 }, "tax": { "sum": 0, "average": 0, "max": 0, "min": 0, "median": 0 }, "shipping": { "sum": 0, "average": 0, "max": 0, "min": 0, "median": 0 }, "total": { "sum": 149.9, "average": 74.95, "max": 99.95, "min": 49.95, "median": 74.95 }, "transaction_count": { "sum": 2, "average": 1, "max": 1, "min": 1, "median": 1 }, "item_count": { "sum": 2, "average": 1, "max": 1, "min": 1, "median": 1 }, "data": [ { "date": "2026-11-01", "subtotal": 99.95, "shipping": 0, "tax": 0, "total": 99.95, "transaction_count": 1, "item_count": 1 }, { "date": "2026-11-02", "subtotal": 49.95, "shipping": 0, "tax": 0, "total": 49.95, "transaction_count": 1, "item_count": 1 } ]}Get the items report GET
Totals your sales per product for a date range: subtotal, tax, total, number of orders and units sold, one row per `item_id`. The list is offset-based, up to 100 rows a page. With no dates, the report covers yesterday in the report time zone. A `date_end` later than today is cut back to the end of today, and a `date_start` later than today is refused. There is no maximum range. Amounts are in your primary reporting currency, or your secondary one when you send it in `currency`. Needs a secret or trusted token with permission to read reports.
Get the sales summary GET
Totals your completed payments and refunds per currency: subtotal, shipping, tax and total. Send `currency` to get one total with every currency converted into it. With no dates, the report covers yesterday in the report time zone. A `date_end` later than today is cut back to the end of today, and a `date_start` later than today is refused. The range is read against the date each transaction completed. Amounts are in the settlement currency by default, or the payment currency with `currency_type=payment`. With `currency`, each row is converted at the wholesale rate less 3 percent (no change when it is already in that currency). Needs a secret or trusted token with permission to read reports.