Parameters
Supported formats
Returns
ProductListBuilder (chainable)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Filter products by collection
openbridge.products.list().collection(idOrHandle)
| Param | Type | Required | Description |
|---|---|---|---|
idOrHandle | string | Yes | Collection handle or GID |
| Format | Example |
|---|---|
| Handle | 'summer-sale' |
| Shopify GID | 'gid://shopify/Collection/448629506282' |
ProductListBuilder (chainable)
const { items } = await openbridge.products.list().collection('summer-sale')
const { items } = await openbridge.products
.list()
.collection('gid://shopify/Collection/448629506282')
const { items } = await openbridge.products
.list()
.collection('new-arrivals')
.limit(8)
const { items } = await openbridge.products
.list()
.collection('sale')
.limit(12)
.select([
'title',
'handle',
'priceRange',
'compareAtPriceRange',
'featuredImage'
])
const page1 = await openbridge.products.list().collection('all').limit(12)
if (page1.pageInfo.hasNextPage && page1.pageInfo.endCursor) {
const page2 = await openbridge.products
.list()
.collection('all')
.limit(12)
.after(page1.pageInfo.endCursor)
}