Create theme custom template
POST/openapi/2026-01/themes/:theme_id/theme-templates
Create a custom template and bind it to objects (products, collections) in one call; with empty
relations the template is created without bindings.
Request
Path Parameters
Theme ID this template belongs to
- application/json
- Body
- Example
Bodyrequired
Template type. One of product, collection, product_coll, page
Template display name
Bound object IDs (products / collections). Empty = create without binding
Source template suffix to copy from, e.g. default
Edit session ID the creation is performed within
Bind every object matching front_query_params instead of listing them in relations:
0 = no (default), 1 = yes. When 1, the object set comes from front_query_params
front_query_params object
Filter that defines the object set when selected_all = 1; ignored otherwise
Keyword the object set is filtered by; only used when selected_all = 1
Collection the object set is filtered by; only used when selected_all = 1
{
"type": "string",
"title": "string",
"relations": [
"string"
],
"from": "string",
"oseid": "string",
"selected_all": 0,
"front_query_params": {
"search_keyword": "string",
"collection_id": "string"
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
error code
error message
data object
theme_template object
The created theme template. Only id is populated — all other fields are empty; call
the template list endpoint to read the full record
Template unique ID
Theme ID this template belongs to
Store ID
Underlying doc (template file) ID
Template type: product (product detail page bound to products), collection (collection
detail page), product_coll (product detail page bound to a collection), page (custom page, legacy)
Template display name
Template route suffix
Source template suffix the template was copied from
The FIRST bound object's ID (product / collection / page id); empty when nothing is bound.
A template may be bound to many objects — see count for the total; this field never lists them all
The first bound object's display title (the same object as obj_id)
Data-operation source: which entry point wrote this record. Read-only, and not the same as from, which is the template this one was copied from
Created at
Updated at
Template icon URL
Number of objects bound to this template, returned as a decimal string (e.g. 12), not as a number
{
"code": "string",
"message": "string",
"data": {
"theme_template": {
"id": "string",
"theme_id": "string",
"store_id": "string",
"doc_id": "string",
"type": "string",
"title": "string",
"suffix": "string",
"from": "string",
"obj_id": "string",
"obj_title": "string",
"source": "string",
"created_at": "string",
"updated_at": "string",
"icon": "string",
"count": "string"
}
}
}