Skip to main content

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โ€‹

NameRequiredDescription
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)
  • 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.