---
title: "Get the Sales Order Tax report"
method: GET
path: "/public/v1/reports/sales-order-tax"
tags: ["SalesOrderTax"]
---

# Get the Sales Order Tax report

`GET /public/v1/reports/sales-order-tax`

## Request

- Base URL: `https://app.distru.com`
- URL: `https://app.distru.com/public/v1/reports/sales-order-tax`
- Auth: HTTP bearer

Returns the total tax collected across sales orders, aggregated by tax. Each row in `data` is one unique combination of tax name and tax rate, with `total_tax` summing every matching order's charge of that tax. This is a read-only reporting endpoint — it does not create, modify, or sync anything, and has no effect on inventory, compliance, or the orders themselves.

Which orders are counted is controlled entirely by the query filters below. Only charges flagged as taxes are summed; non-tax charges (fees, discounts) are excluded. Passing `tax_ids` narrows the sum to those specific taxes.

• The `order_datetime` filter scopes the report by order date and is the only filter with a default: when omitted, the report covers the last 30 days, computed in the authenticated user's timezone. Every other filter is additive and applies no default — omit it to leave that dimension unconstrained.
• Rows are grouped independently by tax name and by tax rate, so the same tax name can appear on multiple rows if it was charged at different rates within the range.

Numeric cells are returned as strings (currency and percent formatting stripped) so they match the rest of the API: `tax_rate` is a percentage value (e.g. `"27"` means 27%) and `total_tax` is a currency amount in the company's currency. `meta` carries the resolved, human-readable date range and the report's column definitions.

Required permission: `reports_permissions_sales_order_tax`. Company admins are always authorized regardless of this permission.

## Query parameters

- `status` string[]
- `payment_status` string[]
- `order_source` string[]
- `order_datetime` string
- `delivery_datetime` string
- `due_datetime` string
- `created_datetime` string
- `updated_datetime` string
- `total` string
- `matched_with_compliance_transfer` boolean
- `search` string
- `company_relationship_ids` string[]
- `company_relationship_group_ids` string[]
- `shipped_from_license_ids` string[]
- `menu_ids` string[]
- `brand_ids` string[]
- `owner_ids` string[]
- `creator_ids` string[]
- `batch_ids` string[]
- `product_ids` string[]
- `tax_ids` string[]

## Response `200`

The Sales Order Tax report

- SalesOrderTaxReport: The Sales Order Tax report
  - `data` SalesOrderTaxReportRow[], required: The report rows
    - `tax_rate` string: The tax rate as a percentage, e.g. `27` for 27%, rounded to at least 2 decimal places; ranges from -100 to 100. Null when the tax is a flat/fixed amount rather than a percentage.
    - `tax_type` string: The name of the tax charge (e.g. "Cannabis Excise Tax"). May be null when the underlying tax charge has no name.
    - `total_tax` string, required: Sum of this tax collected across every matching order, as a string in the company's currency. Always present and non-null; a row exists only when at least one matching tax charge was found, so this is the aggregated amount for that tax name and rate. When no orders match the filters at all, `data` is an empty array rather than a zero row.
  - `meta` SalesOrderTaxReportMeta, required: Report-level metadata
    - `columns` SalesOrderTaxReportColumn[], required: The report's ordered column definitions, pairing each row key with its display label.
      - `key` string, required: The key this column appears under in every `data` row (e.g. `total_tax`).
      - `label` string, required: The human-readable column header (e.g. "Total Tax").
    - `date_range` string, required: Human-readable label for the resolved order-date range the report covers (e.g. "Jul 21, 2026 to Aug 20, 2026"), rendered in the authenticated user's timezone. Reflects the default last-30-days window when `order_datetime` is omitted.
    - `report` string, required: The report identifier; always `sales_order_tax` for this endpoint.

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API token
- `403`: The API token lacks the required permission, or team restrictions hide the record

---

[API](https://skmtc.dev/distru/apis/distru-api.md) - [All operations](https://skmtc.dev/distru/apis/distru-api/llms.txt) - [OpenAPI document](https://skmtc.dev/distru/apis/distru-api/revisions/9d851a88e82f?raw)
