版本:202601
保存高级卡片
POST/openapi/2026-01/themes/page-builder/blocks
基于高级卡片模板应用编辑操作(ops)并保存为新卡片,再把它放到编辑会话中的目标位置;event_type 不是 theme 时只保存卡片,不放到页面上。
请求
- application/json
- 请求体
- 示例
请求体必填
event_typestring必填
卡片的事件类型。传 theme 时响应会带上 type 与 block;其它事件类型只保存卡片,不创建单页 block
origin_template_idstring必填
新卡片所基于的来源模板 ID。新卡片自己的 id 在响应里返回
titleobject
卡片标题,多语言 map,如 {"en-US": "...", "zh-CN": "..."}
actionstring必填
保存方式:save、save_as、update
categorystring
分类,如 image_with_text
second_categorystring
二级分类,如 Carousal
imagestring
预览图文件名
originstring
基底模板来源范围:custom 或 global。留空则先查 custom、未命中再查 global
opsobject[]
保存前应用到基底模板的操作列表。至少一条;传空数组会返回 400
oseidstring必填
要插入的编辑会话 ID
doc_idstring必填
插入会话用的文档(模板文件)ID
section_idstring必填
要替换成新卡片的目标 section ID
theme_idstring必填
插入会话渲染上下文 url 用的主题 ID
template_namestring
插入会话用的模板名;默认取文件 location 去掉 .liquid
localestring
插入会话渲染语言;默认 en_US
json
{
"event_type": "string",
"origin_template_id": "string",
"title": {},
"action": "string",
"category": "string",
"second_category": "string",
"image": "string",
"origin": "string",
"ops": [
{}
],
"oseid": "string",
"doc_id": "string",
"section_id": "string",
"theme_id": "string",
"template_name": "string",
"locale": "string"
}
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
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)
json
{
"code": "string",
"message": "string",
"data": {
"id": "string",
"series_id": "string",
"show_templates": 0,
"type": "string",
"block": {}
}
}