Retrieving items within a Custom_Collection

Solved
Highlighted
Tourist
8 1 0

I could be misusing this endpoint but I'm struggling to find the list of products within a custom_collection. When I pull the details of a custom collection with /custom_collections/$collectionId.json I'm given the following:

 

{
admin_graphql_api_id: "gid://shopify/Collection/51869843492"
body_html: ""
handle: "bridesmaids-dresses"
id: 51869843492
products_count: 3
published_at: "2019-05-31T11:24:39-07:00"
published_scope: "global"
sort_order: "best-selling"
template_suffix: ""
title: "Bridesmaids"
updated_at: "2019-09-13T20:15:02-07:00"
}

 

 

0 Likes

Success.

Tourist
8 1 0

I figured it out (finally). Use /custom_collections.json to fetch the list of collections and /collects.json?collection_id={ID} to get the array of products for that collection. Sheeshhh.... That was WAY too difficult to figure out.

0 Likes