Skip to content

Update Section ​

Writes a section's published values — what the storefront draws immediately. To hold a change back until publishing, use Stage edits instead.

Endpoint ​

MethodPathPurpose
PUT/api/admin/appearance/sections/{id}Update a section

Path parameters ​

ParameterDescription
idSection ID.

Query parameters ​

ParameterDescription
localeLocale the options belong to. Must be one the channel runs; otherwise the app locale, then the channel's first locale.

Request body ​

FieldTypeRequiredDescription
namestringYesSection name.
typestringYesOne of the six section types.
sortOrderintegerYesPublished position.
channelIdintegerYesChannel the section belongs to.
themeCodestringYesTheme the section belongs to.
statusbooleanNoPublished on/off. Keeps the current value when omitted.
optionsobjectNoPublished content for the locale. Keeps the current content when omitted.

Response fields ​

The updated section, same shape as Get section, with message set.

Use cases ​

  • Rename or reposition without touching content — send the five required fields and leave options out.
  • Publish content straight away — send options for a section whose copy is already final, skipping the draft cycle.

Best practices ​

  • Send every required field, including the ones you are not changing. The body is a full form: name, type, sortOrder, channelId and themeCode are validated on every call, and a missing one is a 422 rather than a no-op.
  • options writes one locale. Repeat the call per locale with a different locale to fill the rest.
  • Switching a section to footer_links follows the same one-per-channel rule as creating one, so a channel that already has a footer rejects the change with 422.

Errors ​

StatusWhen
404No section with this ID.
422A required field missing, an unknown type, an unknown channelId, or a second footer_links section.

Permissions ​

Requires appearance.sections.edit.

Released under the MIT License.