Shipping belongs to a market and uses read_markets / write_markets. Persisted mode is authoritative: zone and method routes reject until mode is saved as advanced. Switching from simple to advanced clears simple amounts and atomically creates one immutable default catch-all zone. Switching back to simple uses the two-step confirmation handshake and atomically removes every advanced zone, method, and rate. Simple amount maps and every advanced rate are exact decimal strings keyed by enabled market currency. Price tiers carry independent min_values / max_values per currency and must form contiguous [min,max) ranges. Fetch the limits endpoints before rendering forms; all caps come from the backend contract.
Endpoints#
Get shipping settings
Get shipping settings.
Returns persisted simple/advanced mode, simple currency maps, shared tax class, and HS code. Zone and method routes reject unless persisted mode is advanced.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Update shipping settings
Update shipping settings.
Switches modes atomically. Simple to advanced clears simple amounts and creates the immutable default zone. Advanced to simple returns CONFIRMATION_REQUIRED, then permanently deletes every zone, method, and rate in the confirmed transaction.
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 |
|---|---|---|
mode
required
|
string |
simple or advanced. |
shipping_type
|
string |
free, flat, or threshold in simple mode. |
flat_rate
|
object |
Currency-code to decimal string. |
free_threshold
|
object |
Currency-code to decimal string. |
threshold_rate
|
object |
Currency-code to decimal string. |
tax_class_id
|
string|null |
Shared market tax class. |
hsn_code
|
string |
Canonicalizable 2-12 digit HS code. |
confirmed
|
boolean |
Confirmation retry flag. |
confirmation_token
|
string |
Token from CONFIRMATION_REQUIRED. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Get shipping zone limits
Get shipping zone limits.
Returns live zone name, description, search, pagination, and per-market limits.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
List available shipping countries
List available shipping countries.
Returns market countries with current whole-country and subdivision claims. Query supports search, page, per_page, and exclude_zone_id.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
List shipping zones
List shipping zones.
Returns all zones in priority order, including the immutable default catch-all and each zone's method count.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Create a shipping zone
Create a shipping zone.
Creates a non-default country/subdivision claim. The default zone is created only by the advanced-mode transition.
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 |
Zone name. |
description
|
string |
Zone description. |
countries
|
string[] |
ISO country codes. |
subdivisions
|
string[] |
ISO subdivision codes belonging to countries. |
is_default
|
boolean |
Read-only invariant; false for create and unchanged for update. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Get a shipping zone
Get a shipping zone.
Returns one zone in the market.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Update a shipping zone
Update a shipping zone.
Replaces a zone definition. The default flag cannot be moved or cleared; the default zone cannot contain explicit regions.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
Zone name. |
description
|
string |
Zone description. |
countries
|
string[] |
ISO country codes. |
subdivisions
|
string[] |
ISO subdivision codes belonging to countries. |
is_default
|
boolean |
Read-only invariant; false for create and unchanged for update. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Delete a shipping zone
Delete a shipping zone.
Deletes a non-default zone and cascades its methods and rates.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Get shipping method limits
Get shipping method limits.
Returns live method name/description and rates-per-method limits.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
List shipping methods
List shipping methods.
Returns methods and exact decimal rates for a zone. Price tiers use min_values/max_values per currency.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Create a shipping method
Create a shipping method.
Creates free, flat, weight, price, or per-item shipping. Every non-free rate requires currency prices; price tiers require contiguous per-currency [min,max) bounds.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
Method name. |
description
|
string |
Method description. |
rate_type
required
|
string |
free, flat, weight, price, or item. |
is_active
required
|
boolean |
Availability. |
tax_class_id
|
string|null |
Shared market tax class. |
hsn_code
|
string |
Canonicalizable HS code. |
rates
|
array |
Exact-decimal rate rows. Each row has prices and scalar min_value/max_value; price rows instead use per-currency min_values/max_values. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Get a shipping method
Get a shipping method.
Returns one method with its full rates.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
methodId
required
|
uuid |
Shipping method ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Update a shipping method
Update a shipping method.
Replaces the method and its complete rate set under the same validation as create.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
methodId
required
|
uuid |
Shipping method ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
required
|
string |
Method name. |
description
|
string |
Method description. |
rate_type
required
|
string |
free, flat, weight, price, or item. |
is_active
required
|
boolean |
Availability. |
tax_class_id
|
string|null |
Shared market tax class. |
hsn_code
|
string |
Canonicalizable HS code. |
rates
|
array |
Exact-decimal rate rows. Each row has prices and scalar min_value/max_value; price rows instead use per-currency min_values/max_values. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Delete a shipping method
Delete a shipping method.
Deletes a method and all of its rates.
Path parameters
| Name | Type | Description |
|---|---|---|
marketId
required
|
uuid |
Market id. |
zoneId
required
|
uuid |
Shipping zone ID. |
methodId
required
|
uuid |
Shipping method ID. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
400INVALID_INPUTThe request body is malformed.
-
400SHIPPING_RATE_DATA_INVALIDA stored rate violates the shipping contract.
-
400SHIPPING_ZONE_DEFAULT_DELETE_LOCKEDThe immutable default zone cannot be deleted.
-
409SHIPPING_ADVANCED_REQUIREDSave the market's shipping mode as advanced first.
-
409CONFIRMATION_REQUIREDA destructive mode transition requires confirmation.
-
404MARKET_NOT_FOUNDThe market does not exist in this store.
Webhook events#
Shipping events are inserted in the same database transaction as each write. A settings event with mode simple means the market's advanced shipping state was removed; deleting a zone also removes its methods and rates.
Shipping settings updated
Fired when a market's shipping mode or simple shipping settings change.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_settings.id |
string |
Always present |
shipping_settings.market_id |
string |
Can be removed/added via the Payload builder |
shipping_settings.mode |
string |
Can be removed/added via the Payload builder |
shipping_settings.shipping_type |
string |
Can be removed/added via the Payload builder |
shipping_settings.flat_rate |
object |
Can be removed/added via the Payload builder |
shipping_settings.free_threshold |
object |
Can be removed/added via the Payload builder |
shipping_settings.threshold_rate |
object |
Can be removed/added via the Payload builder |
shipping_settings.tax_class_id |
string |
Can be removed/added via the Payload builder |
shipping_settings.hsn_code |
string |
Can be removed/added via the Payload builder |
shipping_settings.created_at |
string |
Can be removed/added via the Payload builder |
shipping_settings.updated_at |
string |
Can be removed/added via the Payload builder |
Shipping zone created
Fired when a shipping zone is created in a market.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_zone.id |
string |
Always present |
shipping_zone.market_id |
string |
Can be removed/added via the Payload builder |
shipping_zone.name |
string |
Can be removed/added via the Payload builder |
shipping_zone.description |
string |
Can be removed/added via the Payload builder |
shipping_zone.countries |
array |
Can be removed/added via the Payload builder |
shipping_zone.subdivisions |
array |
Can be removed/added via the Payload builder |
shipping_zone.is_default |
boolean |
Can be removed/added via the Payload builder |
shipping_zone.priority |
integer |
Can be removed/added via the Payload builder |
shipping_zone.created_at |
string |
Can be removed/added via the Payload builder |
shipping_zone.updated_at |
string |
Can be removed/added via the Payload builder |
Shipping zone updated
Fired when a shipping zone changes.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_zone.id |
string |
Always present |
shipping_zone.market_id |
string |
Can be removed/added via the Payload builder |
shipping_zone.name |
string |
Can be removed/added via the Payload builder |
shipping_zone.description |
string |
Can be removed/added via the Payload builder |
shipping_zone.countries |
array |
Can be removed/added via the Payload builder |
shipping_zone.subdivisions |
array |
Can be removed/added via the Payload builder |
shipping_zone.is_default |
boolean |
Can be removed/added via the Payload builder |
shipping_zone.priority |
integer |
Can be removed/added via the Payload builder |
shipping_zone.created_at |
string |
Can be removed/added via the Payload builder |
shipping_zone.updated_at |
string |
Can be removed/added via the Payload builder |
Shipping zone deleted
Fired when a shipping zone is deleted.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_zone.id |
string |
Always present |
shipping_zone.market_id |
string |
Can be removed/added via the Payload builder |
shipping_zone.name |
string |
Can be removed/added via the Payload builder |
Shipping method created
Fired when a shipping method and its rates are created.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_method.id |
string |
Always present |
shipping_method.market_id |
string |
Can be removed/added via the Payload builder |
shipping_method.shipping_zone_id |
string |
Can be removed/added via the Payload builder |
shipping_method.name |
string |
Can be removed/added via the Payload builder |
shipping_method.description |
string |
Can be removed/added via the Payload builder |
shipping_method.tax_class_id |
string |
Can be removed/added via the Payload builder |
shipping_method.hsn_code |
string |
Can be removed/added via the Payload builder |
shipping_method.rate_type |
string |
Can be removed/added via the Payload builder |
shipping_method.is_active |
boolean |
Can be removed/added via the Payload builder |
shipping_method.sort_order |
integer |
Can be removed/added via the Payload builder |
shipping_method.rates[*].id |
string |
Can be removed/added via the Payload builder |
shipping_method.rates[*].min_value |
string |
Can be removed/added via the Payload builder |
shipping_method.rates[*].max_value |
string |
Can be removed/added via the Payload builder |
shipping_method.rates[*].min_values |
object |
Can be removed/added via the Payload builder |
shipping_method.rates[*].max_values |
object |
Can be removed/added via the Payload builder |
shipping_method.rates[*].prices |
object |
Can be removed/added via the Payload builder |
shipping_method.created_at |
string |
Can be removed/added via the Payload builder |
shipping_method.updated_at |
string |
Can be removed/added via the Payload builder |
Shipping method updated
Fired when a shipping method or its rates change.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_method.id |
string |
Always present |
shipping_method.market_id |
string |
Can be removed/added via the Payload builder |
shipping_method.shipping_zone_id |
string |
Can be removed/added via the Payload builder |
shipping_method.name |
string |
Can be removed/added via the Payload builder |
shipping_method.description |
string |
Can be removed/added via the Payload builder |
shipping_method.tax_class_id |
string |
Can be removed/added via the Payload builder |
shipping_method.hsn_code |
string |
Can be removed/added via the Payload builder |
shipping_method.rate_type |
string |
Can be removed/added via the Payload builder |
shipping_method.is_active |
boolean |
Can be removed/added via the Payload builder |
shipping_method.sort_order |
integer |
Can be removed/added via the Payload builder |
shipping_method.rates[*].id |
string |
Can be removed/added via the Payload builder |
shipping_method.rates[*].min_value |
string |
Can be removed/added via the Payload builder |
shipping_method.rates[*].max_value |
string |
Can be removed/added via the Payload builder |
shipping_method.rates[*].min_values |
object |
Can be removed/added via the Payload builder |
shipping_method.rates[*].max_values |
object |
Can be removed/added via the Payload builder |
shipping_method.rates[*].prices |
object |
Can be removed/added via the Payload builder |
shipping_method.created_at |
string |
Can be removed/added via the Payload builder |
shipping_method.updated_at |
string |
Can be removed/added via the Payload builder |
Shipping method deleted
Fired when a shipping method is deleted.
Payload fields
| Field | Type | Description |
|---|---|---|
shipping_method.id |
string |
Always present |
shipping_method.market_id |
string |
Can be removed/added via the Payload builder |
shipping_method.name |
string |
Can be removed/added via the Payload builder |