Skip to content

Update Theme Customization

Set the per-locale content of a theme customization block, and/or edit its scalar fields. Pass the target locale and an options object whose shape matches the block's type; repeat the call per locale to localize the block. The scalar fields (name, sortOrder, themeCode, channelId, status) can be updated in the same call.

Prerequisites

The example uses an illustrative id. Replace it with the id of a block that exists in your store — use the adminSettingsThemes query to discover valid ids.

Operation

OperationTypePurpose
updateAdminSettingsThemeMutationUpdate a theme customization block's content and/or scalars

Input

FieldTypeRequiredPurpose
idIDyesThe resource IRI of the block to update.
localeStringnoThe locale the options apply to.
optionsIterablenoThe per-locale content; its shape depends on the block's type.
name / sortOrder / themeCode / channelId / statusnoScalar fields to update.

Quirks

  • <script> is stripped from static_content. Any <script>...</script> blocks in options.html or options.css are removed before saving — note how the example's <script>track()</script> is gone from the response.
  • Image / file fields are path strings only. For image_carousel slides and services_content icons, options accept already-uploaded storage paths; binary upload is not available — use the admin panel.

Permission: settings.themes.edit. All operations require an admin Bearer token — see Authentication.

Released under the MIT License.