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

GET /productsFree · Starter+
POST /productsFree · Starter+
GET /products/{productId}Free · Starter+
PATCH /products/{productId}Free · Starter+
DELETE /products/{productId}Free · Starter+

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).

FieldTypeRules
productCodestringRequired on create. Lowercase slug (1 to 64 chars: a-z, 0-9, dots, hyphens, underscores). Unique per workspace or entity scope.
namestringRequired display name (1 to 200 chars).
entityIdstringOptional entity ID (ent_...). Omit for a workspace-wide product inherited by all entities.
baseItemKeystringOptional fallback category slug from GET /taxability/items (for example, saas or clothing).
defaultTreatmentstringRequired fallback treatment ("taxable" or "exempt") when no custom rule or platform rule applies.
metadataobjectOptional string key/value map (up to 10 keys). DELETE soft-archives the product.
POST /products request
{
  "productCode": "cloud-pro-seat",
  "name": "Acme Cloud Pro Seat",
  "description": "Monthly hosted analytics subscription seat",
  "baseItemKey": "saas",
  "defaultTreatment": "taxable",
  "metadata": { "erpSku": "SKU-9040" }
}
201 Created
{
  "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

POST /products/importFree · Starter+

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.

POST /products/import request
{
  "format": "json",
  "upsert": true,
  "dryRun": true,
  "rows": [
    {
      "productCode": "cloud-pro-seat",
      "name": "Acme Cloud Pro Seat",
      "baseItemKey": "saas",
      "defaultTreatment": "taxable"
    }
  ]
}

Flexible custom tax rules

GET /rulesFree · Starter+
POST /rulesFree · Starter+
GET /rules/{ruleId}Free · Starter+
PATCH /rules/{ruleId}Free · Starter+
DELETE /rules/{ruleId}Free · Starter+

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.

FieldTypeDetails
targetType / targetKeystring"product" (targetKey = productCode), "item_key" (targetKey = category slug), or "all" (no targetKey; does not override explicit taxable: false or shipping lines).
jurisdictionScopestring"all_us", "state" (requires state), or local "county", "city", or "district" (requires state and jurisdictionName).
effectiveDate / endDatestringOptional inclusive YYYY-MM-DD bounds evaluated against the transaction date.
buyerType / customerTagsstring / string[]Optional buyerType ("b2b" or "b2c") and up to 20 lowercase customerTags (all configured tags must be present on the calculation request).
Price & amount bandsnumberOptional minUnitAmountDollars, maxUnitAmountDollars, minLineSubtotalDollars, and maxLineSubtotalDollars.
sourcingTypestringOptional "intrastate" or "interstate" match when shipFrom and shipTo are supplied.
treatmentstring"taxable", "exempt" (supports rateScope on local rules), "reduced_rate" (reducedRate + reducedRateScope), or "rate_adjustment" (rateDelta or rateMultiplier + rateScope).
Thresholds & capsnumber / stringOptional thresholdDollars + thresholdMode, taxablePercent (0–100), maxTaxPerUnitDollars, and maxTaxPerLineDollars.
priorityinteger0 to 10,000 (default 100). Lower numbers win ties when specificity is equal.
POST /rules request
{
  "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"
}
201 Created
{
  "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:

  1. Exemption certificates (exemption_certificate): An active customer exemption certificate covering the destination state and line item always takes precedence.
  2. 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, lowest priority number, and latest update timestamp.
  3. Platform local overrides (platform_local_override): Seeded city, county, or district overrides (such as Denver or Chicago SaaS) active on the transaction date.
  4. Platform state rules (platform_state_rule): Effective-dated state rules for the line item's itemKey or resolved product's baseItemKey.
  5. Product default (product_default): The matched product's defaultTreatment (taxable or exempt), or standard taxable calculation when no product is specified.

Dry-run rule testing

POST /rules/testFree · Starter+

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).

POST /rules/test request
{
  "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
}
200 OK
{
  "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
  }
}