Tax classes belong to a market and use read_markets / write_markets. They describe what is being taxed; tax zones describe where, and rate lines connect the two. Fetch the limits endpoint before rendering lists or forms. Slugs are generated when omitted and validated exactly when supplied. A market always retains one default class.
Model product tax treatment#
A tax class groups products that receive the same treatment inside one market. Create classes such as Standard, Reduced rate, or Exempt, then assign products or variants to them. Rates connect each class to each tax zone. Products without an assignment use the market's default class while use_default_tax_class is enabled; otherwise they are sold without zone tax.
Create a class#
// POST /api/2025-01/markets/{marketId}/tax-classes
{
"name": "Reduced rate",
"slug": "reduced-rate",
"description": "Books and qualifying essentials",
"is_default": false
}
Fetch the limits endpoint before building a form or picker. Deleting a class that still owns rates, product assignments, variant assignments, or price-based rules uses the confirmation handshake before anything is removed. A class used by shipping, checkout fees, cash on delivery, or payment adjustments cannot be deleted until those use another class.
Endpoints#
Get tax class limits
Fetch tax-class validation limits.
Returns the live tax-class limits — the per-market cap and the name, slug, description, and search length caps (all counted in characters). Read this instead of hardcoding numbers.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
List tax classes
List a market's tax classes.
Returns paginated tax classes, searchable by name. Every market starts with one default class; is_default marks it. Pagination and search bounds come from the limits endpoint.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Query parameters
| Name | Type | Description |
|---|---|---|
page
|
integer |
Page number. |
per_page
|
integer |
Page size (service-capped). |
search
|
string |
Search by tax class name. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404MARKET_NOT_FOUNDMarket does not exist in this store.
Create a tax class
Create a tax class in a market.
Creates a tax class. name is required. Omit slug to have one generated from the name — generation transliterates per the store's default locale and suffixes -2, -3, … on collision; a slug you provide is validated exactly as sent (lowercase letters, numbers, and hyphens) and rejected on duplicate rather than rewritten. Setting is_default makes this the market's default class and clears the previous default in the same write. Fires tax_classes/create.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
Tax class name. |
slug
|
string |
Slug — validated as-is when provided, generated from the name when omitted. |
description
|
string |
Internal description. |
is_default
|
boolean |
Make this the market's default class. The previous default is cleared in the same write. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400TAX_CLASS_NAME_REQUIREDName is empty after normalization.
-
400TAX_CLASS_NAME_TOO_LONGName exceeds the limit.
-
400TAX_CLASS_DESCRIPTION_TOO_LONGDescription exceeds the limit.
-
400MARKET_SLUG_INVALIDProvided slug has characters outside lowercase letters, numbers, and hyphens.
-
400TAX_CLASS_SLUG_TOO_LONGProvided slug exceeds the limit.
-
404MARKET_NOT_FOUNDMarket does not exist in this store.
-
409TAX_CLASS_SLUG_DUPLICATEA tax class with this slug already exists in the market.
-
409TAX_CLASS_LIMIT_REACHEDThe market's tax class cap has been reached.
Get a tax class
Fetch one tax class.
Returns the tax class.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
taxClassId
required
|
string |
Tax class id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
404MARKET_NOT_FOUNDMarket does not exist in this store.
-
404TAX_CLASS_NOT_FOUNDTax class does not exist in this market.
Update a tax class
Update a tax class.
Updates the tax class's name, slug, description, and default flag. Slug rules match create: omitted or empty regenerates from the name, a provided slug is validated as-is and rejected on duplicate. Promoting a class to default clears the previous default in the same write; a market always keeps exactly one default class. Fires tax_classes/update.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
taxClassId
required
|
string |
Tax class id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
Tax class name. |
slug
|
string |
Slug — validated as-is when provided, generated from the name when omitted. |
description
|
string |
Internal description. |
is_default
|
boolean |
Make this the market's default class. The previous default is cleared in the same write. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400TAX_CLASS_NAME_REQUIREDName is empty after normalization.
-
400TAX_CLASS_NAME_TOO_LONGName exceeds the limit.
-
400TAX_CLASS_DESCRIPTION_TOO_LONGDescription exceeds the limit.
-
400MARKET_SLUG_INVALIDProvided slug has characters outside lowercase letters, numbers, and hyphens.
-
400TAX_CLASS_SLUG_TOO_LONGProvided slug exceeds the limit.
-
404MARKET_NOT_FOUNDMarket does not exist in this store.
-
409TAX_CLASS_SLUG_DUPLICATEA tax class with this slug already exists in the market.
-
409TAX_CLASS_LIMIT_REACHEDThe market's tax class cap has been reached.
-
404TAX_CLASS_NOT_FOUNDTax class does not exist in this market.
Bulk delete tax classes
Delete a selected set of tax classes atomically.
Send 1 to list_max_limit unique tax-class UUIDs from the same market. The service validates the full selection before deleting anything. A default class, a class assigned to shipping, checkout fees, cash on delivery or payment adjustments, a missing class, a duplicate or malformed id, or an oversized selection rejects the whole request. If any class has dependent rates, product or variant assignments, or price rules, the first request returns all warnings and a confirmation token bound to the exact sorted selection. Repeat the identical selection with confirmed and confirmation_token. All deletions, per-class audit records, and tax_classes/delete webhook events commit in one transaction or all roll back.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
tax_class_ids
required
|
array<uuid> |
Unique tax-class UUIDs from this market; maximum list_max_limit. |
confirmed
|
boolean |
Set to true only when repeating the identical selection after confirmation is requested. |
confirmation_token
|
string |
The single-use token returned for this exact selection. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400INVALID_INPUTThe bulk selection is empty, malformed, duplicated, or exceeds list_max_limit.
-
400MARKET_CONFIRMATION_INVALIDThe confirmation token is invalid, expired, already used, or belongs to another selection.
-
400TAX_CLASS_DEFAULT_DELETE_LOCKEDThe default class can't be deleted — promote another class first.
-
404MARKET_NOT_FOUNDMarket does not exist in this store.
-
404TAX_CLASS_NOT_FOUNDTax class does not exist in this market.
-
409TAX_CLASS_SHIPPING_ASSIGNEDShipping settings or methods use this class. Assign them a different class before deleting it.
-
409TAX_CLASS_CHARGES_ASSIGNEDCheckout fees, cash-on-delivery settings or payment adjustments use this class. Choose a different class there before deleting it.
-
409CONFIRMATION_REQUIREDThe class has dependents; retry with confirmed and the returned confirmation_token.
Delete a tax class
Delete one tax class. Use the bulk-delete endpoint for a selection. Each successful deletion records the class and market names in its audit entry.
Deletes the tax class together with its rates, product and variant assignments, and price rules. The default class can't be deleted — promote another class first. Shipping settings and shipping methods must be reassigned before deleting their tax class (TAX_CLASS_SHIPPING_ASSIGNED), and so must checkout fees, cash-on-delivery settings and payment adjustments (TAX_CLASS_CHARGES_ASSIGNED). When the class still has dependents, the first call returns a confirmation response listing what will be removed; retry with confirmed and the returned confirmation_token to proceed. Products left without a class are taxed by the market's default class while use_default_tax_class is on, and sold untaxed when it is off. Fires tax_classes/delete.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
taxClassId
required
|
string |
Tax class id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
confirmed
|
boolean |
On a confirmation retry, set this to true and send the returned confirmation_token. Omit it on the first request. |
confirmation_token
|
string |
Token from the CONFIRMATION_REQUIRED response. Omit it on the first request and resend the exact same id selection when using it. |
Errors
-
400STORE_API_INVALID_REQUEST_BODYmarketIdmust be a valid UUID. -
400INVALID_INPUTThe bulk selection is empty, malformed, duplicated, or exceeds list_max_limit.
-
400MARKET_CONFIRMATION_INVALIDThe confirmation token is invalid, expired, already used, or belongs to another selection.
-
400TAX_CLASS_DEFAULT_DELETE_LOCKEDThe default class can't be deleted — promote another class first.
-
404MARKET_NOT_FOUNDMarket does not exist in this store.
-
404TAX_CLASS_NOT_FOUNDTax class does not exist in this market.
-
409TAX_CLASS_SHIPPING_ASSIGNEDShipping settings or methods use this class. Assign them a different class before deleting it.
-
409TAX_CLASS_CHARGES_ASSIGNEDCheckout fees, cash-on-delivery settings or payment adjustments use this class. Choose a different class there before deleting it.
-
409CONFIRMATION_REQUIREDThe class has dependents; retry with confirmed and the returned confirmation_token.
Webhook events#
Tax-class events are published for every create, update, and confirmed delete. Making a class the default also publishes an update for the class that stops being the default. The saved change and its event become visible together. Delete payloads preserve the class identity after its dependent data has been removed.
Tax class created
Subscribe to receive the saved tax class after it is created in a market.
Payload fields
| Field | Type | Description |
|---|---|---|
tax_class.id |
string |
Always present
The stable tax class id. |
tax_class.market_id |
string |
Selectable in the Payload builder
The market where the tax class is available. |
tax_class.name |
string |
Selectable in the Payload builder
The merchant-facing tax class name. |
tax_class.slug |
string |
Selectable in the Payload builder
The tax class's URL-safe identifier within the market. |
tax_class.description |
string |
Selectable in the Payload builder
The optional explanation of which products use this class. |
tax_class.is_default |
boolean |
Selectable in the Payload builder
Whether products without an explicit assignment use this class. |
tax_class.created_at |
string |
Selectable in the Payload builder
When the tax class was created. |
tax_class.updated_at |
string |
Selectable in the Payload builder
When the tax class last changed. |
Tax class updated
Subscribe to receive the current tax class after its name, slug, description, or default status changes.
Payload fields
| Field | Type | Description |
|---|---|---|
tax_class.id |
string |
Always present
The stable tax class id. |
tax_class.market_id |
string |
Selectable in the Payload builder
The market where the tax class is available. |
tax_class.name |
string |
Selectable in the Payload builder
The merchant-facing tax class name. |
tax_class.slug |
string |
Selectable in the Payload builder
The tax class's URL-safe identifier within the market. |
tax_class.description |
string |
Selectable in the Payload builder
The optional explanation of which products use this class. |
tax_class.is_default |
boolean |
Selectable in the Payload builder
Whether products without an explicit assignment use this class. |
tax_class.created_at |
string |
Selectable in the Payload builder
When the tax class was created. |
tax_class.updated_at |
string |
Selectable in the Payload builder
When the tax class last changed. |
Tax class deleted
Subscribe to remove a deleted tax class from your integration. The payload keeps its id, market id, last known name, and slug.
Payload fields
| Field | Type | Description |
|---|---|---|
tax_class.id |
string |
Always present
The stable tax class id. |
tax_class.market_id |
string |
Selectable in the Payload builder
The market where the tax class is available. |
tax_class.name |
string |
Selectable in the Payload builder
The merchant-facing tax class name. |
tax_class.slug |
string |
Selectable in the Payload builder
The tax class's URL-safe identifier within the market. |