版本:202506
根据 SKU 获取子款式列表
GET/openapi/2025-06/products/sku/:sku/variants
获取指定 SKU 对应的子款式列表。
请求
Path参数
sku string必填
待查询子款式列表的 SKU
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
- Array [
- Array [
- ]
- ]
codestring
错误码
messagestring
错误信息
data object
variants 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
重量单位,可选值:kg、g、lb、oz
cost_pricedouble
成本价
whole_prices object[]
批发价列表
pricedouble必填
批发价
min_quantityint64必填
起购量(达到该数量才适用此批发价)
retail_pricedouble
零售价
is_discountboolean
子款式当前是否处于打折状态
origin_pricedouble
原价
extend object
子款式扩展信息(包裹尺寸、原产地国别、HS 代码等)
lengthdouble
包裹长度
widthdouble
包裹宽度
heightdouble
包裹高度
dimension_unitstring
尺寸单位,可选值:cm、in、mm
origin_country_codestring
原产地国别(国家代码,例如 CN、US)
hs_codestring
HS(协调制度)代码
{
"code": "string",
"message": "string",
"data": {
"variants": [
{
"id": "string",
"product_id": "string",
"image_id": "string",
"created_at": "string",
"updated_at": "string",
"title": "string",
"option1": "string",
"option2": "string",
"option3": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
},
"position": 0,
"compare_at_price": 0,
"price": 0,
"sku": "string",
"barcode": "string",
"note": "string",
"inventory_quantity": 0,
"weight": 0,
"weight_unit": "string",
"cost_price": 0,
"whole_prices": [
{
"price": 0,
"min_quantity": 0
}
],
"retail_price": 0,
"is_discount": true,
"origin_price": 0,
"extend": {
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "string",
"origin_country_code": "string",
"hs_code": "string"
}
}
]
}
}