Collection List

🔒

Requires read_collection access scope. More access scope

The Get Collections API retrieves a list of collections based on various filter criteria, such as product_id, title, or update timestamps. It allows users to paginate results and specify query limits for efficient retrieval.This API is especially useful for:

1.Fetch all collections for specific product association.

2.Filter collections by title or update timestamps.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

ParameterTypeRequiredDescription
idsstringNoComma-separated list of collection IDs to retrieve specific collections.
titlestringNoFilter collections by their title (supports partial matching).
updated_at_minstringNoMinimum timestamp for filtering collections by their last updated date. Format: YYYY-MM-DDTHH:mm:ssZ.
updated_at_maxstringNoMaximum timestamp for filtering collections by their last updated date. Format: YYYY-MM-DDTHH:mm:ssZ.
product_idstringNoUUID of a product to filter collections that include the product.
pageintegerNoPage number for pagination (default: 1).
limitintegerNoNumber of collections to retrieve per page (default: 10, max: 100).

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeExampleDescription
collectionsArrayAn array of collection objects. Each collection contains details about a specific product collection.
collections.idString"a60fe556-43ad-4e07-9125-507ac1bf71f7"The unique identifier of the collection (UUID).
collections.titleString"Test-Collection"The title of the collection.
collections.descriptionString"Desc"A description of the collection.
collections.handleString"test-collection"The URL-friendly handle for the collection.
collections.smartBooleanfalseIndicates whether the collection is a smart collection (true) or a manual collection (false).
collections.imageObjectImage ObjectAn object containing details of the collection image.
collections.image.srcString"//cdn.shoplazza.com/cb.jpeg"The URL of the image.
collections.image.widthInteger1920The width of the image in pixels.
collections.image.heightInteger1080The height of the image in pixels.
collections.image.altString""The alternative text for the image.
collections.image.pathString"cb.jpeg"The file path of the image.
collections.seo_titleString"seo_title"The SEO title for the collection.
collections.seo_descriptionString"Desc"The SEO description for the collection.
collections.seo_keywordsString"test"Comma-separated keywords for SEO optimization.
collections.sort_orderString"title-asc"Merchandise sorting rules. Options include: manual (default), sales-desc, price-asc, price-desc, views-desc, vendor-asc, vendor-desc, created-desc, and more. (See order options ).
collections.created_atString"2024-04-16T10:31:13Z"The timestamp when the collection was created, in ISO 8601 format.
collections.updated_atString"2024-04-16T10:31:13Z"The timestamp when the collection was last updated, in ISO 8601 format.

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "UpdatedAtMin time format error"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorArray "store is not active"Indicates an error encountered during the process.

Error Details

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
422update_at_min time format errorThe update_at_min field is not in a valid time format.(e.g., not ISO8601).{"errors": ["update_at_min time format error"]}
update_at_max time format errorThe update_at_max field is not in a valid time format.(e.g., not ISO8601).{"errors": ["update_at_min time format error"]}
500no contextMissing Context{"errors": ["No context"]}

API Structure Overview

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