Skip to main content
GET
Template Sections

Template Sections

Manage sections (modular content blocks) within page templates. All endpoints use the standard response envelope (status, state, message, data).

Get Template Sections

List all sections in a template with their settings.

Request

Path Parameters

string
required
The theme ID
string
required
Template name (e.g., index, product, collection, page, cart)

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 (header, template, or footer).
array
Array of section objects

Update Section Settings

Update settings for a specific section.

Request

Body Parameters

string
required
Path of the template/file containing the section (e.g., templates/index.json)
object
required
Section settings to save

Response

The saved settings are returned under data.settings.

Add Section

Add a new section to a template. The new section is appended to the end of the template’s section order.

Request

Body Parameters

string
required
Section type to add (must exist in the theme’s sections folder)

Response

Returns 201 with the generated section ID under data.sectionId.

Delete Section

Remove a section from a template.

Request

Query Parameters

string
required
Template containing the section

Response

Delete returns a message envelope (no data payload).

Common Section Types

Error Response

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