Skip to main content
Version: 202601

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 stringrequired

    Theme ID this template belongs to

Bodyrequired

    typestringrequired

    Template type. One of product, collection, product_coll, page

    titlestringrequired

    Template display name

    relationsstring[]

    Bound object IDs (products / collections). Empty = create without binding

    fromstring

    Source template suffix to copy from, e.g. default

    oseidstring

    Edit session ID the creation is performed within

    selected_allint32

    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

    search_keywordstring

    Keyword the object set is filtered by; only used when selected_all = 1

    collection_idstring

    Collection the object set is filtered by; only used when selected_all = 1

Responses

OK

Schema
    codestring

    error code

    messagestring

    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

    idstring

    Template unique ID

    theme_idstring

    Theme ID this template belongs to

    store_idstring

    Store ID

    doc_idstring

    Underlying doc (template file) ID

    typestring

    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)

    titlestring

    Template display name

    suffixstring

    Template route suffix

    fromstring

    Source template suffix the template was copied from

    obj_idstring

    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

    obj_titlestring

    The first bound object's display title (the same object as obj_id)

    sourcestring

    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_atstring

    Created at

    updated_atstring

    Updated at

    iconstring

    Template icon URL

    countstring

    Number of objects bound to this template, returned as a decimal string (e.g. 12), not as a number