跳到主要内容
版本:202506

更新元字段定义

PUT 

/openapi/2025-06/metafield_definition/:id

通过元字段定义 ID 更新现有元字段定义的详细信息。

请求

Path参数

    id uint64必填

    待更新的元字段定义 ID

请求体必填

    descriptionstring

    更新后的元字段定义描述

    namestring

    更新后的元字段定义名称

响应

OK

数据结构
    codestring

    错误码

    messagestring

    错误信息

    data object
    metafield_definition object

    已更新的元字段定义

    idstring

    元字段定义 ID

    keystring

    元字段键名

    namestring

    元字段定义名称

    namespacestring

    命名空间

    owner_resourcestring

    所属资源类型:

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

    元字段值类型:

    • 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: 字符串
    descriptionstring

    元字段定义描述

    create_atstring

    创建时间(ISO-8601 格式)

    updated_atstring

    最后更新时间(ISO-8601 格式)