Skip to main content
GET
Template Sections

Template Sections

Lists the sections (modular content blocks) of a page template with their settings. Requires the read_themes scope. Uses the standard response envelope (status, state, message, data).

Request

Path Parameters

string
required
The theme ID
string
required
Template name: index, product, collection, page, cart, an alternate template such as product.alternate, a section group such as header-group / footer-group, or a URL-encoded path such as customers%2Faccount. The .json suffix is optional.

Response

data.sections is an array of section objects, in render order. Each object includes the section’s settings, blocks and block order, plus its location. Besides the template’s own sections, the list includes the sections of the theme’s section groups: the active header and footer groups, and any other group (for example an aside or overlay group), whose location is the group’s type.
array
Array of section objects

Changing sections

Common Section Types

Error Response

Errors return the envelope with state: "error", a numeric HTTP status, and a message.