Skip to content

Publish ​

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.

Endpoint ​

MethodPathPurpose
POST/api/admin/appearance/themes/{code}/sections/publishPublish staged section edits

Path parameters ​

ParameterDescription
codeTheme whose staged edits are published.

Query parameters ​

ParameterDescription
channelChannel being published. Falls back to the current channel.

Response fields ​

FieldTypeDescription
themeCodestringTheme that was published.
channelIdintegerChannel that was published.
sectionIdsarraySections that had staged edits promoted. Empty when nothing was staged.
messagestringConfirmation text.

Use cases ​

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

Best practices ​

  • Publishing is per theme and channel, not per section. Every staged edit for that pair goes live together, so a half-finished section staged in the same channel goes live too — stage it off before publishing.
  • An empty sectionIds is a success, not an error. It means nothing was staged for that theme and channel.
  • Publishing clears the drafts. hasDraft returns to false and draftOptions, draftStatus and draftSortOrder are emptied.

Errors ​

StatusWhen
404Unknown theme code.

Permissions ​

Requires appearance.sections.edit.

Released under the MIT License.