版本:202506
查询元字段列表
GET/openapi/2025-06/metafields/:owner_resource/:owner_id
分页返回指定资源的元字段列表。
请求
Path参数
shop: 店铺product: 商品product_image: 商品图片product_variant: 商品款式order: 订单page: 自定义页面customer: 顾客collection: 商品专辑blog: 博客article: 文章app: 应用
owner_resource string必填
所属资源类型:
owner_id string必填
所属资源的 ID
Query参数
date: 日期date_time: 日期和时间weight: 重量volume: 体积dimension: 外形尺寸integer: 整数number_decimal: 小数file_reference: 文件引用single_line_text_field: 单行文本multi_line_text_field: 多行文本json: JSONcolor: 颜色rating: 评分url: URLboolean: 布尔值(true 或 false)
namespace string
命名空间
key string
元字段键名
type string
元字段值类型:
page_size int64
每页返回的最大数量
cursor uint64
分页游标
create_at_min string
筛选创建时间不早于该时间点的元字段;ISO-8601 格式(例如 2022-12-02T09:46:30Z)
create_at_max string
筛选创建时间不晚于该时间点的元字段;ISO-8601 格式(例如 2022-12-02T09:46:30Z)
update_at_min string
筛选最后更新时间不早于该时间点的元字段;ISO-8601 格式(例如 2022-12-02T09:46:30Z)
update_at_max string
筛选最后更新时间不晚于该时间点的元字段;ISO-8601 格式(例如 2022-12-02T09:46:30Z)
definition_ids uint64[]
元字段定义 ID 列表。 示例:?definition_ids=1001&definition_ids=1002
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
- Array [
shop: 店铺product: 商品product_image: 商品图片product_variant: 商品款式order: 订单page: 自定义页面customer: 顾客collection: 商品专辑blog: 博客article: 文章app: 应用date: 日期date_time: 日期和时间weight: 重量volume: 体积dimension: 外形尺寸integer: 整数number_decimal: 小数file_reference: 文件引用single_line_text_field: 单行文本multi_line_text_field: 多行文本json: JSONcolor: 颜色rating: 评分url: URLboolean: 布尔值(true 或 false)string: 字符串- ]
codestring
错误码
messagestring
错误信息
data object
metafields object[]
元字段列表
idstring
元字段 ID
store_iduint32
所属店铺 ID
owner_resourcestring
所属资源类型:
owner_idstring
所属资源的 ID(如商品 ID)
namespacestring
命名空间
keystring
元字段键名
typestring
元字段值类型:
valueGoogleProtobufValue
元字段值;其数据类型由 type 字段决定(例如 red)
descriptionstring
元字段描述(例如 商品颜色)
definition_iduint64
关联的元字段定义 ID(例如 123456)
created_atstring
创建时间(ISO-8601 格式)
updated_atstring
最后更新时间(ISO-8601 格式)
next_cursoruint64
下一页游标
total_countint32
元字段总数
has_moreboolean
是否有更多记录
{
"code": "string",
"message": "string",
"data": {
"metafields": [
{
"id": "string",
"store_id": 0,
"owner_resource": "string",
"owner_id": "string",
"namespace": "string",
"key": "string",
"type": "string",
"description": "string",
"definition_id": 0,
"created_at": "string",
"updated_at": "string"
}
],
"next_cursor": 0,
"total_count": 0,
"has_more": true
}
}