Products and custom rules
Map your internal product codes to base taxability categories, define flexible state and local tax overrides, and preview rule behavior without spending request quota.
Customer-defined product catalog
Store up to 1,000 active custom products per account, either workspace-wide (omit entityId) or scoped to a specific legal entity. Reference a product in POST /tax/calculate by passing productCode on any line item.
When resolving a productCode, Net Amount checks the active entity first, then parent entities up the hierarchy, then workspace-wide products. If no custom rule matches, calculation falls back to the product's baseItemKey platform rule and finally its defaultTreatment (taxable or exempt). An unknown productCode returns HTTP 422 (product_not_found).
| Field | Type | Rules |
|---|---|---|
productCode | string | Required on create. Lowercase slug (1 to 64 chars: a-z, 0-9, dots, hyphens, underscores). Unique per workspace or entity scope. |
name | string | Required display name (1 to 200 chars). |
entityId | string | Optional entity ID (ent_...). Omit for a workspace-wide product inherited by all entities. |
baseItemKey | string | Optional fallback category slug from GET /taxability/items (for example, saas or clothing). |
defaultTreatment | string | Required fallback treatment ("taxable" or "exempt") when no custom rule or platform rule applies. |
metadata | object | Optional string key/value map (up to 10 keys). DELETE soft-archives the product. |
{
"productCode": "cloud-pro-seat",
"name": "Acme Cloud Pro Seat",
"description": "Monthly hosted analytics subscription seat",
"baseItemKey": "saas",
"defaultTreatment": "taxable",
"metadata": { "erpSku": "SKU-9040" }
}{
"product": {
"productId": "prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
"entityId": null,
"productCode": "cloud-pro-seat",
"name": "Acme Cloud Pro Seat",
"description": "Monthly hosted analytics subscription seat",
"baseItemKey": "saas",
"defaultTreatment": "taxable",
"status": "active",
"metadata": { "erpSku": "SKU-9040" },
"createdAt": 1795881600000,
"updatedAt": 1795881600000,
"archivedAt": null
}
}Bulk import products
Import up to 100 custom products per request (maximum body size 256 KiB) in format: "json" (rows) or format: "csv" (csv), with optional entity scoping (entityId, entityCode, or ein). Pass dryRun: true to validate every row without writing. Set upsert: true to update existing matching productCode entries in place; when upsert is false (default), existing codes are returned as skipped_duplicate.
{
"format": "json",
"upsert": true,
"dryRun": true,
"rows": [
{
"productCode": "cloud-pro-seat",
"name": "Acme Cloud Pro Seat",
"baseItemKey": "saas",
"defaultTreatment": "taxable"
}
]
}Flexible custom tax rules
Create up to 2,000 active custom rules per account to override taxability, apply reduced rates or rate adjustments, enforce price thresholds, or cap tax per unit or line. List filters support entityId, targetType, targetKey, jurisdictionScope, state, treatment, status, and limit (1 to 200). DELETE permanently removes a rule; set status: "disabled" with PATCH to pause it.
| Field | Type | Details |
|---|---|---|
targetType / targetKey | string | "product" (targetKey = productCode), "item_key" (targetKey = category slug), or "all" (no targetKey; does not override explicit taxable: false or shipping lines). |
jurisdictionScope | string | "all_us", "state" (requires state), or local "county", "city", or "district" (requires state and jurisdictionName). |
effectiveDate / endDate | string | Optional inclusive YYYY-MM-DD bounds evaluated against the transaction date. |
buyerType / customerTags | string / string[] | Optional buyerType ("b2b" or "b2c") and up to 20 lowercase customerTags (all configured tags must be present on the calculation request). |
Price & amount bands | number | Optional minUnitAmountDollars, maxUnitAmountDollars, minLineSubtotalDollars, and maxLineSubtotalDollars. |
sourcingType | string | Optional "intrastate" or "interstate" match when shipFrom and shipTo are supplied. |
treatment | string | "taxable", "exempt" (supports rateScope on local rules), "reduced_rate" (reducedRate + reducedRateScope), or "rate_adjustment" (rateDelta or rateMultiplier + rateScope). |
Thresholds & caps | number / string | Optional thresholdDollars + thresholdMode, taxablePercent (0–100), maxTaxPerUnitDollars, and maxTaxPerLineDollars. |
priority | integer | 0 to 10,000 (default 100). Lower numbers win ties when specificity is equal. |
{
"targetType": "product",
"targetKey": "cloud-pro-seat",
"jurisdictionScope": "state",
"state": "TX",
"effectiveDate": "2026-01-01",
"endDate": "2026-12-31",
"buyerType": "b2b",
"customerTags": ["enterprise_contract"],
"minLineSubtotalDollars": 500,
"treatment": "taxable",
"taxablePercent": 80,
"maxTaxPerLineDollars": 250,
"priority": 10,
"note": "Texas data processing 80% taxable base with contract cap"
}{
"rule": {
"ruleId": "rul_7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d",
"entityId": null,
"targetType": "product",
"targetKey": "cloud-pro-seat",
"jurisdictionScope": "state",
"stateCode": "TX",
"jurisdictionName": null,
"effectiveDate": "2026-01-01",
"endDate": "2026-12-31",
"buyerType": "b2b",
"customerTags": ["enterprise_contract"],
"minUnitAmountDollars": null,
"maxUnitAmountDollars": null,
"minLineSubtotalDollars": 500,
"maxLineSubtotalDollars": null,
"sourcingType": null,
"treatment": "taxable",
"reducedRate": null,
"reducedRateScope": null,
"rateDelta": null,
"rateMultiplier": null,
"rateScope": null,
"thresholdDollars": null,
"thresholdMode": null,
"taxablePercent": 80,
"maxTaxPerUnitDollars": null,
"maxTaxPerLineDollars": 250,
"priority": 10,
"status": "active",
"note": "Texas data processing 80% taxable base with contract cap",
"createdAt": 1795881600000,
"updatedAt": 1795881600000
}
}Rule resolution precedence
During POST /tax/calculate, Net Amount evaluates each line item in a strict, deterministic five-level order and records the winning policy in appliedRule.source:
- Exemption certificates (
exemption_certificate): An active customer exemption certificate covering the destination state and line item always takes precedence. - Custom tax rules (
custom_rule): Among matching active rules, Net Amount ranks by entity specificity (exact entity > inherited parent > workspace), jurisdiction scope (city > district > county > state > all_us), target specificity (product > item_key > all), number of conditions, lowestprioritynumber, and latest update timestamp. - Platform local overrides (
platform_local_override): Seeded city, county, or district overrides (such as Denver or Chicago SaaS) active on the transaction date. - Platform state rules (
platform_state_rule): Effective-dated state rules for the line item'sitemKeyor resolved product'sbaseItemKey. - Product default (
product_default): The matched product'sdefaultTreatment(taxableorexempt), or standard taxable calculation when no product is specified.
Dry-run rule testing
Preview which custom rule matches a scenario and inspect the calculated effective rates and tax preview before pushing changes to production. Pass state plus optional jurisdiction/jurisdictionType, entityId, productCode, itemKey, transactionDate, buyerType, customerTags, unitAmount, quantity, sourcingType, and optional base rates (baseStateRate, baseLocalRate, or baseCombinedRate).
{
"state": "TX",
"productCode": "cloud-pro-seat",
"transactionDate": "2026-11-29",
"buyerType": "b2b",
"customerTags": ["enterprise_contract"],
"unitAmount": 600,
"quantity": 1,
"baseStateRate": 0.0625,
"baseLocalRate": 0.02
}{
"matched": true,
"rule": {
"ruleId": "rul_7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d",
"treatment": "taxable",
"taxablePercent": 80,
"maxTaxPerLineDollars": 250,
"priority": 10
},
"summary": "Taxable on 80% of line subtotal (capped at $250.00/line)",
"matchedJurisdiction": null,
"entityScope": "workspace",
"candidatesEvaluated": 3,
"matchedCount": 1,
"reason": "Matched rule rul_7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d (state TX, product cloud-pro-seat, workspace scope, priority 10) out of 1 matching rule.",
"preview": {
"baseCombinedRate": 0.0825,
"effectiveCombinedRate": 0.066,
"effectiveStateRate": 0.05,
"effectiveLocalRate": 0.016,
"subtotalDollars": 600,
"taxableAmountDollars": 480,
"exemptAmountDollars": 120,
"estimatedTaxDollars": 39.6,
"taxCapped": false
}
}