Category translations

Read and write localized category fields through the Store API.

Get category translation

GET read_products + read_translations

Fetch one category translation.

Returns stored translated Category fields for one locale, including whether the translation is out of date. 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.

Path parameters

Name Type Description
id required integer

Category id.

Example: 7
locale required string

Enabled non-default store locale.

Example: fr

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 STORE_API_INVALID_CATEGORY_ID

    Id is not an integer.

  • 400 TRANSLATION_LOCALE_REQUIRED

    Locale is required.

  • 400 TRANSLATION_LOCALE_NOT_ENABLED

    Locale is not enabled for this store.

  • 400 TRANSLATION_DEFAULT_LOCALE_FORBIDDEN

    Translations cannot target the store's default locale.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    Field is not translatable for categories.

  • 400 TRANSLATION_FIELDS_REQUIRED

    At least one translated field is required.

  • 400 TRANSLATION_FIELD_VALUE_TOO_LONG

    A translated value exceeds its field limit.

  • 400 TRANSLATION_INVALID_RESOURCE_ID

    A category id is invalid.

  • 400 TRANSLATION_TOO_MANY_RESOURCES

    The request exceeds the translation batch resource cap.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    Category does not exist in this store.

  • 409 TRANSLATION_DUPLICATE_NAME_OR_SLUG

    Translated slug conflicts with another category.

Set category translation

PUT write_products + write_translations

Set one category translation.

Writes translated Category fields for one locale. Empty values clear the matching field translation.

Path parameters

Name Type Description
id required integer

Category id.

Example: 7
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
translations required object

Field-keyed translation values. Allowed fields come from contract.translation.fields.

Example: {"name": "Vêtements", "description": "Vêtements et mode."}

Errors

  • 400 STORE_API_INVALID_CATEGORY_ID

    Id is not an integer.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 TRANSLATION_LOCALE_REQUIRED

    Locale is required.

  • 400 TRANSLATION_LOCALE_NOT_ENABLED

    Locale is not enabled for this store.

  • 400 TRANSLATION_DEFAULT_LOCALE_FORBIDDEN

    Translations cannot target the store's default locale.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    Field is not translatable for categories.

  • 400 TRANSLATION_FIELDS_REQUIRED

    At least one translated field is required.

  • 400 TRANSLATION_FIELD_VALUE_TOO_LONG

    A translated value exceeds its field limit.

  • 400 TRANSLATION_INVALID_RESOURCE_ID

    A category id is invalid.

  • 400 TRANSLATION_TOO_MANY_RESOURCES

    The request exceeds the translation batch resource cap.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    Category does not exist in this store.

  • 409 TRANSLATION_DUPLICATE_NAME_OR_SLUG

    Translated slug conflicts with another category.

Batch get category translations

GET read_products + read_translations

Fetch category translations in batch.

Returns translated Category fields for multiple category ids in one locale. 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.

Path parameters

Name Type Description
locale required string

Enabled non-default store locale.

Example: fr

Query parameters

Name Type Description
ids required string

Comma-separated category ids.

Example: 1,2,3

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 TRANSLATION_LOCALE_REQUIRED

    Locale is required.

  • 400 TRANSLATION_LOCALE_NOT_ENABLED

    Locale is not enabled for this store.

  • 400 TRANSLATION_DEFAULT_LOCALE_FORBIDDEN

    Translations cannot target the store's default locale.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    Field is not translatable for categories.

  • 400 TRANSLATION_FIELDS_REQUIRED

    At least one translated field is required.

  • 400 TRANSLATION_FIELD_VALUE_TOO_LONG

    A translated value exceeds its field limit.

  • 400 TRANSLATION_INVALID_RESOURCE_ID

    A category id is invalid.

  • 400 TRANSLATION_TOO_MANY_RESOURCES

    The request exceeds the translation batch resource cap.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    Category does not exist in this store.

  • 409 TRANSLATION_DUPLICATE_NAME_OR_SLUG

    Translated slug conflicts with another category.

Batch set category translations

PUT write_products + write_translations

Set category translations in batch.

Writes translated Category fields for multiple category ids in one locale. Either every row is written or, if any row is invalid, none are.

Path parameters

Name Type Description
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
translations required array<object>

Rows with id and fields. Allowed field keys come from contract.translation.fields.

Example: [{"id": 7, "fields": {"name": "Vêtements"}}]

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 TRANSLATION_LOCALE_REQUIRED

    Locale is required.

  • 400 TRANSLATION_LOCALE_NOT_ENABLED

    Locale is not enabled for this store.

  • 400 TRANSLATION_DEFAULT_LOCALE_FORBIDDEN

    Translations cannot target the store's default locale.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    Field is not translatable for categories.

  • 400 TRANSLATION_FIELDS_REQUIRED

    At least one translated field is required.

  • 400 TRANSLATION_FIELD_VALUE_TOO_LONG

    A translated value exceeds its field limit.

  • 400 TRANSLATION_INVALID_RESOURCE_ID

    A category id is invalid.

  • 400 TRANSLATION_TOO_MANY_RESOURCES

    The request exceeds the translation batch resource cap.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    Category does not exist in this store.

  • 409 TRANSLATION_DUPLICATE_NAME_OR_SLUG

    Translated slug conflicts with another category.

Get a category metafield translation

GET read_products + read_translations

Fetch one translated category custom-data value.

Resolves the definition by namespace and key, verifies that it is translatable and visible to the calling app, then returns the stored value for the requested enabled non-default language. 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.

Path parameters

Name Type Description
id required integer

Category id.

Example: 7
namespace required string

Metafield definition namespace.

Example: details
key required string

Metafield definition key.

Example: care
locale required string

Enabled non-default store locale.

Example: fr

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 STORE_API_INVALID_CATEGORY_ID

    Id is not an integer.

  • 404 CATEGORY_NOT_FOUND

    Category does not exist in this store.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    The definition is not translatable or its value type cannot be translated.

  • 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 language stores source values and cannot be used as a translation locale.

Set a category metafield translation

PUT write_products + write_translations

Set or clear one translated category custom-data value.

Writes the translated value using the same definition ownership, type, length, locale, audit, search-index, and webhook rules as the admin translation workflow. Send an empty value to clear this locale's translation. 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
id required integer

Category id.

Example: 7
namespace required string

Metafield definition namespace.

Example: details
key required string

Metafield definition key.

Example: care
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. Send an empty string to delete the stored translation for this locale.

Example: Lavage à la main

Errors

  • 400 STORE_API_INVALID_CATEGORY_ID

    Id is not an integer.

  • 404 CATEGORY_NOT_FOUND

    Category does not exist in this store.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    The definition is not translatable or its value type cannot be translated.

  • 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 language stores source values and cannot be used as a translation locale.

  • 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 categories. Update and clear events identify the locale and changed fields. One write can emit both events when it sets some fields and clears others.

Category translations updated

EVENT categories/translations/update App scope: read_products Staff permission: products:write

Fired when a category's translations are added or updated for a locale. Payload carries only the fields that changed.

Payload fields

Field Type Description
category.id integer Always present
category.parent_id integer Selectable in the Payload builder
category.name string Selectable in the Payload builder
category.slug string Selectable in the Payload builder
category.description string Selectable in the Payload builder
category.seo_title string Selectable in the Payload builder
category.seo_description string Selectable in the Payload builder
category.image_id string Selectable in the Payload builder
category.image_url string Selectable in the Payload builder
category.image_cdn_url string Selectable in the Payload builder
category.product_count integer Selectable in the Payload builder
category.template_handle string Selectable in the Payload builder
category.parent_name string Selectable in the Payload builder
category.has_children boolean Selectable in the Payload builder
category.created_at string Selectable in the Payload builder
category.updated_at string Selectable in the Payload builder
locale string Selectable in the Payload builder
translation.name string Selectable in the Payload builder
translation.slug string Selectable in the Payload builder
translation.description string Selectable in the Payload builder
translation.seo_title string Selectable in the Payload builder
translation.seo_description string Selectable in the Payload builder
updated_at string Selectable in the Payload builder

Category translations deleted

EVENT categories/translations/delete App scope: read_products Staff permission: products:write

Fired when a category's translations are cleared for one or more fields in a locale.

Payload fields

Field Type Description
category.id integer Always present
category.parent_id integer Selectable in the Payload builder
category.name string Selectable in the Payload builder
category.slug string Selectable in the Payload builder
category.description string Selectable in the Payload builder
category.seo_title string Selectable in the Payload builder
category.seo_description string Selectable in the Payload builder
category.image_id string Selectable in the Payload builder
category.image_url string Selectable in the Payload builder
category.image_cdn_url string Selectable in the Payload builder
category.product_count integer Selectable in the Payload builder
category.template_handle string Selectable in the Payload builder
category.parent_name string Selectable in the Payload builder
category.has_children boolean Selectable in the Payload builder
category.created_at string Selectable in the Payload builder
category.updated_at string Selectable in the Payload builder
locale string Selectable in the Payload builder
translation.name string Selectable in the Payload builder
translation.slug string Selectable in the Payload builder
translation.description string Selectable in the Payload builder
translation.seo_title string Selectable in the Payload builder
translation.seo_description string Selectable in the Payload builder
updated_at string Selectable in the Payload builder

Category metafield translation updated

EVENT category_metafields/translations/update App scope: read_products Staff permission: products:write

Fired when a category metafield translation is added or updated for a locale.

Payload fields

Field Type Description
metafield.category_id integer Always present
metafield.category_name string Selectable in the Payload builder
metafield.category_slug 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 Always present
translation.value string Selectable in the Payload builder
updated_at string Selectable in the Payload builder

Category metafield translation deleted

EVENT category_metafields/translations/delete App scope: read_products Staff permission: products:write

Fired when a category metafield translation is cleared for a locale.

Payload fields

Field Type Description
metafield.category_id integer Always present
metafield.category_name string Selectable in the Payload builder
metafield.category_slug 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