Requires read_products access scope.
For more info, refer to:
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 string
    The unique identifiers for collections to query, with multiple IDs separated by commas.
    Example: 12257170618007271602093384,12257170618007271602083384
  • page_info string
    The unique identifier for pagination queries, used to locate a specific page.
    This parameter value is obtained from the link value in the response header of this API after you have queried the pagination information.
    For example, if the link value you obtained is <https://{handle}.myshopline.com/admin/openapi/{version}/products/smart_collections.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next" , the value of page_info is eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9 .
    For more information on how to use pagination, refer to Paging Mechanism.
  • updated_at_max string
    Specify 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 string
    Specify the fields to be returned, with multiple fields separated by commas. For available fields, refer to the top-level child parameters under the smart_collections object in the response.
    Example: title,handle
  • handle string
    The semantically unique identifier for the collection, which is generated based on title by default.
    Maximum length: 255
    Example: collection-handle
  • limit string
    The quantity limit of collections to be queried.
    Value range: 1-250
    Default Value: 50
  • since_id string
    The ID of a specific collection. Start querying collections from this specified ID.
    Example: 12257170618007271602093384
  • title string
    The title of the collection.
    Maximum length: 255
    Example: This is a title
  • updated_at_min string
    Specify 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 required
    The field must be set to the fixed value application/json; charset=utf-8.
  • Authorization string required
    The 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
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 obtain page_info from 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 string
    The alternative textual description of the image, usually a word or phrase with the characteristics or content of the image.
    Example: This is an image alt
  • src string
    The link to the image, represented as a URL.
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • body_html string
    The collection description.
    Example: This is a description
  • created_at string
    The date and time when the collection was created. Format: ISO 8601.
    Example: 2021-09-03T14:11:54+00:00
  • disjunctive boolean
    Used 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 string
    The semantically unique identifier for the collection, which is generated based on title by default.
    Example: collection-handle
  • id string
    The unique identifier for the collection.
    Example: 12257170618007271602093384
  • imageobject
    The collection image.
  • alt string
    The alternative textual description of the image, usually a word or phrase with the characteristics or content of the image.
    Example: This is an image alt
  • src string
    The link to the image, represented as a URL.
    Example: https://img.myshopline.com/image/official/e46e6189dd5641a3b179444cacdcdd2a.png
  • path string
    The relative path of the collection page.
    Example: /collections/spring
  • published_at string
    The date and time when the collection was published to the online store. Format:ISO 8601.
    Example: 2021-09-03T14:11:54+00:00
  • published_scope string
    The published scope of collection sales channels. The value of this field is fixed to web, indicating an online store.
  • rulesobject[]
    Rules for filtering products in the intelligent collection.
  • column string
    The field used for filtering, such as tag for product tags or sale_price for product sale price.
    Example: product_metafield_definition
  • condition string
    The value to be matched, such as T shirt for tags or 10.00 for price.
    Example: `true`
  • condition_object_id long
    The ID of the metafield object.
    Example: 483749284
  • relation string
    The relationship between the field and the value, such as equals for equality or greater_than for greater than.
    Example: `equals`
  • sort_order string
    Indicate 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 string
    The template of theme.
    Example: templates/collection.collection_name.json
  • title string
    The title of the collection.
    Example: This is a title
  • updated_at string
    The date and time when the collection was last updated. Format: ISO 8601.
    Example: 2021-09-03T14:11:54+00:00
API Explorer
https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301

ParamOptions

header required
query
query
query
query
query
query
query
query
query

Language

curl --request GET \
--url https://openapiceshidianpu.myshopline.com/admin/openapi/v20260301/products/smart_collections.json \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'accept: application/json'
Examples
Get intelligent collections by specifying IDs
Response
{
"smart_collections": [
{
"banner": {
"alt": "This is an image alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a_15.png?w=1024&h=1024"
},
"body_html": "This is a description",
"created_at": "2023-06-12T14:21:25+08:00",
"disjunctive": true,
"handle": "first-zn",
"id": "12259764264680491895113144",
"image": {
"alt": "This is an image alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a_15.png?w=1024&h=1024"
},
"published_at": "2023-06-12T14:21:25+08:00",
"published_scope": "web",
"rules": [
{
"column": "tag",
"condition": "T shirt",
"relation": "equals"
}
],
"sort_order": "updated-asc",
"template_path": "templates/collection.html",
"title": "First Smart Collection",
"updated_at": "2023-08-29T16:14:56+08:00"
},
{
"banner": {
"alt": "This is a alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a.png?w=1024&h=1024"
},
"body_html": "<p>This is a desription</p>",
"created_at": "2023-06-12T14:37:30+08:00",
"disjunctive": true,
"handle": "second-zn",
"id": "12259764426561500409593144",
"image": {
"alt": "This is a alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a.png?w=1024&h=1024"
},
"published_at": "2023-06-12T14:37:30+08:00",
"published_scope": "web",
"rules": [
{
"column": "tag",
"condition": "T shirt",
"relation": "equals"
},
{
"column": "title",
"condition": "My",
"relation": "starts_with"
}
],
"sort_order": "manual",
"template_path": "templates/collection.html",
"title": "Second Smart Collection",
"updated_at": "2023-08-29T15:06:07+08:00"
}
]
}
Was this article helpful to you?