Skip to main content
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>",
  "position": 123
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Template Sections

Manage sections (modular content blocks) within page templates.

Get Template Sections

List all sections in a template with their settings.

Request

curl -X GET "https://api.launchmystore.io/api/v1/themes/theme_abc123/templates/index/sections.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Path Parameters

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

Response

{
  "success": true,
  "data": {
    "sections": {
      "image-banner": {
        "type": "image-banner",
        "settings": {
          "image": "theme://shop_images/hero.jpg",
          "heading": "Welcome to our store",
          "button_label": "Shop Now",
          "button_link": "/collections/all"
        },
        "blocks": {}
      },
      "featured-collection": {
        "type": "featured-collection",
        "settings": {
          "title": "Featured Products",
          "collection": "featured",
          "products_to_show": 8
        },
        "blocks": {}
      }
    },
    "order": ["image-banner", "featured-collection"]
  }
}

Update Section Settings

Update settings for a specific section.

Request

curl -X PUT "https://api.launchmystore.io/api/v1/themes/theme_abc123/sections/image-banner/settings.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "templatePath": "index",
    "settings": {
      "heading": "Summer Sale",
      "button_label": "Shop Collection"
    }
  }'

Body Parameters

templatePath
string
required
Template containing the section (e.g., index, product)
settings
object
required
Section settings to update

Response

{
  "success": true,
  "data": {
    "sectionId": "image-banner",
    "settings": {
      "image": "theme://shop_images/hero.jpg",
      "heading": "Summer Sale",
      "button_label": "Shop Collection",
      "button_link": "/collections/all"
    }
  }
}

Add Section

Add a new section to a template.

Request

curl -X POST "https://api.launchmystore.io/api/v1/themes/theme_abc123/templates/index/sections.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sectionType": "rich-text",
    "position": 2
  }'

Body Parameters

sectionType
string
required
Section type to add (must exist in theme’s sections folder)
position
integer
Position in template order (0-indexed). Defaults to end.

Response

{
  "success": true,
  "data": {
    "sectionId": "rich-text-abc123",
    "type": "rich-text",
    "settings": {
      "heading": "",
      "text": ""
    },
    "blocks": {}
  }
}

Delete Section

Remove a section from a template.

Request

curl -X DELETE "https://api.launchmystore.io/api/v1/themes/theme_abc123/sections/rich-text-abc123.json?templateName=index" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Query Parameters

templateName
string
required
Template containing the section

Response

{
  "success": true,
  "message": "Section deleted successfully"
}

Common Section Types

Section TypeDescription
image-bannerHero banner with image and text
featured-collectionProduct grid from collection
rich-textText content block
image-with-textSide-by-side image and text
slideshowImage carousel
videoEmbedded video
newsletterEmail signup form
contact-formContact form
multicolumnMultiple columns of content
collageImage collage layout
collection-listGrid of collection cards

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_themes scope
NOT_FOUNDTheme, template, or section not found
INVALID_SECTION_TYPESection type doesn’t exist in theme
MAX_SECTIONS_EXCEEDEDTemplate has reached section limit