**版本：202601**

# 查询元字段定义详情

**GET** `/openapi/2026-01/metafield_definition`

通过的元字段定义 ID 获取指定的元字段定义。

## 请求

**Query参数**

- `id` uint64

  待查询的元字段定义 ID

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `metafield_definition` object

    元字段定义详情

    - `id` string

      元字段定义 ID
    - `key` string

      元字段键名
    - `name` string

      元字段定义名称
    - `namespace` string

      命名空间
    - `owner_resource` string

      所属资源类型：

      *   `shop`: 店铺
      *   `product`: 商品
      *   `product_image`: 商品图片
      *   `product_variant`: 商品款式
      *   `order`: 订单
      *   `page`: 自定义页面
      *   `customer`: 顾客
      *   `collection`: 商品专辑
      *   `blog`: 博客
      *   `article`: 文章
      *   `app`: 应用
    - `type` string

      元字段值类型：

      *   `date`: 日期
      *   `date_time`: 日期和时间
      *   `weight`: 重量
      *   `volume`: 体积
      *   `dimension`: 外形尺寸
      *   `integer`: 整数
      *   `number_decimal`: 小数
      *   `file_reference`: 文件引用
      *   `single_line_text_field`: 单行文本
      *   `multi_line_text_field`: 多行文本
      *   `json`: JSON
      *   `color`: 颜色
      *   `rating`: 评分
      *   `url`: URL
      *   `boolean`: 布尔值（true 或 false）
      *   `string`: 字符串
    - `description` string

      元字段定义描述
    - `create_at` string

      创建时间（ISO-8601 格式）
    - `updated_at` string

      最后更新时间（ISO-8601 格式）

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "metafield_definition": {
      "id": "string",
      "key": "string",
      "name": "string",
      "namespace": "string",
      "owner_resource": "string",
      "type": "string",
      "description": "string",
      "create_at": "string",
      "updated_at": "string"
    }
  }
}
```
