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.

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 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for Policies.

  • 400 STORE_API_INVALID_POLICY_ID

    The policy translation id is not a valid UUID.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    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.

Body parameters

Name Type Description
translations required object

Field-keyed translation values. Allowed fields come from contract.translation.fields.

Example: {"title": "Privacy policy", "content": "..."}

Errors

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for Policies.

  • 400 STORE_API_INVALID_POLICY_ID

    The policy translation id is not a valid UUID.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    The policy does not exist in this store.

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.

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_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for Policies.

  • 400 STORE_API_INVALID_POLICY_ID

    The policy translation id is not a valid UUID.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    The policy does not exist in this store.

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.

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": "Privacy policy"}}]

Errors

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for Policies.

  • 400 STORE_API_INVALID_POLICY_ID

    The policy translation id is not a valid UUID.

  • 404 TRANSLATION_RESOURCE_NOT_FOUND

    The policy does not exist in this store.