更新商品专辑
PUT/openapi/2022-01/collections/:id
通过唯一 ID 与请求体内容更新已有商品专辑的详细信息。
请求
Path参数
待更新的专辑 ID(UUID 格式)。
- application/json
- 请求体
- 示例
请求体
collection object
The title of the collection.
The SEO link, the C-end album link is https://{subdomain}.myshoplaza.com/collections/{handle}.
SEO title.
SEO keywords, separated by English commas.
SEO description.
The description of the collection, supports rich text.
image object
The image for the collection. This image is added to the collection's page in the Shoplazza admin.
Image's URL
Image's width in px
Image's height in px
Image's alt
Collection merchandise sorting rules:
- alpha-asc: merchandise title dictionary in ascending order
- alpha-desc: merchandise title dictionary in reverse order
- price-asc: merchandise price in ascending order
- price-desc: merchandise price in reverse order
- created-desc: merchandise creation time in ascending order
- manual manual sorting, sorted in the order of the product_ids field.
Product IDs inside this collection, separated by comma, for example: 0097cfc8-6ec3-40ed-ab9f-6f2231b705a6,0097cfc8-6ec3-40ed-ab9f-6f2231b705a6
Whether to clear the collection
{
"collection": {
"title": "string",
"handle": "string",
"seo_title": "string",
"seo_keywords": "string",
"seo_description": "string",
"description": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string"
},
"sort_order": "string",
"product_ids": "string",
"is_clear_all_product_ids": true
}
}
响应
- 200
- 404
- 422
200
- application/json
- 数据结构
- 示例
- Result
数据结构
collection object
a60fe556-43ad-4e07-9125-507ac1bf71f7Test-CollectionDesctest-collectiontruefalseimage object
//cdn.shoplazza.com/9de53f9726576696b318a8d95c0946cb.jpeg01920010809de53f9726576696b318a8d95c0946cb.jpegseo_titleDesctesttitle-desc2024-04-16T10:31:13Z2024-04-16T11:29:32Z{
"collection": {
"id": "a60fe556-43ad-4e07-9125-507ac1bf71f7",
"title": "Test-Collection",
"description": "Desc",
"handle": "test-collection",
"smart": false,
"image": {
"src": "//cdn.shoplazza.com/9de53f9726576696b318a8d95c0946cb.jpeg",
"width": 1920,
"height": 1080,
"alt": "",
"path": "9de53f9726576696b318a8d95c0946cb.jpeg"
},
"seo_title": "seo_title",
"seo_description": "Desc",
"seo_keywords": "test",
"sort_order": "title-desc",
"created_at": "2024-04-16T10:31:13Z",
"updated_at": "2024-04-16T11:29:32Z"
}
}
{
"collection": {
"id": "a60fe556-43ad-4e07-9125-507ac1bf71f7",
"title": "Test-Collection",
"description": "Desc",
"handle": "test-collection",
"smart": false,
"image": {
"src": "//cdn.shoplazza.com/9de53f9726576696b318a8d95c0946cb.jpeg",
"width": 1920,
"height": 1080,
"alt": "",
"path": "9de53f9726576696b318a8d95c0946cb.jpeg"
},
"seo_title": "seo_title",
"seo_description": "Desc",
"seo_keywords": "test",
"sort_order": "title-desc",
"created_at": "2024-04-16T10:31:13Z",
"updated_at": "2024-04-16T11:29:32Z"
}
}
404
- application/json
- 数据结构
- 示例
- Result
数据结构
{
"errors": [
"Collection not found"
]
}
{
"errors": [
"Collection not found"
]
}
422
- application/json
- 数据结构
- 示例
- Result
数据结构
{
"errors": [
"productIds has an invalid UUID"
]
}
{
"errors": [
"productIds has an invalid UUID"
]
}