Get intelligent collections
GET https://{handle}.myshopline.com/admin/openapi/v20260301/products/smart_collections.json
handle : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is open001.myshopline.com , the store handle is open001 .Get a list of intelligent collections in the store.
Query Parameters
- ids stringThe unique identifiers for collections to query, with multiple IDs separated by commas.Example:
12257170618007271602093384,12257170618007271602083384 - page_info stringThe unique identifier for pagination queries, used to locate a specific page.This parameter value is obtained from the
linkvalue in the response header of this API after you have queried the pagination information.For example, if thelinkvalue you obtained is<https://{handle}.myshopline.com/admin/openapi/{version}/products/smart_collections.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next", the value ofpage_infoiseyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9.For more information on how to use pagination, refer to Paging Mechanism. - updated_at_max stringSpecify the latest update time for the collection to be queried. Collections updated before this time will be returned. Format: ISO 8601.Example:
2021-09-03T14:11:54+00:00 - fields stringSpecify the fields to be returned, with multiple fields separated by commas. For available fields, refer to the top-level child parameters under the
smart_collectionsobject in the response.Example:title,handle - handle stringThe semantically unique identifier for the collection, which is generated based on
titleby default.
Maximum length: 255Example:collection-handle - limit stringThe quantity limit of collections to be queried.
Value range: 1-250
Default Value: 50 - since_id stringThe ID of a specific collection. Start querying collections from this specified ID.Example:
12257170618007271602093384 - title stringThe title of the collection.
Maximum length: 255Example:This is a title - updated_at_min stringSpecify the earliest update time for the collection to be queried. Collections updated on and after this time will be returned. Format: ISO 8601.Example:
2021-09-04T14:11:54+00:00
Request Headers
- Content-Type string requiredThe field must be set to the fixed value
application/json; charset=utf-8. - Authorization string requiredThe access token for the API resource. Refer to App authorization to obtain the access token, and then pass the obtained token in the Bearer format.Example:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
Status Codes
- 200
- 401
- 429
For the complete list of codes and messages, see Http status code.
Response Headers
link
The URL link that provides the pagination data. You can obtainpage_infofrom this parameter for subsequent pagination requests.This parameter is returned when the requested page has a previous or next page.For more information on how to use pagination, refer to Paging Mechanism.traceId
A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.
Response Body
smart_collectionsobject[]
Collection information.bannerobject
The cover image of the collection.alt stringThe alternative textual description of the image, usually a word or phrase with the characteristics or content of the image.Example:This is an image altsrc stringThe link to the image, represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngbody_html stringThe collection description.Example:This is a descriptioncreated_at stringThe date and time when the collection was created. Format: ISO 8601.Example:2021-09-03T14:11:54+00:00disjunctive booleanUsed to define the logical relationship of product filtering criteria in the intelligent collection.true: A product only needs to meet any one of the filtering criteria to be included in the intelligent collection.false: A product must meet all of the filtering criteria to be included in the intelligent collection.
handle stringThe semantically unique identifier for the collection, which is generated based ontitleby default.Example:collection-handleid stringThe unique identifier for the collection.Example:12257170618007271602093384imageobject
The collection image.alt stringThe alternative textual description of the image, usually a word or phrase with the characteristics or content of the image.Example:This is an image altsrc stringThe link to the image, represented as a URL.Example:https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.pngpath stringThe relative path of the collection page.Example:/collections/springpublished_at stringThe date and time when the collection was published to the online store. Format:ISO 8601.Example:2021-09-03T14:11:54+00:00published_scope stringThe published scope of collection sales channels. The value of this field is fixed toweb, indicating an online store.rulesobject[]
Rules for filtering products in the intelligent collection.column stringThe field used for filtering, such astagfor product tags orsale_pricefor product sale price.Example:product_metafield_definitioncondition stringThe value to be matched, such asT shirtfor tags or10.00for price.Example:`true`condition_object_id longThe ID of the metafield object.Example:483749284relation stringThe relationship between the field and the value, such asequalsfor equality orgreater_thanfor greater than.Example:`equals`sort_order stringIndicate the sorting method of collections:best-selling: Sort by sales volume from high to low.alpha-asc: Sort by collection name from A to Z.alpha-desc: Sort by collection name from Z to A.updated-desc: Sort by update time from new to old.updated-asc: Sort by update time from old to new.manual: Sort by custom order.
template_path stringThe template of theme.Example:templates/collection.collection_name.jsontitle stringThe title of the collection.Example:This is a titleupdated_at stringThe date and time when the collection was last updated. Format: ISO 8601.Example:2021-09-03T14:11:54+00:00
API Explorer
Debugger
Examples
Was this article helpful to you?