Preferences apply across every storefront in the store. Permalink values are logical route segments; the storefront runtime combines them with the active domain, country, and language address. On a shared domain, the primary country and language live at the root, another language for that country uses /{locale}, and another country uses /{locale}-{country}. A country-pinned domain serves that country's default language at the root and its other languages under /{locale}.
Changing a permalink and creating its compatibility redirects are one transaction. Either the complete route change commits or nothing changes.
The age gate asks visitors to confirm a minimum age when they enter any storefront in the store. It is a confirmation, not an identity check. Store Admin and the mobile app show it under Settings > Compliance. Every storefront page includes the gate while the page content stays in the HTML, so search engines and advertising crawlers still see the store. A visitor's answer is kept in a first-party cookie for the browser session or for remember_days days. The visitor country is the one the consent banner uses; in selected-countries mode a visitor whose country is unknown sees the gate. Age gate changes publish no webhook event.
Endpoints#
Preferences limits
Get live Preferences limits.
Returns the current maximum length for every permalink segment.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
Get preferences
Get the store-wide favicon and permalink structure.
These settings apply to every storefront in the store.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
Set favicon
Set or remove the store-wide favicon.
Pass a site asset image id, or null to remove the favicon. Assigning an image also requires read_site_assets.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
favicon_file_id
required
|
string|null |
Site asset image id, or null to remove the favicon. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400INVALID_INPUTThe id is malformed, the file is not an image, or it is not a site asset.
-
404NOT_FOUNDThe file does not exist in this store.
-
400STORE_API_INVALID_REQUEST_BODYThe body has an unknown field or is missing favicon_file_id.
Get permalinks
Get every storefront permalink segment.
Returns all detail and listing route segments used by the storefront URL resolver.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
Update permalinks
Replace the full storefront permalink structure.
Send all permalink fields. Values must be unique unless the corresponding detail and listing routes are allowed to share a segment. Unknown fields are rejected. Renames create URL redirects transactionally.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
permalinks
required
|
object |
Complete permalink object returned by the read endpoint. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORE_API_INVALID_REQUEST_BODYThe body has an unknown field or is missing required permalinks.
-
400STOREFRONT_PERMALINK_EMPTYA permalink value is empty.
-
400STOREFRONT_PERMALINK_TOO_LONGA permalink value exceeds the live maximum.
-
400STOREFRONT_PERMALINK_INVALID_CHARSA permalink contains characters outside lowercase letters, numbers, and hyphens.
-
400STOREFRONT_PERMALINK_RESERVEDA permalink uses a reserved route or locale code.
-
400STOREFRONT_PERMALINK_DUPLICATETwo incompatible routes use the same permalink.
Age gate limits
Get the allowed age gate values.
Returns the minimum age and remember-days ranges, the copy length limits, the country limit, the allowed modes, and default_copy: the platform text an empty copy field shows, with {age} standing for min_age.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
Get age gate
Get the store-wide age gate.
The age gate is shown on every storefront in the store when a visitor enters, to all visitors or to visitors from countries. A visitor whose country is unknown sees it in selected-countries mode. Empty copy fields use the platform text in the shopper's language. revision changes on every saved change.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
Update age gate
Replace the store-wide age gate.
Send every field of age_gate; unknown fields are rejected. Country codes are ISO 3166-1 alpha-2, upper-cased and deduplicated; they are cleared when show_to is all. remember_days is used when remember_mode is days. decline_url is required when decline_action is redirect; it must be an absolute https:// address. {age} in the copy is replaced with min_age. Send expected_revision to refuse the change when someone saved in between. Storefront pages show the change at once.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
age_gate
required
|
object |
The complete age gate, as returned by Get age gate without |
expected_revision
|
string |
|
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORE_API_INVALID_REQUEST_BODYThe body has an unknown field, is missing age_gate, or a field has the wrong type.
-
400AGE_GATE_SHOW_TO_INVALIDshow_to is not all or selected_countries.
-
400AGE_GATE_MIN_AGE_INVALIDmin_age is outside 13 to 25.
-
400AGE_GATE_REMEMBER_INVALIDremember_mode is not session or days.
-
400AGE_GATE_REMEMBER_DAYS_INVALIDremember_days is outside 1 to 30.
-
400AGE_GATE_DECLINE_ACTION_INVALIDdecline_action is not message or redirect.
-
400AGE_GATE_DECLINE_URL_REQUIREDdecline_action is redirect and decline_url is empty.
-
400AGE_GATE_DECLINE_URL_INVALIDdecline_url is not an absolute https address, has user information, or is longer than 2048 characters.
-
400AGE_GATE_TEXT_INVALIDA copy field is longer than its limit or contains control characters.
-
400AGE_GATE_COUNTRIES_REQUIREDThe gate is enabled for selected countries with no country.
-
400AGE_GATE_COUNTRIES_TOO_MANYMore countries than max_countries.
-
400AGE_GATE_COUNTRY_INVALIDA country code is not a known ISO 3166-1 alpha-2 code.
-
409CONFLICTexpected_revision no longer matches: the age gate changed since it was read.
Webhook events#
Subscribe when an integration mirrors the store-wide favicon or permalink structure.
Online Store preferences updated
Fired when the store-wide favicon or permalink structure changes.
Payload fields
| Field | Type | Description |
|---|---|---|
preferences.favicon_file_id |
string |
Selectable in the Payload builder |
preferences.permalinks.product |
string |
Selectable in the Payload builder |
preferences.permalinks.shop |
string |
Selectable in the Payload builder |
preferences.permalinks.category |
string |
Selectable in the Payload builder |
preferences.permalinks.category_list |
string |
Selectable in the Payload builder |
preferences.permalinks.collection |
string |
Selectable in the Payload builder |
preferences.permalinks.collection_list |
string |
Selectable in the Payload builder |
preferences.permalinks.vendor |
string |
Selectable in the Payload builder |
preferences.permalinks.vendor_list |
string |
Selectable in the Payload builder |
preferences.permalinks.brand |
string |
Selectable in the Payload builder |
preferences.permalinks.brand_list |
string |
Selectable in the Payload builder |
preferences.permalinks.blog |
string |
Selectable in the Payload builder |
preferences.permalinks.blog_list |
string |
Selectable in the Payload builder |
preferences.permalinks.blog_category |
string |
Selectable in the Payload builder |
preferences.permalinks.page |
string |
Selectable in the Payload builder |
preferences.permalinks.policy |
string |
Selectable in the Payload builder |
preferences.permalinks.search |
string |
Selectable in the Payload builder |
preferences.updated_at |
string |
Selectable in the Payload builder |
changed_fields |
array |
Selectable in the Payload builder |