Update Collection

Allows users to update details of an existing collection by providing the collection ID and the desired updates in the request body.

🔒

Requires write_collection access scope. More access scope

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:

  1. Modify collection details such as title, description, or handle.
  2. Update the associated image, SEO metadata, and sorting order for merchandise.

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredDescriptionExample
idstringYesa60fe556-43ad-4e07-9125-507ac1bf71f7Unique identifier of the collection.

Body Parameters

ParameterTypeRequiredDescriptionExample
collectionobjectYesThe collection configuration object{...}
collection.titlestringYesThe name of the collectionSummer Sale 2023
collection.handlestringNoA unique URL-friendly identifier for the collectionsummer-sale-2023
collection.descriptionstringNoThe description of the collectionDiscounted summer products
collection.imageobjectNoImage details for the collection{...}
collection.seo_titlestringNoThe SEO title for the collectionSummer Sale Collection
collection.seo_keywordsarray of objectNoThe keywords for SEO{ "values": [ "a","b", ] }
collection.seo_descriptionstringNoThe SEO description for the collectionDiscounted summer products collection
collection.sort_orderstringNoMerchandise sorting rules. Options include: manual (default), sales-desc, price-asc, price-desc, views-desc, vendor-asc, vendor-desc, created-desc, and moreprice-asc
collection.product_idsarray of objectNoList of product IDs to include in the collection. Must be valid UUIDs{ "values": [ "a","b", ] }

Image Object Structure

ParameterTypeRequiredDescriptionExample
srcstringYesThe source URL of the collection imagehttps://example.com/summer.jpg
widthint32NoThe width of the collection image in pixels800
heightint32NoThe height of the collection image in pixels600
altstringNoAlt text for the collection imageSummer collection image

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring200Error code (200 indicates success)
messagestringSuccessError message
dataobject{...}Contains the collects data
data.collectioncollection object {...}collection object

Collection Object Structure

ParameterTypeExampleDescription
idstringcoll_123456Unique identifier of the collection
titlestringSummer CollectionName of the collection
descriptionstringOur best summer productsDescription of the collection
handlestringsummer-collectionURL-friendly identifier
smartbooleanfalseWhether this is a smart collection (dynamically filtered)
imageobject{...}Image details for the collection
seo_titlestringSummer Collection 2023SEO-optimized title
seo_keywordsarray of strings["summer", "2023", "sale"]SEO keywords for the collection
seo_descriptionstringDiscount on summer productsSEO description
sort_orderstringmanualHow products are sorted in this collection
created_atstring2023-06-20T15:30:00ZTimestamp when the collection was created
updated_atstring2023-06-21T09:15:00ZTimestamp when the collection was last updated

Image Object Structure

ParameterTypeExampleDescription
srcstringhttps://example.com/image.jpgURL of the collection image
widthint32800Image width in pixels
heightint32600Image height in pixels
altstringSummer productsAlternative text for the image

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!