# Attribute and attribute option translations

Read and write attribute and option translations through the Store API.

Translate an attribute's `name` and `description`, or an option's `label`, for an enabled non-default locale. Reads return stored translations only; an existing resource with no translations returns an empty `fields` object. Batch reads return a `resources` entry for each requested ID; batch writes save each row on its own and return one result per row.

An attribute's `slug` and an option's `value` are not translated: links and filter keys use them to identify the attribute and option, so they stay the same in every language. Product pages, product cards, the cart and channel feeds show translated attribute names and option labels, and variant titles built from options use the translated labels. Use the Attributes endpoints to read source values. Translation reads require `read_products` and `read_translations`; writes require `write_products` and `write_translations`.

## Get attribute translation

`GET /api/2025-01/attributes/{id}/translations/{locale}`

Returns stored translated attribute fields for one locale, including whether the translation is out of date. Attribute translations cover `name` and `description`; option labels use the Attribute Option translation endpoints. 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.

Scope: `read_products + read_translations`

```curl
curl 'https://api-store.tringify.com/api/2025-01/attributes/7/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "fields": {
      "description": {
        "is_outdated": false,
        "value": "Choix de couleur.",
        "word_count": 3
      },
      "name": {
        "is_outdated": false,
        "value": "Couleur",
        "word_count": 1
      }
    }
  },
  "success": true
}
```

## Set attribute translation

`PUT /api/2025-01/attributes/{id}/translations/{locale}`

Writes translated attribute fields for one locale. Empty values clear the matching field translation. A translated attribute name must be unique, ignoring case, among the attribute names shown in that language: another attribute's translation there, or its source name where it has none. Only a changed name is checked, so a translation saved before this rule that equals another attribute's name keeps saving unchanged. 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.

Scope: `write_products + write_translations`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/attributes/7/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": {
    "description": "Choix de couleur.",
    "name": "Couleur"
  }
}'
```

Response:

```json
{
  "success": true,
  "code": "TRANSLATION_SAVED",
  "message": "Translation saved."
}
```

## Batch get attribute translations

`GET /api/2025-01/attributes/translations/{locale}`

Returns one `resources` entry per requested attribute id. An existing attribute without stored translations has an empty field map; an unknown id fails the request. 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.

Scope: `read_products + read_translations`

```curl
curl 'https://api-store.tringify.com/api/2025-01/attributes/translations/fr?ids=7,8,9' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "resources": {
      "attribute:7": {
        "name": {
          "is_outdated": false,
          "value": "Couleur",
          "word_count": 1
        }
      },
      "attribute:8": {},
      "attribute:9": {}
    }
  },
  "success": true
}
```

## Batch set attribute translations

`PUT /api/2025-01/attributes/translations`

Each row is one attribute 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 attribute in one locale) and at most one row per attribute 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 translated attribute name must be unique, ignoring case, among the attribute names shown in that language: another attribute's translation there, or its source name where it has none. Only a changed name is checked, so a translation saved before this rule that equals another attribute's name keeps saving unchanged. Of two rows of one call that would share a value in one language, the earlier row keeps it and the later row fails with the duplicate code and `details.existing_id`, the earlier row's id. Rows are saved independently, each checked against the values stored when it is saved, so two rows that swap values (one row takes the value another row's resource holds, and that row takes a different one) fail: the row that takes a held value is refused with the duplicate code. To swap them, import a translation CSV with both rows (`POST /imports`, type `translations`): an import checks consecutive rows together, so a swap is accepted when its two rows sit next to each other in the file. 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.

Scope: `write_products + write_translations`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/attributes/translations' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": [
    {
      "fields": {
        "name": "Couleur"
      },
      "id": 7,
      "locale": "fr"
    },
    {
      "fields": {
        "name": "Farbe"
      },
      "id": 7,
      "locale": "de"
    },
    {
      "fields": {
        "name": "Cor"
      },
      "id": 7,
      "locale": "pt-BR"
    }
  ]
}'
```

Response:

```json
{
  "code": "TRANSLATIONS_PARTIALLY_SAVED",
  "data": {
    "results": [
      {
        "id": 7,
        "locale": "fr",
        "status": "saved"
      },
      {
        "id": 7,
        "locale": "de",
        "status": "saved"
      },
      {
        "error": {
          "code": "TRANSLATION_LOCALE_NOT_ENABLED",
          "message": "Locale pt-BR is not enabled for this store."
        },
        "id": 7,
        "locale": "pt-BR",
        "status": "failed"
      }
    ],
    "totals": {
      "failed": 1,
      "rows": 3,
      "saved": 2
    }
  },
  "message": "2 saved, 1 failed. Locale pt-BR is not enabled for this store.",
  "success": true
}
```

## Get attribute option translation

`GET /api/2025-01/attribute-options/{id}/translations/{locale}`

Returns stored translated option fields for one locale, including whether the translation is out of date. Attribute option translations cover `label`; the option value is the same in every 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.

Scope: `read_products + read_translations`

```curl
curl 'https://api-store.tringify.com/api/2025-01/attribute-options/41/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "fields": {
      "label": {
        "is_outdated": false,
        "value": "Rouge",
        "word_count": 1
      }
    }
  },
  "success": true
}
```

## Set attribute option translation

`PUT /api/2025-01/attribute-options/{id}/translations/{locale}`

Writes translated option fields for one locale. Empty values clear the matching field translation. 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.

Scope: `write_products + write_translations`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/attribute-options/41/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": {
    "label": "Rouge"
  }
}'
```

Response:

```json
{
  "success": true,
  "code": "TRANSLATION_SAVED",
  "message": "Translation saved."
}
```

## Batch get attribute option translations

`GET /api/2025-01/attribute-options/translations/{locale}`

Returns one `resources` entry per requested option id. An existing option without stored translations has an empty field map; an unknown id fails the request. 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.

Scope: `read_products + read_translations`

```curl
curl 'https://api-store.tringify.com/api/2025-01/attribute-options/translations/fr?ids=41,42,43' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "resources": {
      "attribute_option:41": {
        "label": {
          "is_outdated": false,
          "value": "Rouge",
          "word_count": 1
        }
      },
      "attribute_option:42": {},
      "attribute_option:43": {}
    }
  },
  "success": true
}
```

## Batch set attribute option translations

`PUT /api/2025-01/attribute-options/translations`

Each row is one attribute option 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 attribute option in one locale) and at most one row per attribute option 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.

Scope: `write_products + write_translations`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/attribute-options/translations' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": [
    {
      "fields": {
        "label": "Rouge"
      },
      "id": 41,
      "locale": "fr"
    },
    {
      "fields": {
        "label": "Rot"
      },
      "id": 41,
      "locale": "de"
    },
    {
      "fields": {
        "label": "Vermelho"
      },
      "id": 41,
      "locale": "pt-BR"
    }
  ]
}'
```

Response:

```json
{
  "code": "TRANSLATIONS_PARTIALLY_SAVED",
  "data": {
    "results": [
      {
        "id": 41,
        "locale": "fr",
        "status": "saved"
      },
      {
        "id": 41,
        "locale": "de",
        "status": "saved"
      },
      {
        "error": {
          "code": "TRANSLATION_LOCALE_NOT_ENABLED",
          "message": "Locale pt-BR is not enabled for this store."
        },
        "id": 41,
        "locale": "pt-BR",
        "status": "failed"
      }
    ],
    "totals": {
      "failed": 1,
      "rows": 3,
      "saved": 2
    }
  },
  "message": "2 saved, 1 failed. Locale pt-BR is not enabled for this store.",
  "success": true
}
```

## Webhook events

Subscribe to these events when your integration mirrors localized attributes. Update and clear events identify the locale and changed fields. One write can emit both events when it sets some fields and clears others. No event announces that translations became outdated. A translation is outdated (`is_outdated: true`) once its source field changes, and the attribute update event reports that change, so after an update that changes a translated field, treat that field's stored translations in every locale as outdated until they are updated or cleared.

## Attribute translations updated

Event: `attributes/translations/update` · App scope: `read_products, read_translations` · Staff permission: `products:write`

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

```json
{
  "attribute": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Product color.",
    "id": 1,
    "in_use": true,
    "name": "Color",
    "options": [
      {
        "attribute_id": 1,
        "color": "#D64545",
        "created_at": "2026-06-09T12:00:00-04:00",
        "file_cdn_url": null,
        "file_id": null,
        "file_url": null,
        "id": 1,
        "label": "Red",
        "sort_order": 0,
        "store_seq_id": 1,
        "value": "red"
      }
    ],
    "slug": "color",
    "sort_order": 0,
    "store_seq_id": 1,
    "sub_type": "swatch",
    "updated_at": "2026-06-09T12:00:00-04:00",
    "variant_usage_count": 12
  },
  "locale": "fr",
  "translation": {
    "description": "Choix de couleur.",
    "name": "Couleur"
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

## Attribute translations deleted

Event: `attributes/translations/delete` · App scope: `read_products, read_translations` · Staff permission: `products:write`

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

```json
{
  "attribute": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Product color.",
    "id": 1,
    "in_use": true,
    "name": "Color",
    "options": [
      {
        "attribute_id": 1,
        "color": "#D64545",
        "created_at": "2026-06-09T12:00:00-04:00",
        "file_cdn_url": null,
        "file_id": null,
        "file_url": null,
        "id": 1,
        "label": "Red",
        "sort_order": 0,
        "store_seq_id": 1,
        "value": "red"
      }
    ],
    "slug": "color",
    "sort_order": 0,
    "store_seq_id": 1,
    "sub_type": "swatch",
    "updated_at": "2026-06-09T12:00:00-04:00",
    "variant_usage_count": 12
  },
  "locale": "fr",
  "translation": {
    "description": "",
    "name": ""
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

## Attribute option translations updated

Event: `attribute_options/translations/update` · App scope: `read_products, read_translations` · Staff permission: `products:write`

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

```json
{
  "locale": "fr",
  "option": {
    "attribute_id": 1,
    "color": "#D64545",
    "created_at": "2026-06-09T12:00:00-04:00",
    "file_cdn_url": null,
    "file_id": null,
    "file_url": null,
    "id": 1,
    "label": "Red",
    "sort_order": 0,
    "store_seq_id": 1,
    "value": "red"
  },
  "translation": {
    "label": "Rouge"
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

## Attribute option translations deleted

Event: `attribute_options/translations/delete` · App scope: `read_products, read_translations` · Staff permission: `products:write`

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

```json
{
  "locale": "fr",
  "option": {
    "attribute_id": 1,
    "color": "#D64545",
    "created_at": "2026-06-09T12:00:00-04:00",
    "file_cdn_url": null,
    "file_id": null,
    "file_url": null,
    "id": 1,
    "label": "Red",
    "sort_order": 0,
    "store_seq_id": 1,
    "value": "red"
  },
  "translation": {
    "label": ""
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

