Requires read_products access scope.
For more info, refer to:
GET https://{handle}.myshopline.com/admin/openapi/v20260301/products/custom_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 manual collections in the store.
Query Parameters
  • limit string
    The quantity limit of collections to be queried.
    Value range: 1-250
    Default value: 50
  • 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/custom_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.
  • title string
    The title of the collection.
    Maximum length: 255
    Example: This is a title
  • 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 custom_collections object in the response.
    Example: title,handle
  • ids string
    The unique identifiers for collections to query, with multiple IDs separated by commas.
    Example: 12257170618007271602093384,12257170618007271602083384
  • since_id string
    The ID of a specific collection. Start querying collections from this specified ID.
    Example: 12257170618007271602093384
  • 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-03T14:11:54+00:00
  • handle string
    The semantically unique identifier for the collection, which is generated based on title by default.
    Maximum length: 255
    Example: collection-handle
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
  • custom_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
  • 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
    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.
  • 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/sortation/detail.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-04T14: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/custom_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 manual collections by specifying IDs
Response
{
"custom_collections": [
{
"banner": {
"alt": "This is a 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:19:35+08:00",
"handle": "first",
"id": "12259764246208273857373144",
"image": {
"alt": "This is a image alt",
"src": "https://img-va.myshopline.com/image/store/2001026666/1653474941510/e46e6189dd5641a3b179444cacdcdd2a_15.png?w=1024&h=1024"
},
"published_at": "2023-06-12T14:19:35+08:00",
"published_scope": "web",
"sort_order": "updated-asc",
"template_path": "templates/collection.html",
"title": "First Custom Collection",
"updated_at": "2023-08-29T16:00:42+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:22+08:00",
"handle": "second",
"id": "12259764425141476709093144",
"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:22+08:00",
"published_scope": "web",
"sort_order": "manual",
"template_path": "templates/collection.html",
"title": "Second Custom Collection",
"updated_at": "2023-08-28T19:34:00+08:00"
}
]
}
Was this article helpful to you?