Skip to main content
Version: 202201

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

Body

    collection object
    titlestringrequired

    The title of the collection.

    handlestring

    The SEO link, the C-end album link is https://{subdomain}.myshoplaza.com/collections/{handle}.

    seo_titlestring

    SEO title

    seo_descriptionstring

    SEO description

    seo_keywordsstring

    SEO Keywords, separated by comma, for example: key1,key2

    descriptionstring

    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.

    srcstringrequired

    Image's URL

    widthint32

    Image's width in px

    heightint32

    Image's height in px

    altstring

    Image's alt

    sort_orderstring

    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

    Default value: manual
    product_idsstring

    Product's IDs, separated by comma, for example: 0097cfc8-6ec3-40ed,40ed-ab9f-6f2231b7

Responses

200

Schema
    collection object
    idstring
    Example: a60fe556-43ad-4e07-9125-507ac1bf71f7
    titlestring
    Example: Test-Collection
    descriptionstring
    Example: Desc
    handlestring
    Example: test-collection
    smartboolean
    Default value: true
    Example: false
    image object
    srcstring
    Example: //cdn.shoplazza.com/loading.png
    widthinteger
    Default value: 0
    Example: 100
    heightinteger
    Default value: 0
    Example: 100
    altstring
    Example:
    pathstring
    Example: loading.png
    seo_titlestring
    Example: seo_title
    seo_descriptionstring
    Example: Desc
    seo_keywordsstring
    Example: test
    sort_orderstring
    Example: title-asc
    created_atstring
    Example: 2024-04-16T10:31:12Z
    updated_atstring
    Example: 2024-04-16T10:31:12Z