Skip to content

createAdminAppearanceSectionPublish

Promotes every staged edit of a theme and channel — content in all locales, on/off states and order — to what the storefront draws. Sections holding nothing staged are untouched.

Input fields

FieldTypeRequiredDescription
codeStringYesTheme whose staged edits are published.
channelIntNoChannel being published. Falls back to the current channel.

Payload fields

FieldTypeDescription
themeCodeStringTheme that was published.
channelIdIntChannel that was published.
sectionIdsIterableSections that had staged edits promoted. Empty when nothing was staged.
messageStringConfirmation text.

Use cases

  • Ship a redesign at once — stage new content, statuses and order across several sections, preview, then publish so shoppers never see a half-finished page.

Best practices

  • Publishing is per theme and channel, not per section. A half-finished section staged in the same channel goes live too — stage it off first.
  • An empty sectionIds is a success, meaning nothing was staged.
  • Publishing clears the draftshasDraft returns to "0" and the staged columns are emptied.

Permissions

Requires appearance.sections.edit.

Released under the MIT License.