Create Collection
POST/openapi/2022-01/collections
Allows users to create a new collection in the store, including details like the title, description, associated products, SEO attributes, and merchandise sorting rules.
Request
- application/json
- Body
- Example
Body
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 description
SEO Keywords, separated by comma, for example: key1,key2
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:
- default to manual
- sales-desc: by total sales volume, hight to low
- published-desc: by product published time, newest first
- real-sales-desc:by product real sales, more to less
- inventory-quantity-asc: by inventory quantity, less to more
- inventory-quantity-desc: by inventory quantity, more to less
- views-desc: by product page views, more to less
- add-to-cart-count-desc: by add to card count, more to less
- updated-desc: by product update time, newest first
- vendor-asc: by supplier name A-Z
- vendor-desc: by supplier name Z-A
- alpha-asc: by product title A-Z
- alpha-desc: by product title Z-A
- price-asc: by price, low to high
- price-desc: by price, high to low
- created-desc: by creation time, newest first
- manual: manually
manualProduct's IDs, separated by comma, for example: 0097cfc8-6ec3-40ed,40ed-ab9f-6f2231b7
{
"collection": {
"title": "string",
"handle": "string",
"seo_title": "string",
"seo_description": "string",
"seo_keywords": "string",
"description": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string"
},
"sort_order": "manual",
"product_ids": "string"
}
}
Responses
- 200
- 422
200
- application/json
- Schema
- Example
- Result
Schema
collection object
a60fe556-43ad-4e07-9125-507ac1bf71f7Test-CollectionDesctest-collectiontruefalseimage object
//cdn.shoplazza.com/loading.png01000100loading.pngseo_titleDesctesttitle-asc2024-04-16T10:31:12Z2024-04-16T10:31:12Z{
"collection": {
"id": "a60fe556-43ad-4e07-9125-507ac1bf71f7",
"title": "Test-Collection",
"description": "Desc",
"handle": "test-collection",
"smart": false,
"image": {
"src": "//cdn.shoplazza.com/loading.png",
"width": 100,
"height": 100,
"alt": "",
"path": "loading.png"
},
"seo_title": "seo_title",
"seo_description": "Desc",
"seo_keywords": "test",
"sort_order": "title-asc",
"created_at": "2024-04-16T10:31:12Z",
"updated_at": "2024-04-16T10:31:12Z"
}
}
{
"collection": {
"id": "a60fe556-43ad-4e07-9125-507ac1bf71f7",
"title": "Test-Collection",
"description": "Desc",
"handle": "test-collection",
"smart": false,
"image": {
"src": "//cdn.shoplazza.com/loading.png",
"width": 100,
"height": 100,
"alt": "",
"path": "loading.png"
},
"seo_title": "seo_title",
"seo_description": "Desc",
"seo_keywords": "test",
"sort_order": "title-asc",
"created_at": "2024-04-16T10:31:12Z",
"updated_at": "2024-04-16T10:31:12Z"
}
}
422
- application/json
- Schema
- Example
- Result
Schema
{
"errors": [
"Title is taken."
]
}
{
"errors": [
"Title is taken."
]
}