Shipping

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 read_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Update shipping settings

PUT write_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789

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

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Get shipping zone limits

GET read_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

List available shipping countries

GET read_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

List shipping zones

GET read_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Create a shipping zone

POST write_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789

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

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Get a shipping zone

GET read_markets

Get a shipping zone.

Returns one zone in the market.

Path parameters

Name Type Description
marketId required uuid

Market id.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
zoneId required uuid

Shipping zone ID.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Update a shipping zone

PUT write_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
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

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Delete a shipping zone

DELETE write_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
zoneId required uuid

Shipping zone ID.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Get shipping method limits

GET read_markets

Get shipping method limits.

Returns live method name/description and rates-per-method limits.

Path parameters

Name Type Description
marketId required uuid

Market id.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
zoneId required uuid

Shipping zone ID.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

List shipping methods

GET read_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
zoneId required uuid

Shipping zone ID.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Create a shipping method

POST write_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
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

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Get a shipping method

GET read_markets

Get a shipping method.

Returns one method with its full rates.

Path parameters

Name Type Description
marketId required uuid

Market id.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
zoneId required uuid

Shipping zone ID.

methodId required uuid

Shipping method ID.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Update a shipping method

PUT write_markets

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.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
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

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The market does not exist in this store.

Delete a shipping method

DELETE write_markets

Delete a shipping method.

Deletes a method and all of its rates.

Path parameters

Name Type Description
marketId required uuid

Market id.

Example: 9a1f2c3d-4e5f-6789-abcd-ef0123456789
zoneId required uuid

Shipping zone ID.

methodId required uuid

Shipping method ID.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 INVALID_INPUT

    The request body is malformed.

  • 400 SHIPPING_RATE_DATA_INVALID

    A stored rate violates the shipping contract.

  • 400 SHIPPING_ZONE_DEFAULT_DELETE_LOCKED

    The immutable default zone cannot be deleted.

  • 409 SHIPPING_ADVANCED_REQUIRED

    Save the market's shipping mode as advanced first.

  • 409 CONFIRMATION_REQUIRED

    A destructive mode transition requires confirmation.

  • 404 MARKET_NOT_FOUND

    The 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

EVENT shipping_settings/update write_markets markets:write

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

EVENT shipping_zones/create write_markets markets:write

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

EVENT shipping_zones/update write_markets markets:write

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

EVENT shipping_zones/delete write_markets markets:write

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

EVENT shipping_methods/create write_markets markets:write

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

EVENT shipping_methods/update write_markets markets:write

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

EVENT shipping_methods/delete write_markets markets:write

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