版本:202607
更新商品专辑
PUT/openapi/2026-07/collections/:id
通过唯一 ID 与请求体内容更新已有商品专辑的详细信息。
请求
Path参数
id string必填
待更新的专辑 ID(UUID 格式)
- application/json
- 请求体
- 示例
请求体必填
manual:手动排序(默认)sales-desc:按总销量从高到低price-asc:按售价从低到高price-desc:按售价从高到低views-desc:按浏览人气从高到低vendor-asc:按供应商 A-Z 展示vendor-desc:按供应商 Z-A 展示created-desc:按创建时间从近到远:intelligent:智能推荐排序
collection object必填
待更新的专辑数据
titlestring
专辑名称
handlestring
专辑 handle(URL 友好的唯一别名)
descriptionstring
专辑描述
image object
专辑封面
srcstring必填
专辑封面的源 URL
widthint32
专辑封面宽度(单位:像素)
heightint32
专辑封面高度(单位:像素)
altstring
专辑封面的替代文本(alt)
seo_titlestring
专辑的 SEO 标题
seo_keywordsstring[]
SEO 关键词列表
seo_descriptionstring
专辑的 SEO 描述
sort_orderstring
专辑内商品的排序规则,可选值:
默认值:
manualproduct_idsstring[]
完整替换专辑商品的商品 ID 列表,必须为有效 UUID
若提供,则优先于 add_product_ids 和 delete_product_ids。
add_product_idsstring[]
向专辑添加的商品 ID 列表,必须为有效 UUID
若指定了 product_ids 则忽略此字段。
delete_product_idsstring[]
从专辑移除的商品 ID 列表,必须为有效 UUID
若指定了 product_ids 则忽略此字段。
tagsstring[]
专辑标签列表
{
"collection": {
"title": "string",
"handle": "string",
"description": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string"
},
"seo_title": "string",
"seo_keywords": [
"string"
],
"seo_description": "string",
"sort_order": "manual",
"product_ids": [
"string"
],
"add_product_ids": [
"string"
],
"delete_product_ids": [
"string"
],
"tags": [
"string"
]
}
}
响应
- 200
OK
- application/json
- 数据结构
- 示例
数据结构
- Array [
- Array [
- ]
- ]
codestring
错误码
messagestring
错误信息
data object
collection object
已更新的专辑
idstring
专辑 ID
titlestring
专辑名称
descriptionstring
专辑描述
handlestring
专辑 handle(URL 友好的唯一别名)
smartboolean
是否为智能专辑(满足条件的商品自动加入)
image object
专辑封面
srcstring
图片来源 URL
widthint32
图片宽度(像素)
heightint32
图片高度(像素)
altstring
图片替代文本
seo_titlestring
专辑的 SEO 标题
seo_keywordsstring[]
SEO 关键词列表
seo_descriptionstring
专辑的 SEO 描述
sort_orderstring
专辑内商品的排序规则(取值见创建专辑接口)
created_atstring
专辑创建时间(ISO-8601 格式)
updated_atstring
专辑最后更新时间(ISO-8601 格式)
match_rules object
智能集合匹配规则
disjunctiveboolean
条件是否为析取关系(OR)
rule_modules object[]
规则模块列表
disjunctiveboolean
条件是否为析取关系(OR)
rules object[]
此模块中的规则列表
columnstring
列
relationstring
关联关系
conditionstring
条件
tagsstring[]
集合标签列表
product_countint64
集合中的商品数量
{
"code": "string",
"message": "string",
"data": {
"collection": {
"id": "string",
"title": "string",
"description": "string",
"handle": "string",
"smart": true,
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string"
},
"seo_title": "string",
"seo_keywords": [
"string"
],
"seo_description": "string",
"sort_order": "string",
"created_at": "string",
"updated_at": "string",
"match_rules": {
"disjunctive": true,
"rule_modules": [
{
"disjunctive": true,
"rules": [
{
"column": "string",
"relation": "string",
"condition": "string"
}
]
}
]
},
"tags": [
"string"
],
"product_count": 0
}
}
}