🔒
The Update Collection API allows users to update details of an existing collection by providing the collection ID and the desired updates in the request body. This API supports updates to various attributes, including the title, description, SEO details, associated products, and more.This API is especially useful for:
Modify collection details such as title, description, or handle.
Update the associated image, SEO metadata, and sorting order for merchandise.
📘
Parameter Type Required Description Example idstring Yes a60fe556-43ad-4e07-9125-507ac1bf71f7Unique identifier of the collection.
Parameter Type Required Description Example collectionobject Yes The collection configuration object {...}collection.titlestring Yes The name of the collection Summer Sale 2023collection.handlestring No A unique URL-friendly identifier for the collection summer-sale-2023collection.descriptionstring No The description of the collection Discounted summer productscollection.imageobject No Image details for the collection {...}collection.seo_titlestring No The SEO title for the collection Summer Sale Collectioncollection.seo_keywordsarray of object No The keywords for SEO { "values": [ "a","b", ] }collection.seo_descriptionstring No The SEO description for the collection Discounted summer products collectioncollection.sort_orderstring No Merchandise sorting rules. Options include: manual (default), sales-desc, price-asc, price-desc, views-desc, vendor-asc, vendor-desc, created-desc, and more price-asccollection.product_idsarray of object No List of product IDs to include in the collection. Must be valid UUIDs { "values": [ "a","b", ] }
Parameter Type Required Description Example srcstring Yes The source URL of the collection image https://example.com/summer.jpgwidthint32 No The width of the collection image in pixels 800heightint32 No The height of the collection image in pixels 600altstring No Alt text for the collection image Summer collection image
📘
Parameter Type Example Description codestring 200Error code (200 indicates success) messagestring SuccessError message dataobject {...}Contains the collects data data.collectioncollection object {...}collection object
Parameter Type Example Description idstring coll_123456Unique identifier of the collection titlestring Summer CollectionName of the collection descriptionstring Our best summer productsDescription of the collection handlestring summer-collectionURL-friendly identifier smartboolean falseWhether this is a smart collection (dynamically filtered) imageobject {...}Image details for the collection seo_titlestring Summer Collection 2023SEO-optimized title seo_keywordsarray of strings ["summer", "2023", "sale"]SEO keywords for the collection seo_descriptionstring Discount on summer productsSEO description sort_orderstring manualHow products are sorted in this collection created_atstring 2023-06-20T15:30:00ZTimestamp when the collection was created updated_atstring 2023-06-21T09:15:00ZTimestamp when the collection was last updated
Parameter Type Example Description srcstring https://example.com/image.jpgURL of the collection image widthint32 800Image width in pixels heightint32 600Image height in pixels altstring Summer productsAlternative text for the image
Field Type Example Description codestring InvalidParameterError http message messagestring `` Error message