Blog Post translations

Read and write localized blog post fields through the Store API.

Get blog post translation

GET read_blog + read_translations

Fetch one blog post translation.

Returns stored translated Blog Post fields for one locale, including whether the translation is out of date.

Path parameters

Name Type Description
id required uuid

Blog Post 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 Blog Posts.

  • 404 BLOG_POST_NOT_FOUND

    Blog Post does not exist in this store.

Set blog post translation

PUT write_blog + write_translations

Set one blog post translation.

Writes translated Blog Post fields for one locale. Empty values clear the matching field translation.

Path parameters

Name Type Description
id required uuid

Blog Post 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": "Launch notes", "slug": "launch-notes"}

Errors

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for Blog Posts.

  • 404 BLOG_POST_NOT_FOUND

    Blog Post does not exist in this store.

Batch get blog post translations

GET read_blog + read_translations

Fetch blog post translations in batch.

Returns translated Blog Post fields for multiple post 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 Blog Post ids.

Example: 5ff7d4ea-3250-4a4d-9d26-07f64d917d31,3a588f80-fd8c-4d46-af1b-00a1c4a7f85a

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 Blog Posts.

  • 404 BLOG_POST_NOT_FOUND

    Blog Post does not exist in this store.

Batch set blog post translations

PUT write_blog + write_translations

Set blog post translations in batch.

Writes translated Blog Post fields for multiple post 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": "Launch notes"}}]

Errors

  • 400 TRANSLATION_INVALID_LOCALE

    Locale is not enabled or is the default locale.

  • 400 TRANSLATION_INVALID_FIELD

    Field is not translatable for Blog Posts.

  • 404 BLOG_POST_NOT_FOUND

    Blog Post does not exist in this store.