Duty rules belong to duty-enabled market countries and use read_markets / write_markets. Each country has at most one rule. Its de minimis value is an exact decimal in the currency assigned to that country in Pricing. Default and HS-code rates preserve one of three explicit shapes: ad_valorem uses rate, specific uses amount plus per, and compound uses all three. Irrelevant fields are rejected, not ignored. HS codes accept dotted, spaced, or hyphenated display forms but are stored canonically as an even 2-12 digit code; canonical collisions fail the write. Update is partial, with explicit clear flags for de minimis and the default rate, while hs_rates replaces the complete map.
Endpoints#
Get duty limits
Get duty limits.
Returns live country-rule, HS-rate, search, and pagination limits.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
List duty countries
List duty countries.
Returns market countries and whether each is enabled for duty rules; supports search and pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
List duty rules
List duty rules.
Returns paginated country rules with rich default and HS-code rates.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
Create a duty rule
Create a duty rule.
Creates one rule for a duty-enabled market country. Rates are ad_valorem, specific, or compound and reject fields irrelevant to their type.
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 |
|---|---|---|
country_code
required
|
string |
Duty-enabled ISO country code. |
de_minimis_value
|
decimal-string|null |
Non-negative threshold in the country's assigned currency. |
default_duty_rate
|
object|null |
Rich rate: type plus applicable rate and/or amount/per. |
hs_rates
|
object |
HS-code to rich rate object. |
is_enabled
required
|
boolean |
Whether this rule participates in resolution. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
Get a duty rule by country
Get a duty rule by country.
Returns the rule for one ISO country code.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
countryCode
required
|
string |
ISO country code. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
Get a duty rule
Get a duty rule.
Returns one country rule and its canonical 2-12 digit HS map.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
ruleId
required
|
uuid |
Duty country rule ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
Update a duty rule
Update a duty rule.
Partially updates a rule. Explicit clear flags remove de minimis or the default rate; hs_rates replaces the complete canonical map.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
ruleId
required
|
uuid |
Duty country rule ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
de_minimis_value
|
decimal-string|null |
Non-negative threshold in the country's assigned currency. |
default_duty_rate
|
object|null |
Rich rate: type plus applicable rate and/or amount/per. |
hs_rates
|
object |
HS-code to rich rate object. |
is_enabled
required
|
boolean |
Whether this rule participates in resolution. |
clear_de_minimis_value
|
boolean |
Explicitly clear de minimis. |
clear_default_duty_rate
|
boolean |
Explicitly clear the default rate. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
Delete a duty rule
Delete a duty rule.
Deletes a country rule and all HS-code rates.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
ruleId
required
|
uuid |
Duty country rule ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
409MARKET_DUTIES_DISABLEDEnable duties for the market before mutating rules.
-
400MARKET_DUTY_RATE_TYPE_INVALIDRate type is not ad_valorem, specific, or compound.
-
400MARKET_DUTY_RATE_SHAPE_INVALIDThe rate contains fields irrelevant to its type.
-
400MARKET_DUTY_HS_CODE_INVALID_FORMATHS code cannot be normalized to an even 2-12 digit level.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
-
404DUTY_RULE_NOT_FOUNDThe duty rule does not exist in this market.
Webhook events#
Duty-rule events are inserted in the same database transaction as every create, update, or delete. Payloads preserve ad valorem, specific, and compound rate shapes.
Duty rule created
Fired when a country duty rule is created in a market.
Payload fields
| Field | Type | Description |
|---|---|---|
duty_rule.id |
string |
Always present |
duty_rule.market_id |
string |
Can be removed/added via the Payload builder |
duty_rule.country_code |
string |
Can be removed/added via the Payload builder |
duty_rule.de_minimis_value |
string |
Can be removed/added via the Payload builder |
duty_rule.de_minimis_currency |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.type |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.rate |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.amount |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.per |
string |
Can be removed/added via the Payload builder |
duty_rule.hs_rates |
object |
Can be removed/added via the Payload builder |
duty_rule.is_enabled |
boolean |
Can be removed/added via the Payload builder |
duty_rule.created_at |
string |
Can be removed/added via the Payload builder |
duty_rule.updated_at |
string |
Can be removed/added via the Payload builder |
Duty rule updated
Fired when a country duty rule or its HS rates change.
Payload fields
| Field | Type | Description |
|---|---|---|
duty_rule.id |
string |
Always present |
duty_rule.market_id |
string |
Can be removed/added via the Payload builder |
duty_rule.country_code |
string |
Can be removed/added via the Payload builder |
duty_rule.de_minimis_value |
string |
Can be removed/added via the Payload builder |
duty_rule.de_minimis_currency |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.type |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.rate |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.amount |
string |
Can be removed/added via the Payload builder |
duty_rule.default_duty_rate.per |
string |
Can be removed/added via the Payload builder |
duty_rule.hs_rates |
object |
Can be removed/added via the Payload builder |
duty_rule.is_enabled |
boolean |
Can be removed/added via the Payload builder |
duty_rule.created_at |
string |
Can be removed/added via the Payload builder |
duty_rule.updated_at |
string |
Can be removed/added via the Payload builder |
Duty rule deleted
Fired when a country duty rule is deleted.
Payload fields
| Field | Type | Description |
|---|---|---|
duty_rule.id |
string |
Always present |
duty_rule.market_id |
string |
Can be removed/added via the Payload builder |
duty_rule.country_code |
string |
Can be removed/added via the Payload builder |