跳到主要内容
版本:202506

更新子款式

PUT 

/openapi/2025-06/variants/:variant_id

根据提供的信息更新已有的子款式。

请求

Path参数

    variant_id string必填

    待更新的子款式 ID

请求体必填

    variant object必填

    待更新的子款式数据

    option1string

    商品款式属性 1 的取值(例如"颜色"取值"红色")

    option2string

    商品款式属性 2 的取值

    option3string

    商品款式属性 3 的取值

    image_idstring

    子款式关联的图片 ID

    image object

    子款式图片对象;当商品的 need_variant_image 字段为 true 时必填

    srcstring必填

    图片 URL

    widthint32

    图片宽度(单位:像素)

    heightint32

    图片高度(单位:像素)

    altstring

    图片替代文本(alt)

    pathstring

    图片存储路径

    compare_at_pricedouble

    划线价

    pricedouble必填

    子款式售价;如需留空请设置为 "0.00"

    skustring

    SKU

    barcodestring

    条形码

    notestring

    款式备注/说明

    inventory_quantityint64

    库存数量

    weightdouble

    重量

    weight_unitstring

    重量单位,可选值:kgglboz

    cost_pricedouble

    成本价

    whole_prices object[]

    批发价列表

  • Array [
  • pricedouble

    批发价

    min_quantityint64

    起购量(达到该数量才适用此批发价)

  • ]
  • retail_pricedouble

    零售价

    positionint64

    子款式在列表中的排序位置

    extend object

    子款式扩展信息(包裹尺寸、原产地国别、HS 代码等)

    lengthdouble

    包裹长度

    widthdouble

    包裹宽度

    heightdouble

    包裹高度

    dimension_unitstring

    尺寸单位,可选值:cminmm

    origin_country_codestring

    原产地国别(国家代码,例如 CNUS

    hs_codestring

    HS(协调制度)代码

响应

OK

数据结构
    codestring

    错误码

    messagestring

    错误信息

    data object
    variant object

    已更新的子款式

    idstring

    子款式 ID

    product_idstring

    子款式所属商品的 ID

    image_idstring

    子款式关联的图片 ID

    created_atstring

    子款式创建时间

    updated_atstring

    子款式最后更新时间

    titlestring

    子款式标题

    option1string

    子款式在第 1 个商品款式属性上的取值

    option2string

    子款式在第 2 个商品款式属性上的取值

    option3string

    子款式在第 3 个商品款式属性上的取值

    image object

    子款式图片

    srcstring

    图片 URL

    widthint32

    图片宽度(单位:像素)

    heightint32

    图片高度(单位:像素)

    altstring

    图片替代文本(alt)

    pathstring

    图片存储路径

    positionint64

    子款式在商品中的排序位置

    compare_at_pricedouble

    划线价

    pricedouble

    子款式售价

    skustring

    SKU

    barcodestring

    条形码

    notestring

    款式备注

    inventory_quantityint64

    库存数量

    weightdouble

    重量

    weight_unitstring

    重量单位,可选值:kgglboz

    cost_pricedouble

    成本价

    whole_prices object[]

    批发价列表

  • Array [
  • pricedouble必填

    批发价

    min_quantityint64必填

    起购量(达到该数量才适用此批发价)

  • ]
  • retail_pricedouble

    零售价

    is_discountboolean

    子款式当前是否处于打折状态

    origin_pricedouble

    原价

    extend object

    子款式扩展信息(包裹尺寸、原产地国别、HS 代码等)

    lengthdouble

    包裹长度

    widthdouble

    包裹宽度

    heightdouble

    包裹高度

    dimension_unitstring

    尺寸单位,可选值:cminmm

    origin_country_codestring

    原产地国别(国家代码,例如 CNUS

    hs_codestring

    HS(协调制度)代码