Template Sections
curl --request GET \
--url https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templatePath": "<string>",
"settings": {},
"sectionType": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json"
payload = {
"templatePath": "<string>",
"settings": {},
"sectionType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({templatePath: '<string>', settings: {}, sectionType: '<string>'})
};
fetch('https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'templatePath' => '<string>',
'settings' => [
],
'sectionType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json"
payload := strings.NewReader("{\n \"templatePath\": \"<string>\",\n \"settings\": {},\n \"sectionType\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"templatePath\": \"<string>\",\n \"settings\": {},\n \"sectionType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templatePath\": \"<string>\",\n \"settings\": {},\n \"sectionType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data.sections": [
{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"location": "<string>",
"templatePath": "<string>",
"settings": {},
"blocks": {},
"block_order": [
{}
],
"isMainSection": true
}
]
}Themes
Template Sections
Manage sections within page templates
GET
/
api
/
v1
/
themes
/
{theme_id}
/
templates
/
{template}
/
sections.json
Template Sections
curl --request GET \
--url https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templatePath": "<string>",
"settings": {},
"sectionType": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json"
payload = {
"templatePath": "<string>",
"settings": {},
"sectionType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({templatePath: '<string>', settings: {}, sectionType: '<string>'})
};
fetch('https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'templatePath' => '<string>',
'settings' => [
],
'sectionType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json"
payload := strings.NewReader("{\n \"templatePath\": \"<string>\",\n \"settings\": {},\n \"sectionType\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"templatePath\": \"<string>\",\n \"settings\": {},\n \"sectionType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templatePath\": \"<string>\",\n \"settings\": {},\n \"sectionType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data.sections": [
{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"location": "<string>",
"templatePath": "<string>",
"settings": {},
"blocks": {},
"block_order": [
{}
],
"isMainSection": true
}
]
}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
curl -X GET "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/templates/index/sections.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
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
Show Section Object
Show Section Object
string
Section ID used by render/AJAX endpoints
string
Section type (matches the section file name)
string
Display name resolved from the section schema
string
Where the section lives:
header, template, or footerstring
Path of the file the section is stored in
object
Section settings
object
Section blocks keyed by block ID
array
Order of block IDs
boolean
true for main sections, which cannot be deleted{
"status": 200,
"state": "success",
"message": null,
"data": {
"success": true,
"template": "templates/index.json",
"sections": [
{
"id": "template--homepage__image-banner",
"key": "image-banner",
"type": "image-banner",
"name": "Image banner",
"location": "template",
"templatePath": "templates/index.json",
"settings": {
"heading": "Welcome to our store",
"button_label": "Shop Now",
"button_link": "/collections/all"
},
"blocks": {},
"block_order": [],
"isMainSection": false
},
{
"id": "template--homepage__featured-collection",
"key": "featured-collection",
"type": "featured-collection",
"name": "Featured collection",
"location": "template",
"templatePath": "templates/index.json",
"settings": {
"title": "Featured Products",
"products_to_show": 8
},
"blocks": {},
"block_order": [],
"isMainSection": false
}
]
},
"count": null,
"pagination": null
}
Update Section Settings
Update settings for a specific section.Request
curl -X PUT "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/sections/image-banner/settings.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"templatePath": "templates/index.json",
"settings": {
"heading": "Summer Sale",
"button_label": "Shop Collection"
}
}'
const response = await fetch('https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/sections/image-banner/settings.json', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
templatePath: 'templates/index.json',
settings: {
heading: 'Summer Sale',
button_label: 'Shop Collection'
}
})
});
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 underdata.settings.
{
"status": 200,
"state": "success",
"message": null,
"data": {
"success": true,
"message": "Settings saved successfully",
"settings": {
"heading": "Summer Sale",
"button_label": "Shop Collection",
"button_link": "/collections/all"
}
},
"count": null,
"pagination": null
}
Add Section
Add a new section to a template. The new section is appended to the end of the template’s section order.Request
curl -X POST "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/templates/index/sections.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sectionType": "rich-text"
}'
const response = await fetch('https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/templates/index/sections.json', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sectionType: 'rich-text'
})
});
Body Parameters
string
required
Section type to add (must exist in the theme’s sections folder)
Response
Returns201 with the generated section ID under data.sectionId.
{
"status": 201,
"state": "success",
"message": null,
"data": {
"success": true,
"sectionId": "rich-text",
"message": "Section 'rich-text' added successfully"
},
"count": null,
"pagination": null
}
Delete Section
Remove a section from a template.Request
curl -X DELETE "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/sections/rich-text.json?templateName=index" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Query Parameters
string
required
Template containing the section
Response
Delete returns a message envelope (nodata payload).
{
"status": 200,
"state": "success",
"message": "Section deleted successfully",
"data": null
}
Common Section Types
| Section Type | Description |
|---|---|
image-banner | Hero banner with image and text |
featured-collection | Product grid from collection |
rich-text | Text content block |
image-with-text | Side-by-side image and text |
slideshow | Image carousel |
video | Embedded video |
newsletter | Email signup form |
contact-form | Contact form |
multicolumn | Multiple columns of content |
collage | Image collage layout |
collection-list | Grid of collection cards |
Error Response
Errors return the envelope withstate: "error", a numeric HTTP status, and a
message.
{
"status": 404,
"state": "error",
"message": "Section type 'rich-text' not found",
"data": null
}
| Status | Description |
|---|---|
401 | Invalid or missing access token |
403 | App doesn’t have the required read_themes / write_themes scope |
404 | Theme, template, or section not found |
400 | Missing or invalid parameters |