Tax rules define the tax rates applied to charges based on jurisdiction, product category, and customer location. Kontorion evaluates tax rules at invoicing time and adds the appropriate tax line items to each invoice.
Key concepts:
- Jurisdiction - country and optional region the rule applies to
- Tax type -
vat,sales_tax,gst,hst, etc. - Inclusive vs. exclusive - whether the tax is included in the listed price or added on top
- Compound tax - whether this tax is calculated on the pre-tax amount or on the amount including other taxes
- Apply order - controls the sequence when multiple tax rules apply
List tax rules
Lists tax rules with cursor-based pagination and the unified field.op=value filter grammar (jurisdiction_country, jurisdiction_region, tax_type, status, rate, valid_from, valid_to, version, created_at, updated_at, published_at, archived_at).
query Parameters
limitPage size. Values above the server-side cap are clamped (standard default 50, cap 200; a few document-heavy lists use larger windows). Invalid values fall back to the default.
cursorOpaque continuation token from the previous response's pagination.cursor. Omit for the first page. Cursors are stateless and do not expire, but are only valid for the list and filters that produced them.
jurisdiction_countryFilter by jurisdiction country (eq/in)
Filter by jurisdiction country (eq/in)
jurisdiction_regionFilter by jurisdiction region (eq/ne/in)
Filter by jurisdiction region (eq/ne/in)
tax_typeFilter by tax type (eq/in)
Filter by tax type (eq/in)
statusFilter by status (eq/ne/in). Filterable fields accept apifilter operator suffixes, e.g. status__in=A,B
Filter by status (eq/ne/in). Filterable fields accept apifilter operator suffixes, e.g. status__in=A,B
rateFilter by rate (eq/ne/gt/gte/lt/lte)
Filter by rate (eq/ne/gt/gte/lt/lte)
valid_fromFilter by valid_from (eq/gt/gte/lt/lte)
Filter by valid_from (eq/gt/gte/lt/lte)
valid_toFilter by valid_to (eq/gt/gte/lt/lte)
Filter by valid_to (eq/gt/gte/lt/lte)
created_atFilter by created_at (eq/gt/gte/lt/lte)
Filter by created_at (eq/gt/gte/lt/lte)
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List tax rules › Responses
OK
Create a tax rule
Creates a new tax rule for the organization.
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Create a tax rule › Request Body
applies_to_customer_typesapplies_to_product_categoriesapplies_to_supply_typesapply_orderinclusiveis_compoundjurisdiction_countryjurisdiction_regionrate^-?\d+(\.\d+)?$Decimal number encoded as a string to preserve precision.
requires_continuous_coveragetax_typevalid_fromvalid_toCreate a tax rule › Responses
Created
Get a tax rule
path Parameters
idTax rule UUID
Tax rule UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Get a tax rule › Responses
OK
Update a tax rule
Updates an existing tax rule. Flipping a DRAFT rule to status=active publishes it through the supersede atom (ADR-0006 edit-as-publish); PUT with effective_at=
path Parameters
idTax rule UUID
Tax rule UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Update a tax rule › Request Body
applies_to_customer_typesapplies_to_product_categoriesapplies_to_supply_typesapply_ordereffective_atinclusiveis_compoundjurisdiction_countryjurisdiction_regionrate^-?\d+(\.\d+)?$Decimal number encoded as a string to preserve precision.
requires_continuous_coveragesave_as_draftstatustax_typevalid_fromvalid_toUpdate a tax rule › Responses
OK
Delete a draft tax rule
Hard-deletes a draft tax rule. Active and archived rules are immutable - use the /archive endpoint instead.
path Parameters
idTax rule UUID
Tax rule UUID
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Delete a draft tax rule › Responses
No Content
Archive a tax rule version
Marks an active tax rule version as archived. Subsequent invoice runs will use the next applicable version (if any).
path Parameters
idTax rule UUID
Tax rule UUID
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Archive a tax rule version › Responses
No Content
Copy a tax rule version as a new draft
Creates a new draft tax rule version seeded from the supplied source version. Use to iterate on rates or jurisdiction logic without disturbing the active version.
path Parameters
idSource tax rule version UUID
Source tax rule version UUID
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Copy a tax rule version as a new draft › Request Body
valid_fromvalid_toCopy a tax rule version as a new draft › Responses
Created
List a tax rule's version timeline
Returns all versions ordered by effective_from. Active and scheduled versions are returned by default; pass include=all to include drafts and archived versions.
path Parameters
idEntity UUID
Entity UUID
query Parameters
includeSet to 'all' to include draft and archived versions
Set to 'all' to include draft and archived versions
limitPage size. Values above the server-side cap are clamped (standard default 50, cap 200; a few document-heavy lists use larger windows). Invalid values fall back to the default.
cursorOpaque continuation token from the previous response's pagination.cursor. Omit for the first page. Cursors are stateless and do not expire, but are only valid for the list and filters that produced them.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List a tax rule's version timeline › Responses
OK
List tax-rule versions (with lifecycle filter)
Returns version rows for the entity, keyset-paginated (default 100, max 200 per page). The status filter accepts draft, scheduled, published, archived; the default excludes draft (ADR-0007). Supports ?include=usage_count and ?archived_reason=.
path Parameters
idEntity UUID
Entity UUID
query Parameters
statusLifecycle status filter (repeatable / comma-separated): draft, scheduled, published, archived. Default excludes draft.
Lifecycle status filter (repeatable / comma-separated): draft, scheduled, published, archived. Default excludes draft.
archived_reasonNarrow archived rows by reason (repeatable / comma-separated): canceled, discarded, errored, superseded
Narrow archived rows by reason (repeatable / comma-separated): canceled, discarded, errored, superseded
includeComma-separated includes. Currently supports usage_count.
Comma-separated includes. Currently supports usage_count.
limitPage size. Values above the server-side cap are clamped (standard default 50, cap 200; a few document-heavy lists use larger windows). Invalid values fall back to the default.
cursorOpaque continuation token from the previous response's pagination.cursor. Omit for the first page. Cursors are stateless and do not expire, but are only valid for the list and filters that produced them.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List tax-rule versions (with lifecycle filter) › Responses
OK
Get a tax-rule version snapshot
Resolves the natural key (country, region, tax_type) from {id} and returns the row whose version matches.
path Parameters
idEntity UUID
Entity UUID
versionVersion number
Version number
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Get a tax-rule version snapshot › Responses
OK
Cancel a scheduled tax rule version
Archives the version and stamps cancelled_at so it never goes active. Cancellation is only available before the version has been applied.
path Parameters
idEntity UUID
Entity UUID
versionVersion number
Version number
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Cancel a scheduled tax rule version › Responses
OK
Reconfirm a stale tax rule version
Clears warnings on a scheduled version after the operator has acknowledged that an upstream change does not invalidate the scheduled payload. Use PUT to amend the payload itself.
path Parameters
idEntity UUID
Entity UUID
versionVersion number
Version number
Headers
Idempotency-KeyUnique key that makes this POST safe to retry: repeats with the same key replay the first response instead of re-executing. Replays are scoped to the retrying principal (same API key / user) and kept for 24 hours. Required on every POST.
Client-generated idempotency key (e.g. a UUID).
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Reconfirm a stale tax rule version › Responses
OK
List tax-rule version referrers
Offset-paginated drill-down of the referrers of one type for one version of the entity.
path Parameters
idEntity UUID
Entity UUID
versionVersion number (positive integer)
Version number (positive integer)
query Parameters
typeReferrer type to list (required)
Referrer type to list (required)
limitPage size. Values above the server-side cap are clamped (standard default 50, cap 200; a few document-heavy lists use larger windows). Invalid values fall back to the default.
offsetRow offset (default 0)
Row offset (default 0)
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List tax-rule version referrers › Responses
OK
Get tax-rule version usage summary
Referrer counts for one version of the entity, grouped by referrer type. Powers the version-switcher hover card.
path Parameters
idEntity UUID
Entity UUID
versionVersion number (positive integer)
Version number (positive integer)
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Get tax-rule version usage summary › Responses
OK