# Get the sales report (/api/reports/get-sales-report)

`GET https://api.comecero.com/api/v1/reports/sales`

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.

## Parameters

- `date_start` (query): Only 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` (query): Only 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` (query): An 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` (query): When `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](https://docs.comecero.com/docs/basic-concepts/localized-formatting).
- `group_by` (query): Split the report into one row per period. Leave it out (or send `none`) for one row for the whole range.
- `type` (query): Which transactions to count: `payments`, `refunds` (as negative amounts) or `combined` (payments net of refunds).
- `segment` (query): Which sales to count.
- `currency` (query): One of your two reporting currencies (Settings, General). Any other value is refused. Leave it out for the primary reporting currency.

Responses: 200, 400, 401, 403, 500.

Full schemas: operation `get_sales_report` in /openapi.json.