**版本：202601**

# 设置卡片属性

**PATCH** `/openapi/2026-01/themes/edit-sessions/:oseid/sections/:section_id/props`

在编辑会话中，将属性写入/合并到某张卡片的 settings。

## 请求

**Path参数**

- `oseid` string (required)

  编辑会话 ID
- `section_id` string (required)

  文档内的 section 实例 ID；也可传全局卡片 id（`header`、`footer`、`announcement`、`cart_drawer`）

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `doc_id` string (required)

  section 所在文档（模板文件）ID
- `theme_id` string (required)

  主题 ID（用于拼渲染上下文 url）
- `props` object (required)

  要写入/合并到 `section.settings` 的键值
- `template_name` string

  模板名，如 index。默认取文件 location 去掉 `.liquid`
- `locale` string

  渲染语言；默认 en\_US

```json
{
  "doc_id": "string",
  "theme_id": "string",
  "props": {},
  "template_name": "string",
  "locale": "string"
}
```

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `section` object

    更新后的 section 对象
  - `html` string

    渲染后的 section HTML。目标为全局卡片（header / footer 等）时为空 —— 这类卡片不单独返回渲染结果

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "section": {},
    "html": "string"
  }
}
```
