Policy translations

Read and write localized policy fields through the Store API.

Get policy translation

GET read_pages + read_translations

Fetch one policy translation.

Returns stored translated Policy fields for one locale, including whether the translation is out of date. Translation routes use the policy UUID returned by list/get, while policy CRUD routes use the fixed policy type. 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 uuid

Policy id.

Example: 5ff7d4ea-3250-4a4d-9d26-07f64d917d31
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_POLICY_ID

    The policy translation id is not a valid UUID.

  • 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_RESOURCE_ID_NOT_IN_STORE

    The policy does not exist in this store.

Set policy translation

PUT write_pages + write_translations

Set one policy translation.

Writes translated Policy fields for one locale. Empty values clear the matching field translation. The {id} value is the policy UUID returned by list/get, not the policy type.

Path parameters

Name Type Description
id required uuid

Policy id.

Example: 5ff7d4ea-3250-4a4d-9d26-07f64d917d31
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: {"title": "Politique de confidentialité", "content": "<p>Comment nous traitons vos données.</p>"}

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 STORE_API_INVALID_POLICY_ID

    The policy translation id is not a valid UUID.

  • 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_RESOURCE_ID_NOT_IN_STORE

    The policy does not exist in this store.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    Field is not translatable for Policies.

  • 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_NO_SOURCE_TEXT

    A non-empty translation requires source text for that field.

  • 409 POLICY_SLUG_DUPLICATE

    The translated slug conflicts with another policy.

  • 400 POLICY_SLUG_INVALID_FORMAT

    Translated slug is not valid for policy URLs.

  • 400 POLICY_TITLE_INVALID_CHARS

    The translated title contains unsupported characters.

  • 400 POLICY_TITLE_TOO_LONG

    The translated title exceeds its limit.

  • 400 POLICY_SLUG_TOO_LONG

    The translated slug exceeds its limit.

  • 400 POLICY_CONTENT_TOO_LONG

    Translated HTML exceeds its limit.

  • 400 POLICY_SEO_TITLE_TOO_LONG

    The translated SEO title exceeds its limit.

  • 400 POLICY_SEO_DESCRIPTION_TOO_LONG

    The translated SEO description exceeds its limit.

Batch get policy translations

GET read_pages + read_translations

Fetch policy translations in batch.

Returns translated Policy fields for multiple policy 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 Policy ids.

Example: 5ff7d4ea-3250-4a4d-9d26-07f64d917d31

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_RESOURCE_ID_NOT_IN_STORE

    The policy does not exist in this store.

  • 400 TRANSLATION_TOO_MANY_RESOURCES

    The request exceeds the translation batch resource cap.

  • 400 STORE_API_INVALID_POLICY_ID

    One policy id is not a valid UUID.

Batch set policy translations

PUT write_pages + write_translations

Set policy translations in batch.

Writes translated Policy fields for multiple policy 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": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31", "fields": {"title": "Politique de confidentialité"}}]

Errors

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON.

  • 400 STORE_API_INVALID_POLICY_ID

    One policy id is not a valid UUID.

  • 400 TRANSLATION_TOO_MANY_FIELDS

    The request exceeds the translation batch field cap.

  • 400 TRANSLATION_NO_WRITES_PROVIDED

    No translation writes were provided.

  • 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_RESOURCE_ID_NOT_IN_STORE

    The policy does not exist in this store.

  • 400 TRANSLATION_FIELD_NOT_TRANSLATABLE

    Field is not translatable for Policies.

  • 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_NO_SOURCE_TEXT

    A non-empty translation requires source text for that field.

  • 409 POLICY_SLUG_DUPLICATE

    The translated slug conflicts with another policy.

  • 400 POLICY_SLUG_INVALID_FORMAT

    Translated slug is not valid for policy URLs.

  • 400 POLICY_TITLE_INVALID_CHARS

    The translated title contains unsupported characters.

  • 400 POLICY_TITLE_TOO_LONG

    The translated title exceeds its limit.

  • 400 POLICY_SLUG_TOO_LONG

    The translated slug exceeds its limit.

  • 400 POLICY_CONTENT_TOO_LONG

    Translated HTML exceeds its limit.

  • 400 POLICY_SEO_TITLE_TOO_LONG

    The translated SEO title exceeds its limit.

  • 400 POLICY_SEO_DESCRIPTION_TOO_LONG

    The translated SEO description exceeds its limit.

Webhook events#

Subscribe to these events when your integration mirrors localized policies. Update and clear events identify the locale and changed fields. One write can emit both events when it sets some fields and clears others.

Policy translations updated

EVENT policies/translations/update App scope: read_pages Staff permission: pages:write

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

Payload fields

Field Type Description
policy.id string Always present
policy.type string Selectable in the Payload builder
policy.title string Selectable in the Payload builder
policy.slug string Selectable in the Payload builder
policy.content string Selectable in the Payload builder
policy.status string Selectable in the Payload builder
policy.seo_title string Selectable in the Payload builder
policy.seo_description string Selectable in the Payload builder
policy.created_at string Selectable in the Payload builder
policy.updated_at string Selectable in the Payload builder
locale string Selectable in the Payload builder
translation.title string Selectable in the Payload builder
translation.slug string Selectable in the Payload builder
translation.content 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

Policy translations deleted

EVENT policies/translations/delete App scope: read_pages Staff permission: pages:write

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

Payload fields

Field Type Description
policy.id string Always present
policy.type string Selectable in the Payload builder
policy.title string Selectable in the Payload builder
policy.slug string Selectable in the Payload builder
policy.content string Selectable in the Payload builder
policy.status string Selectable in the Payload builder
policy.seo_title string Selectable in the Payload builder
policy.seo_description string Selectable in the Payload builder
policy.created_at string Selectable in the Payload builder
policy.updated_at string Selectable in the Payload builder
locale string Selectable in the Payload builder
translation.title string Selectable in the Payload builder
translation.slug string Selectable in the Payload builder
translation.content 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