Create Collect

Associates a product with a collection by creating a collect object.

🔒

Requires write_collection access scope. More access scope

The Create Collect API associates a product with a collection by creating a collect object. For every single product in a collection there's a collect that tracks the ID of both the product and collection. This enables users to organize products into collections for easier management and display.This API is especially useful for:

  1. Add a product to a specific collection.
  2. Organize products for marketing, inventory, or categorization purposes.

Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain), ensuring all updates are applied to the correct store.

Request Parameters

Public Request Parameters

📘

Body Parameters

FieldTypeRequiredExampleDescription
collect.collection_idstringYesa60fe556-43ad-4e07-9125-507ac1bf71f7Unique identifier of the collection.
collect.product_idstringYesc34da7b1-26af-4c2b-8a7b-3474d73cdab1Unique identifier of the product.

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring200Error code (200 indicates success)
messagestringSuccessError message
dataobject{...}Contains the collects data
data.collectobject{...}List of collect objects

Collect Object Structure

ParameterTypeExampleDescription
idstringcoll_123456Unique identifier of the collect
collection_idstringcoll_789abcIdentifier of the associated collection
product_idstringprod_456defIdentifier of the associated product
positionstring1Position of the product in the collection
created_atstring2023-06-20T15:30:00ZTimestamp when the collect was created
updated_atstring2023-06-21T09:15:00ZTimestamp when the collect was last updated

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!