# Collection translations

Read and write localized collection fields through the Store API.

## Get collection translation

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

Returns the stored translated Collection fields for one locale, each with `value`, `is_outdated` and `word_count`. 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/collections/5ff7d4ea-3250-4a4d-9d26-07f64d917d31/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "data": {
    "fields": {
      "name": {
        "value": "Vente d’été",
        "is_outdated": false,
        "word_count": 3
      },
      "slug": {
        "value": "vente-ete",
        "is_outdated": false,
        "word_count": 1
      }
    }
  }
}
```

## Set collection translation

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

Writes translated Collection fields for one locale. Empty values clear the matching field translation. A translated slug must be unique among the URLs of this type in that language (a translated slug, or the source slug where there is none). 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/collections/5ff7d4ea-3250-4a4d-9d26-07f64d917d31/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": {
    "description": "Produits saisonniers pour l'été.",
    "name": "Vente d'été"
  }
}'
```

Response:

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

## Batch get collection translations

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

Returns a `resources` entry keyed by `collection:{id}` for each requested collection. A collection 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/collections/translations/fr?ids=5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "data": {
    "resources": {
      "collection:5ff7d4ea-3250-4a4d-9d26-07f64d917d31": {
        "name": {
          "value": "Vente d’été",
          "is_outdated": false,
          "word_count": 3
        }
      },
      "collection:af720cef-7f1b-40f4-a5f8-8a55ea5b0d84": {}
    }
  }
}
```

## Batch set collection translations

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

Each row is one collection 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 collection in one locale) and at most one row per collection 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 slug must be unique among the URLs of this type in that language (a translated slug, or the source slug where there is none). 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/collections/translations' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "translations": [
    {
      "fields": {
        "name": "Vente d'été"
      },
      "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
      "locale": "fr"
    },
    {
      "fields": {
        "name": "Sommerschlussverkauf"
      },
      "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
      "locale": "de"
    },
    {
      "fields": {
        "name": "Liquidação de verão"
      },
      "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
      "locale": "pt-BR"
    }
  ]
}'
```

Response:

```json
{
  "code": "TRANSLATIONS_PARTIALLY_SAVED",
  "data": {
    "results": [
      {
        "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "locale": "fr",
        "status": "saved"
      },
      {
        "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "locale": "de",
        "status": "saved"
      },
      {
        "error": {
          "code": "TRANSLATION_LOCALE_NOT_ENABLED",
          "message": "Locale pt-BR is not enabled for this store."
        },
        "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "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 collection metafield translation

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

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. 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/collections/5ff7d4ea-3250-4a4d-9d26-07f64d917d31/metafields/details/season/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{"success":true,"data":{"fields":{"value":{"value":"Été","is_outdated":false,"word_count":1}}}}
```

## Set a collection metafield translation

`PUT /api/2025-01/collections/{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/collections/5ff7d4ea-3250-4a4d-9d26-07f64d917d31/metafields/details/season/translations/fr' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "value": "Été"
}'
```

Response:

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

## Webhook events

Subscribe to these events when your integration mirrors localized collections. 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 collection 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.

## Collection translations updated

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

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

```json
{
  "collection": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "default_sort": "featured",
    "description": "Seasonal products for summer campaigns.",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "image_cdn_url": "https://assets.tringify.com/74e634ea-84ec-43b8-b66b-986214c2c5a3/upload/8f2a1c2b-9d4e-4f74-a6cf-1d58f6f7c201.jpg",
    "image_id": "8f2a1c2b-9d4e-4f74-a6cf-1d58f6f7c201",
    "image_url": "https://store.example.com/uploads/8f2a1c2b-9d4e-4f74-a6cf-1d58f6f7c201",
    "is_active": true,
    "match_type": "all",
    "materialized_at": "2026-06-09T12:00:00-04:00",
    "name": "Summer Sale",
    "pinned_product_ids": [
      42,
      17
    ],
    "product_count": 42,
    "rules": [
      {
        "collection_id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "created_at": "2026-06-09T12:00:00-04:00",
        "currency": null,
        "field": "tag",
        "id": "8d8c22a3-7cf8-4d2c-a54b-45fa63693e83",
        "include_subcategories": false,
        "operator": "equals",
        "value": "7",
        "value_label": "Summer",
        "window_days": null
      }
    ],
    "seo_description": "Shop products in the Summer Sale collection.",
    "seo_title": "Summer Sale",
    "slug": "summer-sale",
    "template_handle": "default_collection",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "locale": "fr",
  "translation": {
    "description": "Seasonal products for summer campaigns.",
    "name": "Summer Sale",
    "seo_description": "Shop products in the Summer Sale collection.",
    "seo_title": "Summer Sale",
    "slug": "summer-sale"
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

## Collection translations deleted

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

Fired when a collection's translations are cleared for one or more fields in a locale. Deleting a collection also sends one event per locale it had translations in, with each translated field empty.

```json
{
  "collection": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "default_sort": "featured",
    "description": "Seasonal products for summer campaigns.",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "image_cdn_url": "https://assets.tringify.com/74e634ea-84ec-43b8-b66b-986214c2c5a3/upload/8f2a1c2b-9d4e-4f74-a6cf-1d58f6f7c201.jpg",
    "image_id": "8f2a1c2b-9d4e-4f74-a6cf-1d58f6f7c201",
    "image_url": "https://store.example.com/uploads/8f2a1c2b-9d4e-4f74-a6cf-1d58f6f7c201",
    "is_active": true,
    "match_type": "all",
    "materialized_at": "2026-06-09T12:00:00-04:00",
    "name": "Summer Sale",
    "pinned_product_ids": [
      42,
      17
    ],
    "product_count": 42,
    "rules": [
      {
        "collection_id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "created_at": "2026-06-09T12:00:00-04:00",
        "currency": null,
        "field": "tag",
        "id": "8d8c22a3-7cf8-4d2c-a54b-45fa63693e83",
        "include_subcategories": false,
        "operator": "equals",
        "value": "7",
        "value_label": "Summer",
        "window_days": null
      }
    ],
    "seo_description": "Shop products in the Summer Sale collection.",
    "seo_title": "Summer Sale",
    "slug": "summer-sale",
    "template_handle": "default_collection",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "locale": "fr",
  "translation": {
    "description": "Seasonal products for summer campaigns.",
    "name": "Summer Sale",
    "seo_description": "Shop products in the Summer Sale collection.",
    "seo_title": "Summer Sale",
    "slug": "summer-sale"
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

## Collection metafield translations updated

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

Fired when a collection metafield's 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": null,
    "collection_id": "a68166a1-9591-471d-8530-dd3b84411530",
    "collection_name": "Example",
    "collection_slug": "summer-dress",
    "definition_id": "53dd03be-9356-492a-8b24-ea3cd78feb24",
    "key": "care_guide",
    "merchant_access": "read_write",
    "name": "Example",
    "namespace": "custom",
    "type": "string"
  },
  "translation": {
    "value": null
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

## Collection metafield translations deleted

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

Fired when a collection metafield's translation is cleared for a locale, including when its collection is deleted. `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": null,
    "collection_id": "a68166a1-9591-471d-8530-dd3b84411530",
    "collection_name": "Example",
    "collection_slug": "summer-dress",
    "definition_id": "53dd03be-9356-492a-8b24-ea3cd78feb24",
    "key": "care_guide",
    "merchant_access": "read_write",
    "name": "Example",
    "namespace": "custom",
    "type": "string"
  },
  "translation": {
    "value": null
  },
  "updated_at": "2026-06-09T12:00:00-04:00"
}
```

