Batch get definition name translations
Fetch definition name translations in batch.
A definition's name is the label shoppers see next to its value, for example in the platform metafield block. Names translate per definition and locale. The definition must be visible to the token and editable by the merchant (merchant_access read_write, which every merchant-owned definition is); other app-owned definitions return TRANSLATION_FIELD_NOT_TRANSLATABLE. The token also needs the read scope of the definition's owner_type. Translation CSV (resource metafield_definition) and Store Admin translate the same names. Name translations send no webhooks, like choice label translations. Returns a resources entry keyed by metafield_definition:{id} for each requested definition (at most 100 per call); a definition without a translation has an empty object. One definition the token cannot address fails the whole call with its code. Fields without a translation in this locale are omitted from the response. An omitted field is not empty: shoppers see the store's base-language value, which the resource's own GET endpoint returns. Staff-created merchant tokens also require settings.metafield_definitions:read, as in Store Admin.
Path parameters
| Name | Type | Description |
|---|---|---|
locale
required
|
string |
Enabled non-default store locale. |
Query parameters
| Name | Type | Description |
|---|---|---|
ids
required
|
string |
Comma-separated metafield definition IDs. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
404METAFIELD_DEFINITION_NOT_FOUNDThe ID does not identify a definition visible to this token.
-
400TRANSLATION_FIELD_NOT_TRANSLATABLEThe definition is app-owned and its merchant_access is not read_write, so its name is not translatable; or a field other than name was sent.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the translations scope or the read scope of the definition's owner_type.
-
400TRANSLATION_LOCALE_REQUIREDLocale is missing.
-
400TRANSLATION_LOCALE_NOT_ENABLEDLocale is not enabled for this store.
-
400TRANSLATION_DEFAULT_LOCALE_FORBIDDENThe default locale cannot be a translation target.
-
400TRANSLATION_RESOURCE_ID_REQUIREDAt least one definition ID is required.
-
400TRANSLATION_TOO_MANY_RESOURCESMore than 100 definition IDs.
Batch set definition name translations
Set definition translations for any languages in one call.
A definition's name is the label shoppers see next to its value, for example in the platform metafield block. Names translate per definition and locale. The definition must be visible to the token and editable by the merchant (merchant_access read_write, which every merchant-owned definition is); other app-owned definitions return TRANSLATION_FIELD_NOT_TRANSLATABLE. The token also needs the read scope of the definition's owner_type. Translation CSV (resource metafield_definition) and Store Admin translate the same names. Name translations send no webhooks, like choice label translations. A row for a definition the token cannot address fails with that row's code (METAFIELD_DEFINITION_NOT_FOUND, TRANSLATION_FIELD_NOT_TRANSLATABLE, METAFIELD_WRITE_APP_OWN_ONLY, or STORE_API_SCOPE_REQUIRED when the token lacks the definition owner's read scope). Each row is one definition in one language: id, locale (any enabled non-default store locale) and fields. Rows for several languages can be mixed in one call; send at most 100 rows (one row = one definition in one locale) and at most one row per definition and locale. Each row is saved on its own: a failing row never stops the others. Empty values clear the matching field translation; omitted fields keep their translation. Every row is validated exactly like the single translation endpoint. The response has totals (rows, saved, failed) and one results entry per row in request order: {id, locale, status} with status saved or failed. A failed row carries the full error (code, message, details); its codes are the single endpoint's codes plus TRANSLATION_ROW_DUPLICATE. A saved rich-text row whose unsafe markup was removed lists warnings. A top-level code and message give the outcome: TRANSLATIONS_SAVED (200, every row saved), TRANSLATIONS_PARTIALLY_SAVED (200, success: true; the message counts saved and failed rows and names the failure reasons, e.g. "2 saved, 1 failed. No source text found for the requested fields (description).") TRANSLATIONS_NOT_SAVED_RETRY (503 with a Retry-After header, success: false; no row saved because every row failed only with TRANSLATION_WRITE_BUSY, so the same call can be sent again after error.details.retry_after_seconds) or TRANSLATIONS_NOT_SAVED (422, success: false; no row saved and at least one row failed for another reason). Both carry the same totals and results in error.details. With an Idempotency-Key, repeating the same request re-applies nothing that already saved and retries the failed rows. A write waits at most 2 seconds for other translation writes of the same item or of a clashing name or slug (for example a translation CSV import writing the same language); writes of other items, types and languages never wait. A row or call that fails with TRANSLATION_WRITE_BUSY (HTTP 503) saved nothing: send it again after error.details.retry_after_seconds (the call's Retry-After header says the same). Every row or call either saved or reports an error; none is left in an unknown state. Staff-created merchant tokens also require settings.metafield_definitions:write, as in Store Admin.
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 |
|---|---|---|
translations
required
|
array<object> |
Up to 100 rows shaped as {id, locale, fields}. The only allowed field key is |
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 is not valid JSON or a row has an unknown key or a wrongly typed value.
-
400TRANSLATION_NO_WRITES_PROVIDEDtranslations is empty.
-
400TRANSLATION_TOO_MANY_ROWSMore than 100 rows; nothing is written.
-
503TRANSLATIONS_NOT_SAVED_RETRYNo row saved and every row failed only with
TRANSLATION_WRITE_BUSY: send the same request again aftererror.details.retry_after_seconds(also theRetry-Afterheader).error.detailsalso hastotalsand oneresultsentry per row with its error. -
422TRANSLATIONS_NOT_SAVEDNo row saved and at least one row failed with an error that sending again will not fix;
error.detailshastotalsand oneresultsentry per row with its error. -
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties.
Get a definition name translation
Fetch the translated name of one metafield definition.
A definition's name is the label shoppers see next to its value, for example in the platform metafield block. Names translate per definition and locale. The definition must be visible to the token and editable by the merchant (merchant_access read_write, which every merchant-owned definition is); other app-owned definitions return TRANSLATION_FIELD_NOT_TRANSLATABLE. The token also needs the read scope of the definition's owner_type. Translation CSV (resource metafield_definition) and Store Admin translate the same names. Name translations send no webhooks, like choice label translations. Returns the stored name translation in the selected locale with is_outdated; a definition without a translation in this locale returns an empty fields object. Fields without a translation in this locale are omitted from the response. An omitted field is not empty: shoppers see the store's base-language value, which the resource's own GET endpoint returns. Staff-created merchant tokens also require settings.metafield_definitions:read, as in Store Admin.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
integer |
Metafield definition ID. |
locale
required
|
string |
Enabled non-default store locale. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
404METAFIELD_DEFINITION_NOT_FOUNDThe ID does not identify a definition visible to this token.
-
400TRANSLATION_FIELD_NOT_TRANSLATABLEThe definition is app-owned and its merchant_access is not read_write, so its name is not translatable; or a field other than name was sent.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the translations scope or the read scope of the definition's owner_type.
-
400TRANSLATION_LOCALE_REQUIREDLocale is missing.
-
400TRANSLATION_LOCALE_NOT_ENABLEDLocale is not enabled for this store.
-
400TRANSLATION_DEFAULT_LOCALE_FORBIDDENThe default locale cannot be a translation target.
Set a definition name translation
Set or clear the translated name of one metafield definition.
A definition's name is the label shoppers see next to its value, for example in the platform metafield block. Names translate per definition and locale. The definition must be visible to the token and editable by the merchant (merchant_access read_write, which every merchant-owned definition is); other app-owned definitions return TRANSLATION_FIELD_NOT_TRANSLATABLE. The token also needs the read scope of the definition's owner_type. Translation CSV (resource metafield_definition) and Store Admin translate the same names. Name translations send no webhooks, like choice label translations. Only name is translatable. Send an empty string to clear the translation; shoppers then see the source name. When the source name changes later, the translation is marked outdated. App tokens can translate only definitions their app owns. A write waits at most 2 seconds for other translation writes of the same item or of a clashing name or slug (for example a translation CSV import writing the same language); writes of other items, types and languages never wait. A row or call that fails with TRANSLATION_WRITE_BUSY (HTTP 503) saved nothing: send it again after error.details.retry_after_seconds (the call's Retry-After header says the same). Every row or call either saved or reports an error; none is left in an unknown state. Staff-created merchant tokens also require settings.metafield_definitions:write, as in Store Admin.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
integer |
Metafield definition ID. |
locale
required
|
string |
Enabled non-default store locale. |
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 |
|---|---|---|
translations
required
|
object |
Field-keyed translation values. The only allowed field is |
Errors
-
404METAFIELD_DEFINITION_NOT_FOUNDThe ID does not identify a definition visible to this token.
-
400TRANSLATION_FIELD_NOT_TRANSLATABLEThe definition is app-owned and its merchant_access is not read_write, so its name is not translatable; or a field other than name was sent.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the translations scope or the read scope of the definition's owner_type.
-
400TRANSLATION_LOCALE_REQUIREDLocale is missing.
-
400TRANSLATION_LOCALE_NOT_ENABLEDLocale is not enabled for this store.
-
400TRANSLATION_DEFAULT_LOCALE_FORBIDDENThe default locale cannot be a translation target.
-
403METAFIELD_WRITE_APP_OWN_ONLYAn app token can translate only definitions its app owns.
-
400STORE_API_INVALID_REQUEST_BODYThe body is not one JSON object with only a translations object.
-
400TRANSLATION_STAGING_INVALID_CONTROL_CHARSThe translated name contains unsupported control characters.
-
400TRANSLATION_FIELD_VALUE_TOO_LONGThe translated name is longer than 255 characters.
-
503TRANSLATION_WRITE_BUSYOther translation writes held the item or a clashing name or slug for more than 2 seconds; nothing was saved. Send the request again after
error.details.retry_after_seconds(also theRetry-Afterheader). -
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties.
Get a choice label translation
Fetch the translated label of one choice of a select metafield definition.
Select definitions (single_select, list.single_select) store choice keys as values and show each choice's label to shoppers. Labels translate per choice, not per value, so one translation covers every resource that stores that choice. The definition must be visible to the token and translatable, and the token also needs the read scope of the definition's owner_type. Read choice keys from the definition's validation_rules.choices. Fields without a translation in this locale are omitted from the response. An omitted field is not empty: shoppers see the store's base-language value, which the resource's own GET endpoint returns. Staff-created merchant tokens also require settings.metafield_definitions:read, as in Store Admin.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
string |
Metafield definition ID. |
choiceKey
required
|
string |
Choice key from the definition's |
locale
required
|
string |
Enabled non-default store locale. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
404METAFIELD_DEFINITION_NOT_FOUNDThe ID does not identify a definition visible to this token.
-
400TRANSLATION_FIELD_NOT_TRANSLATABLEThe definition is not a translatable select definition.
-
400METAFIELD_VALUE_NOT_IN_CHOICESThe choice key is not one of the definition's choices.
-
403STORE_API_SCOPE_REQUIREDThe token lacks read_translations or the read scope of the definition's owner_type.
-
400TRANSLATION_LOCALE_REQUIREDLocale is missing.
-
400TRANSLATION_LOCALE_NOT_ENABLEDLocale is not enabled for this store.
-
400TRANSLATION_DEFAULT_LOCALE_FORBIDDENThe default locale cannot be a translation target.
Set a choice label translation
Set or clear the translated label of one choice of a select metafield definition.
Sets the choice label shoppers see in an enabled non-default locale. The choice key, which resources store as their value, never changes. Send an empty string to clear the translation; shoppers then see the source label. When the source label changes later, the translation is marked outdated. App tokens can translate only definitions their app owns. A write waits at most 2 seconds for other translation writes of the same item or of a clashing name or slug (for example a translation CSV import writing the same language); writes of other items, types and languages never wait. A row or call that fails with TRANSLATION_WRITE_BUSY (HTTP 503) saved nothing: send it again after error.details.retry_after_seconds (the call's Retry-After header says the same). Every row or call either saved or reports an error; none is left in an unknown state. Staff-created merchant tokens also require settings.metafield_definitions:write, as in Store Admin.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
string |
Metafield definition ID. |
choiceKey
required
|
string |
Choice key from the definition's |
locale
required
|
string |
Enabled non-default store locale. |
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 label; an empty string clears it. |
Errors
-
404METAFIELD_DEFINITION_NOT_FOUNDThe ID does not identify a definition visible to this token.
-
400TRANSLATION_FIELD_NOT_TRANSLATABLEThe definition is not a translatable select definition.
-
400METAFIELD_VALUE_NOT_IN_CHOICESThe choice key is not one of the definition's choices.
-
403STORE_API_SCOPE_REQUIREDThe token lacks read_translations or the read scope of the definition's owner_type.
-
400TRANSLATION_LOCALE_REQUIREDLocale is missing.
-
400TRANSLATION_LOCALE_NOT_ENABLEDLocale is not enabled for this store.
-
400TRANSLATION_DEFAULT_LOCALE_FORBIDDENThe default locale cannot be a translation target.
-
403METAFIELD_WRITE_APP_OWN_ONLYAn app token can translate only definitions its app owns.
-
403METAFIELD_WRITE_MERCHANT_READ_ONLYA non-app token addressed an app-owned definition whose merchant_access is not read_write.
-
400STORE_API_INVALID_REQUEST_BODYThe body is not one JSON object with only a value field.
-
400INVALID_INPUTvalue is missing or null; send an empty string to clear the translation.
-
503TRANSLATION_WRITE_BUSYOther translation writes held the item or a clashing name or slug for more than 2 seconds; nothing was saved. Send the request again after
error.details.retry_after_seconds(also theRetry-Afterheader). -
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties.