SalesOrderTax

Get the Sales Order Tax report

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.

get/public/v1/reports/sales-order-tax

Request

  • Base URL
    https://app.distru.com
  • Auth
    HTTP bearer

Query parameters

statusstring[]

Restrict the report to orders in any of the given statuses (SCREAMING_CASE). Repeat the key to pass several; an order matches if its status is any one of them. Omit to include every status.

payment_statusstring[]

Restrict the report to orders with any of the given payment statuses (SCREAMING_CASE). Matches on any value listed. Omit to include all payment statuses.

order_sourcestring[]

Restrict the report to orders created through any of the given sources (SCREAMING_CASE): LEAFLINK, EXTERNAL_BUYER, INTERNAL_USER, or API. Matches on any value listed. Omit to include all sources.

order_datetimestring

Restrict the report to orders whose order date falls in this range. Format is two comma-separated ISO8601 UTC datetimes, after,before. Either side may be left empty for an open-ended range (2026-01-01T00:00:00Z, = on or after that instant; ,2026-02-01T00:00:00Z = up to that instant). This is the only filter with a default: when the whole param is omitted, the report covers the last 30 days in the authenticated user's timezone.

delivery_datetimestring

Restrict the report to orders whose delivery date falls in this range. Same after,before comma-separated ISO8601 UTC format as order_datetime; either side may be empty. No default — omit to leave delivery date unconstrained.

due_datetimestring

Restrict the report to orders whose due date falls in this range. Same after,before comma-separated ISO8601 UTC format as order_datetime; either side may be empty. No default.

created_datetimestring

Restrict the report to orders created (in Distru) within this range. Same after,before comma-separated ISO8601 UTC format as order_datetime; either side may be empty. No default. This is when the order record was created, independent of its order date.

updated_datetimestring

Restrict the report to orders last modified within this range. Same after,before comma-separated ISO8601 UTC format as order_datetime; either side may be empty. No default.

totalstring

Restrict the report to orders whose grand total falls within a range, given as two comma-separated decimal amounts min,max in the company's currency. Compared inclusively.

matched_with_compliance_transferboolean

Restrict to orders by whether they are linked to a compliance (Metrc/BioTrack) transfer. true keeps only matched orders, false only unmatched. Omit to include both.

searchstring

Free-text search restricting the report to orders whose order number, customer name, or LeafLink short ID contains the given text (case-insensitive substring). Omit for no text filter.

company_relationship_idsstring[]

Restrict the report to orders for any of the given customers, identified by their Distru company-relationship (customer) IDs. These are the IDs returned by the customers endpoint. Repeat the key to pass several; matches any. Omit to include all customers.

company_relationship_group_idsstring[]

Restrict the report to orders whose customer belongs to any of the given customer-group IDs. Repeat the key to pass several; matches any. Omit for no group filter.

shipped_from_license_idsstring[]

Restrict the report to orders shipped from any of the given license IDs. Repeat the key to pass several; matches any. Omit for no license filter.

menu_idsstring[]

Restrict the report to orders placed against any of the given menu IDs. Repeat the key to pass several; matches any. Omit for no menu filter.

brand_idsstring[]

Restrict the report to orders containing a product of any of the given brand IDs. Repeat the key to pass several; matches any. Omit for no brand filter.

owner_idsstring[]

Restrict the report to orders owned by any of the given user IDs. Repeat the key to pass several; matches any. Omit for no owner filter.

creator_idsstring[]

Restrict the report to orders created by any of the given user IDs. Repeat the key to pass several; matches any. Omit for no creator filter.

batch_idsstring[]

Restrict the report to orders containing any of the given batch IDs. Repeat the key to pass several; matches any. Omit for no batch filter.

product_idsstring[]

Restrict the report to orders containing any of the given product IDs. Repeat the key to pass several; matches any. Omit for no product filter.

tax_idsstring[]

Restrict the summed tax charges to the given tax IDs. Unlike the order filters, this narrows which taxes contribute to total_tax rather than which orders are counted. Repeat the key to pass several; matches any. Omit to sum every tax.

Response

The Sales Order Tax report

Changes

No recorded changes to this operation across all 17 revisions of this API.