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.
Theme Assets
Manage files within a theme including templates, sections, snippets, and static assets.
List Assets
Returns a list of all asset files in a theme.
Request
curl -X GET "https://api.launchmystore.io/api/v1/themes/theme_abc123/assets.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Parameters
Filter assets by key prefix (e.g., sections/, assets/)
Response
{
"success": true,
"data": {
"items": [
{
"key": "layout/theme.liquid",
"public_url": null,
"content_type": "text/x-liquid",
"size": 4523,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-03-15T14:30:00Z"
},
{
"key": "sections/header.liquid",
"public_url": null,
"content_type": "text/x-liquid",
"size": 8192,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-03-10T09:00:00Z"
},
{
"key": "assets/theme.css",
"public_url": "https://cdn.launchmystore.io/themes/theme_abc123/assets/theme.css",
"content_type": "text/css",
"size": 45678,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-03-12T11:30:00Z"
}
]
}
}
Get Asset
Retrieve a single asset file including its content.
Request
curl -X GET "https://api.launchmystore.io/api/v1/themes/theme_abc123/assets.json?key=sections/header.liquid" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Parameters
The asset key/path (e.g., sections/header.liquid, assets/theme.css)
Response
{
"success": true,
"data": {
"key": "sections/header.liquid",
"value": "{% comment %}Header Section{% endcomment %}\n<header class=\"header\">\n ...\n</header>\n\n{% schema %}\n{\n \"name\": \"Header\",\n \"settings\": [...]\n}\n{% endschema %}",
"content_type": "text/x-liquid",
"size": 8192,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-03-10T09:00:00Z"
}
}
Create/Update Asset
Create a new asset or update an existing one.
Request
curl -X PUT "https://api.launchmystore.io/api/v1/themes/theme_abc123/assets.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"key": "snippets/custom-banner.liquid",
"value": "<div class=\"custom-banner\">\n {{ section.settings.text }}\n</div>"
}'
Body Parameters
Asset path (e.g., snippets/custom-banner.liquid, assets/custom.css)
Asset content (for text files). Required unless using attachment.
Base64-encoded file content (for binary files like images). Required unless using value.
Response
{
"success": true,
"data": {
"key": "snippets/custom-banner.liquid",
"value": "<div class=\"custom-banner\">\n {{ section.settings.text }}\n</div>",
"content_type": "text/x-liquid",
"size": 67,
"created_at": "2024-03-20T10:00:00Z",
"updated_at": "2024-03-20T10:00:00Z"
}
}
Delete Asset
Delete an asset file from the theme.
Request
curl -X DELETE "https://api.launchmystore.io/api/v1/themes/theme_abc123/assets.json?key=snippets/custom-banner.liquid" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Parameters
The asset key/path to delete
Response
{
"success": true,
"data": {
"key": "snippets/custom-banner.liquid",
"deleted": true
}
}
Asset Paths
Common asset paths:
| Path Pattern | Description |
|---|
layout/*.liquid | Layout templates |
templates/*.json | Page templates |
sections/*.liquid | Section files |
snippets/*.liquid | Snippet files |
assets/* | Static files (CSS, JS, images) |
config/settings_schema.json | Theme settings schema |
config/settings_data.json | Theme settings values |
locales/*.json | Translation files |
Error Codes
| Code | Description |
|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have write_themes scope |
NOT_FOUND | Theme or asset does not exist |
VALIDATION_ERROR | Invalid asset key or content |
PROTECTED_ASSET | Cannot modify protected system file |