Shop metafield translations

Read and write localized shop metafield fields through the Store API.

Get a shop metafield translation

GET read_storefront + read_translations

Fetch one translated shop-level custom-data value.

The definition must be visible to the token and translatable.

Path parameters

Name Type Description
namespace required string

Metafield definition namespace. URL-encode : in app namespaces such as app:<slug>.

Example: details
key required string

Metafield definition key.

Example: subtitle
locale required string

Enabled non-default store locale.

Example: fr

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 METAFIELD_NAMESPACE_INVALID

    The namespace or key path segment is not valid URL encoding.

  • 400 PRODUCT_METAFIELD_DEF_NOT_FOUND

    The namespace and key do not identify a translatable definition visible to this token.

  • 400 TRANSLATION_LOCALE_REQUIRED

    Locale is missing.

  • 400 TRANSLATION_LOCALE_NOT_ENABLED

    Locale is not enabled for this store.

  • 400 TRANSLATION_DEFAULT_LOCALE_FORBIDDEN

    The default locale cannot be a translation target.

Set a shop metafield translation

PUT write_storefront + write_translations

Set or clear one translated shop-level custom-data value.

Sets this value's translation in an enabled non-default locale without changing the source value. App tokens can translate only definitions their app owns. Send an explicit string in value; omit neither the field nor its value, and do not send null. An empty string clears the translation. For list.string, send a JSON-encoded string array with one translated item for each source item, in the same order.

Path parameters

Name Type Description
namespace required string

Metafield definition namespace. URL-encode : in app namespaces such as app:<slug>.

Example: details
key required string

Metafield definition key.

Example: subtitle
locale required string

Enabled non-default store locale.

Example: fr

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Idempotency-Key string

Optional key for this translation write. Reuse it only with the same payload when repeating the request.

Body parameters

Name Type Description
value required string

Translated value; an empty string clears it.

Example: Fait main à Lisbonne

Errors

  • 400 METAFIELD_NAMESPACE_INVALID

    The namespace or key path segment is not valid URL encoding.

  • 400 PRODUCT_METAFIELD_DEF_NOT_FOUND

    The namespace and key do not identify a translatable definition visible to this token.

  • 400 TRANSLATION_LOCALE_REQUIRED

    Locale is missing.

  • 400 TRANSLATION_LOCALE_NOT_ENABLED

    Locale is not enabled for this store.

  • 400 TRANSLATION_DEFAULT_LOCALE_FORBIDDEN

    The default locale cannot be a translation target.

  • 403 METAFIELD_WRITE_APP_OWN_ONLY

    An app token can translate only definitions its app owns. Visible merchant-owned and shared definitions of other apps return this code.

  • 403 METAFIELD_WRITE_MERCHANT_READ_ONLY

    A non-app token addressed an app-owned definition whose merchant_access is not read_write.

  • 400 STORE_API_INVALID_REQUEST_BODY

    The body is not one JSON object with only a value field.

  • 400 INVALID_INPUT

    value is missing or null; send an empty string to clear the translation.

  • 400 TRANSLATION_LIST_LENGTH_MISMATCH

    The translated list must have the same number of items as the source list.

Webhook events#

Subscribe to these events when your integration mirrors localized shop metafields. Update and clear events identify the locale and changed fields. One write can emit both events when it sets some fields and clears others.

Store metafield translations updated

EVENT store_metafields/translations/update App scope: read_storefront Staff permission: settings.metafield_definitions:write

Fired when a store metafield's translation is added or updated for a locale.

Payload fields

Field Type Description
metafield.store_name string Selectable in the Payload builder
metafield.definition_id string Always present
metafield.namespace string Selectable in the Payload builder
metafield.key string Selectable in the Payload builder
metafield.name string Selectable in the Payload builder
metafield.type string Selectable in the Payload builder
metafield.app_id string Selectable in the Payload builder
metafield.app_access string Selectable in the Payload builder
metafield.merchant_access string Selectable in the Payload builder
locale string Selectable in the Payload builder
translation.value string Selectable in the Payload builder
updated_at string Selectable in the Payload builder

Store metafield translations deleted

EVENT store_metafields/translations/delete App scope: read_storefront Staff permission: settings.metafield_definitions:write

Fired when a store metafield's translation is cleared for a locale.

Payload fields

Field Type Description
metafield.store_name string Selectable in the Payload builder
metafield.definition_id string Always present
metafield.namespace string Selectable in the Payload builder
metafield.key string Selectable in the Payload builder
metafield.name string Selectable in the Payload builder
metafield.type string Selectable in the Payload builder
metafield.app_id string Selectable in the Payload builder
metafield.app_access string Selectable in the Payload builder
metafield.merchant_access string Selectable in the Payload builder
locale string Selectable in the Payload builder
translation.value string Selectable in the Payload builder
updated_at string Selectable in the Payload builder