Attribute and attribute option translations

Read and write localized attribute fields and localized attribute option fields through the Store API.

Get attribute translation

GET read_products + read_translations

Fetch one attribute translation.

Returns stored translated attribute fields for one locale, including whether the translation is out of date. Attribute translations cover name, slug, and description; option labels/values use the Attribute Option translation endpoints.

Path parameters

Name Type Description
id required integer

Attribute 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_ATTRIBUTE_ID

    Attribute id must be an integer.

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attributes.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute does not exist in this store.

Set attribute translation

PUT write_products + write_translations

Set one attribute translation.

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

Path parameters

Name Type Description
id required integer

Attribute id.

Example: 7
locale required string

Enabled non-default store locale.

Example: fr

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
translations required object

Field-keyed translation values. Allowed fields: name, slug, description.

Example: {"name": "Couleur", "slug": "couleur", "description": "Choix de couleur."}

Errors

  • 400 STORE_API_INVALID_ATTRIBUTE_ID

    Attribute id must be an integer.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or does not match the expected shape.

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attributes.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute does not exist in this store.

Batch get attribute translations

GET read_products + read_translations

Fetch attribute translations in batch.

Returns translated attribute fields for multiple attribute ids in one locale.

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 attribute ids.

Example: 7,8,9

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attributes.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute does not exist in this store.

Batch set attribute translations

PUT write_products + write_translations

Set attribute translations in batch.

Writes translated attribute fields for multiple attribute 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.

Body parameters

Name Type Description
translations required array<object>

Rows with id and fields. Allowed fields: name, slug, description.

Example: [{"id": 7, "fields": {"name": "Couleur"}}]

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or does not match the expected shape.

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attributes.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute does not exist in this store.

Get attribute option translation

GET read_products + read_translations

Fetch one attribute option translation.

Returns stored translated option fields for one locale, including whether the translation is out of date. Attribute option translations cover label and value.

Path parameters

Name Type Description
id required integer

Attribute option 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_ATTRIBUTE_ID

    Attribute option id must be an integer.

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attribute options.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute option does not exist in this store.

Set attribute option translation

PUT write_products + write_translations

Set one attribute option translation.

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

Path parameters

Name Type Description
id required integer

Attribute option id.

Example: 7
locale required string

Enabled non-default store locale.

Example: fr

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
translations required object

Field-keyed translation values. Allowed fields: label, value.

Example: {"label": "Rouge", "value": "rouge"}

Errors

  • 400 STORE_API_INVALID_ATTRIBUTE_ID

    Attribute option id must be an integer.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or does not match the expected shape.

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attribute options.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute option does not exist in this store.

Batch get attribute option translations

GET read_products + read_translations

Fetch attribute option translations in batch.

Returns translated option fields for multiple option ids in one locale.

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 attribute option ids.

Example: 41,42,43

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attribute options.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute option does not exist in this store.

Batch set attribute option translations

PUT write_products + write_translations

Set attribute option translations in batch.

Writes translated option fields for multiple option 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.

Body parameters

Name Type Description
translations required array<object>

Rows with id and fields. Allowed fields: label, value.

Example: [{"id": 41, "fields": {"label": "Rouge", "value": "rouge"}}]

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or does not match the expected shape.

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for attribute options.

  • 404 ATTRIBUTE_NOT_FOUND

    Attribute option does not exist in this store.