Get Collect List

Retrieves a list of collect objects, representing the associations between products and collections.

🔒

Requires read_collection access scope. More access scope

The Get Collect List API retrieves a list of collect objects, representing the associations between products and collections. This enables users to efficiently manage and display product categorization within collections.This API is especially useful for:

1.Fetching all products within a specific collection.

2.Retrieving collections a specific product belongs to.

3.Managing inventory or marketing strategies based on product categorization.

Request Parameters

Public Request Parameters

📘

Query Parameters

ParameterTypeRequiredDescriptionExample
cursorstringNoCursor for paginationcursor_123456
page_sizeint32NoA limit on the number of objects to return. Range: 1-100 (default is 10)20
collection_idstringNoUUID of the collection to filter collectscoll_789abc
product_idstringNoUUID of the product to filter collectsprod_456def

Important Note on Query Parameters

Both collection_id and product_id are optional query parameters. It is essential to clarify the query logic when:

  1. Both Parameters Are Provided:

    • The API will prioritize filtering the results based on both collection_id and product_id. This means that only products belonging to the specified collection and matching the given product ID will be returned.
  2. Neither Parameter Is Provided:

    • If neither collection_id nor product_id is provided, the API will return results based on the default query logic (e.g., all products or collections depending on the endpoint's default behavior). Ensure developers understand this fallback behavior to avoid confusion.
  3. Only One Parameter Is Provided:

    • If only collection_id is provided, the API will return all products within the specified collection.
    • If only product_id is provided, the API will return details or results specific to that product.

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring200Error code (200 indicates success)
messagestringSuccessError message
dataobject{...}Contains the collects data
data.collectsarray of objects[ {...}, {...} ]List of collect objects
data.cursorstringcursor_123456Cursor for pagination
data.has_morebooleantrueIndicates if there are more results available

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!