get https://{shopdomain}.myshoplaza.com/openapi/2022-01/collections
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
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ids | string | No | Comma-separated list of collection IDs to retrieve specific collections. |
title | string | No | Filter collections by their title (supports partial matching). |
updated_at_min | string | No | Minimum timestamp for filtering collections by their last updated date. Format: YYYY-MM-DDTHH:mm:ssZ . |
updated_at_max | string | No | Maximum timestamp for filtering collections by their last updated date. Format: YYYY-MM-DDTHH:mm:ssZ . |
product_id | string | No | UUID of a product to filter collections that include the product. |
page | integer | No | Page number for pagination (default: 1). |
limit | integer | No | Number of collections to retrieve per page (default: 10, max: 100). |
Response Explanation
Public Response Parameters
Success Response
Field | Type | Example | Description |
---|---|---|---|
collections | Array | An array of collection objects. Each collection contains details about a specific product collection. | |
collections.id | String | "a60fe556-43ad-4e07-9125-507ac1bf71f7" | The unique identifier of the collection (UUID). |
collections.title | String | "Test-Collection" | The title of the collection. |
collections.description | String | "Desc" | A description of the collection. |
collections.handle | String | "test-collection" | The URL-friendly handle for the collection. |
collections.smart | Boolean | false | Indicates whether the collection is a smart collection (true ) or a manual collection (false ). |
collections.image | Object | Image Object | An object containing details of the collection image. |
collections.image.src | String | "//cdn.shoplazza.com/cb.jpeg" | The URL of the image. |
collections.image.width | Integer | 1920 | The width of the image in pixels. |
collections.image.height | Integer | 1080 | The height of the image in pixels. |
collections.image.alt | String | "" | The alternative text for the image. |
collections.image.path | String | "cb.jpeg" | The file path of the image. |
collections.seo_title | String | "seo_title" | The SEO title for the collection. |
collections.seo_description | String | "Desc" | The SEO description for the collection. |
collections.seo_keywords | String | "test" | Comma-separated keywords for SEO optimization. |
collections.sort_order | String | "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_at | String | "2024-04-16T10:31:13Z" | The timestamp when the collection was created, in ISO 8601 format. |
collections.updated_at | String | "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.
Field | Type | Example | Description |
---|---|---|---|
errors | Array | [ "UpdatedAtMin time format error"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | Array | "store is not active" | Indicates an error encountered during the process. |
Error Details
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
422 | update_at_min time format error | The 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 error | The update_at_max field is not in a valid time format.(e.g., not ISO8601). | {"errors": ["update_at_min time format error"]} | |
500 | no context | Missing Context | {"errors": ["No context"]} |