By default, all fields are returned. Use
.select() only when you want to optimize by fetching fewer fields.Parameters
Available Fields
Returns
ProductsQueryBuilder (chainable)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Choose which fields to return
openbridge.products.list().select(fields)
openbridge.products.get(handle).select(fields)
.select() only when you want to optimize by fetching fewer fields.| Param | Type | Required | Description |
|---|---|---|---|
fields | ProductField[] | Yes | Fields to include |
| Field | Type |
|---|---|
id | string |
handle | string |
title | string |
description | string |
descriptionHtml | string |
availableForSale | boolean |
featuredImage | ShopifyImage |
images | ShopifyImage[] |
priceRange | ShopifyPriceRange |
compareAtPriceRange | ShopifyPriceRange |
options | ShopifyProductOption[] |
variants | ShopifyProductVariant[] |
sellingPlanGroups | ShopifySellingPlanGroup[] |
productType | string |
vendor | string |
tags | string[] |
createdAt | string |
updatedAt | string |
publishedAt | string |
onlineStoreUrl | string |
seo | ShopifySeo |
ProductsQueryBuilder (chainable)
const { items } = await openbridge.products
.list()
.select(['id', 'title', 'handle'])
const { items } = await openbridge.products
.list()
.select([
'title',
'handle',
'priceRange',
'featuredImage',
'availableForSale'
])
const product = await openbridge.products
.get('product-handle')
.select([
'title',
'descriptionHtml',
'images',
'priceRange',
'compareAtPriceRange',
'options',
'variants',
'vendor'
])
const product = await openbridge.products
.get('product-handle')
.select(['options', 'variants'])