Product Listing Page
๐ API Routesโ
GET /api/rollup/collectionsโ
This route generates a an enriched product listing for the first 70 unique products in a given collection using SearchSpring data and Shopify's Storefront API.
๐ฅ Query Parametersโ
| Name | Required | Description |
|---|---|---|
collection_handle | โ | The handle of the collection to fetch |
๐งช Example Requestโ
GET */api/rollup/collections?collection_handle=black-bridesmaid-dresses
๐ฆ Returns A structured JSON object including:โ
- results: All raw products from SearchSpring.
- filteredResults: A mapping of de-duplicated "cover" products by their style-fabric key, each with:
- The main product handle
- Its color, style, fabric
- All handles for color variations
- Product data from Shopify
- Bubble images for color display (if available)
๐ ๏ธ Related Functionsโ
- getCollectionByHandle(): Recursively fetches paginated SearchSpring results.
- filterCollectionData(): De-duplicates products and maps them by style-fabric.
- getProductDataForDresses(): Fetches product details for cover cards.
Documentation coming soon.