# Category translations

Read and write localized category fields through the Store API.

## Get category translation

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

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.

Scope: `read_products + read_translations`

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

Response:

```json
{
  "data": {
    "fields": {
      "description": {
        "is_outdated": false,
        "value": "Vêtements et mode.",
        "word_count": 3
      },
      "name": {
        "is_outdated": false,
        "value": "Vêtements",
        "word_count": 1
      }
    }
  },
  "success": true
}
```

## Set category translation

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

Writes translated Category fields for one locale. Empty values clear the matching field translation. A changed translated `slug` always redirects the old address in that language to the new one (kind `auto_slug` with that `locale`; there is no option to skip it): a first translated slug redirects the source slug in that language, and clearing it redirects the translated address back to the source slug. A translated category name must be unique among categories with the same parent in that language, like source names: the same translated name under two different parents is allowed. A translated slug must be unique among all category URLs in that language (a translated slug, or the source slug of a category without one). 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/categories/7/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": {
    "description": "Vêtements et mode.",
    "name": "Vêtements"
  }
}'
```

Response:

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

## Batch get category translations

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

Returns one `resources` entry per requested category id. A category without stored translations has an empty 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.

Scope: `read_products + read_translations`

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

Response:

```json
{
  "data": {
    "resources": {
      "category:11": {},
      "category:7": {
        "name": {
          "is_outdated": false,
          "value": "Vêtements",
          "word_count": 1
        }
      }
    }
  },
  "success": true
}
```

## Batch set category translations

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

Each row is one category 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 category in one locale) and at most one row per category 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 category name must be unique among categories with the same parent in that language, like source names: the same translated name under two different parents is allowed. A translated slug must be unique among all category URLs in that language (a translated slug, or the source slug of a category without one). 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. Translated category names under one parent are checked when each row is saved, so of two such rows one is saved and the other fails with the duplicate code. 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/categories/translations' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": [
    {
      "fields": {
        "name": "Vêtements"
      },
      "id": 7,
      "locale": "fr"
    },
    {
      "fields": {
        "name": "Bekleidung"
      },
      "id": 7,
      "locale": "de"
    },
    {
      "fields": {
        "name": "Roupas"
      },
      "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 a category metafield translation

`GET /api/2025-01/categories/{id}/metafields/{namespace}/{key}/translations/{locale}`

Resolves the definition by namespace and key, checks that it is translatable and visible to the token, then returns the stored value for the requested enabled non-default language. Reading a value translation requires both the owner read scope and read_translations. Setting or clearing it requires both the owner write scope and write_translations; an empty value does not bypass either scope. Staff permissions and hosted MCP grants likewise require owner access plus settings.languages access at the matching read/write level. 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/categories/7/metafields/details/care/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "fields": {
      "value": {
        "is_outdated": false,
        "value": "Lavage à la main",
        "word_count": 4
      }
    }
  },
  "success": true
}
```

## Set a category metafield translation

`PUT /api/2025-01/categories/{id}/metafields/{namespace}/{key}/translations/{locale}`

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. Reading a value translation requires both the owner read scope and read_translations. Setting or clearing it requires both the owner write scope and write_translations; an empty value does not bypass either scope. Staff permissions and hosted MCP grants likewise require owner access plus settings.languages access at the matching read/write level. 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.

Scope: `write_products + write_translations`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/categories/7/metafields/details/care/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "value": "Lavage à la main"
}'
```

Response:

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

## 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. No event announces that translations became outdated. A translation is outdated (`is_outdated: true`) once its source field changes, and the category 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.

## Category translations updated

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

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

```json
{
  "category": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and accessories.",
    "has_children": true,
    "id": 5,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": null,
    "parent_name": null,
    "product_count": 87,
    "seo_description": "Shop apparel.",
    "seo_title": "Apparel",
    "slug": "apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-10T09:30:00-04:00"
  },
  "locale": "fr",
  "translation": {
    "description": "Vêtements et accessoires.",
    "name": "Vêtements",
    "seo_description": "Découvrez nos vêtements.",
    "seo_title": "Vêtements",
    "slug": "vetements"
  },
  "updated_at": "2026-06-10T09:30:00-04:00"
}
```

## Category translations deleted

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

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

```json
{
  "category": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and accessories.",
    "has_children": true,
    "id": 5,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": null,
    "parent_name": null,
    "product_count": 87,
    "seo_description": "Shop apparel.",
    "seo_title": "Apparel",
    "slug": "apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-10T09:30:00-04:00"
  },
  "locale": "fr",
  "translation": {
    "description": "",
    "name": "",
    "seo_description": "",
    "seo_title": "",
    "slug": ""
  },
  "updated_at": "2026-06-10T09:30:00-04:00"
}
```

## Category metafield translation updated

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

Fired when a category metafield translation is added or updated for a locale. `metafield` identifies the metafield by its owner and definition (ids, namespace, key, name, type); it is not the full metafield or its owner. Read them from the Store API for other fields.

```json
{
  "locale": "fr",
  "metafield": {
    "app_access": "shared",
    "app_id": "d6a26466-7903-4e2f-8fd7-7c59f3c8cd9a",
    "category_id": 5,
    "category_name": "Apparel",
    "category_slug": "apparel",
    "definition_id": "6b56de32-3f8c-4a25-a4cb-2d217ad7a8aa",
    "key": "care",
    "merchant_access": "read_write",
    "name": "Care instructions",
    "namespace": "app:catalog-sync.details",
    "type": "string"
  },
  "translation": {
    "value": "Lavage à la main"
  },
  "updated_at": "2026-06-10T09:30:00-04:00"
}
```

## Category metafield translation deleted

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

Fired when a category metafield translation is cleared for a locale. `metafield` identifies the metafield by its owner and definition (ids, namespace, key, name, type); it is not the full metafield or its owner. Read them from the Store API for other fields.

```json
{
  "locale": "fr",
  "metafield": {
    "app_access": "shared",
    "app_id": "d6a26466-7903-4e2f-8fd7-7c59f3c8cd9a",
    "category_id": 5,
    "category_name": "Apparel",
    "category_slug": "apparel",
    "definition_id": "6b56de32-3f8c-4a25-a4cb-2d217ad7a8aa",
    "key": "care",
    "merchant_access": "read_write",
    "name": "Care instructions",
    "namespace": "app:catalog-sync.details",
    "type": "string"
  },
  "translation": {
    "value": ""
  },
  "updated_at": "2026-06-10T09:30:00-04:00"
}
```

