Tax Insights
get_tax_insightsGet period tax totals and the blended effective tax rate over a trailing N-day window, plus a per-country split. Tax figures combine tax the platform reported on orders with tax computed from active manual TaxRule entries where the platform reported none (or a fixed-amount rule applies). Mirrors the dashboard tax settings page tiles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Trailing window in days, 1 to 365 (default 30). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | The trailing window the figures cover. | |
| _meta | No | ||
| _message | No | ||
| _truncated | No | ||
| per_country | No | Only countries with nonzero tax in the window. Carries no per-country revenue split - use get_markets for that. | |
| active_rules | No | Number of manual TaxRule entries currently active for this tenant. | |
| effective_tax | No | tax_collected + tax_estimated. | |
| gross_revenue | No | ||
| tax_collected | No | Tax the commerce platform reported on orders, net of any manual-rule estimate folded into the same figure. | |
| tax_estimated | No | Tax computed from an active manual TaxRule where the platform reported none, or where a fixed-amount rule applies. | |
| _tenant_context | No | ||
| blended_rate_pct | No | effective_tax / gross_revenue as a percentage. |