跳到主要内容
版本:202601

保存高级卡片

POST 

/openapi/2026-01/themes/page-builder/blocks

基于高级卡片模板应用编辑操作(ops)并保存为新卡片,再把它放到编辑会话中的目标位置;event_type 不是 theme 时只保存卡片,不放到页面上。

请求

请求体必填

    event_typestring必填

    卡片的事件类型。传 theme 时响应会带上 typeblock;其它事件类型只保存卡片,不创建单页 block

    origin_template_idstring必填

    新卡片所基于的来源模板 ID。新卡片自己的 id 在响应里返回

    titleobject

    卡片标题,多语言 map,如 {"en-US": "...", "zh-CN": "..."}

    actionstring必填

    保存方式:savesave_asupdate

    categorystring

    分类,如 image_with_text

    second_categorystring

    二级分类,如 Carousal

    imagestring

    预览图文件名

    originstring

    基底模板来源范围:customglobal。留空则先查 custom、未命中再查 global

    opsobject[]

    保存前应用到基底模板的操作列表。至少一条;传空数组会返回 400

    oseidstring必填

    要插入的编辑会话 ID

    doc_idstring必填

    插入会话用的文档(模板文件)ID

    section_idstring必填

    要替换成新卡片的目标 section ID

    theme_idstring必填

    插入会话渲染上下文 url 用的主题 ID

    template_namestring

    插入会话用的模板名;默认取文件 location 去掉 .liquid

    localestring

    插入会话渲染语言;默认 en_US

响应

OK

数据结构
    codestring

    错误码

    messagestring

    错误信息

    data object
    idstring

    创建/更新的块 ID

    series_idstring

    系列 ID

    show_templatesint32

    保存后该系列的展示模板数

    typestring

    保存后卡片的完整 block type,形如 shoplazza://apps/page-builder/blocks/custom-{id}/{hash}。把卡片落位到页面时用它作为卡片的 type

    blockobject

    用于作为新 section 插入的 single-block 内容(name/type/settings/source)