Search Documentation
Search for a documentation page...
Products
Browse, create, update, and delete products using the Commerce SDK.
Browse Products
Fetch a paginated list of products:
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | number | Max items to return (default: 20) |
offset | number | Number of items to skip |
collectionSlug | string | Filter by collection |
categorySlug | string | Filter by category |
Get a Product
Fetch a single product by ID or slug:
Response
The typed response still declares the merchant-private variant keys — cost, digital, externalId, supplierAliases, reservedQuantity, unavailableQuantity — but read methods always answer with them blanked, so a storefront cannot leak them into its page source. See Merchant-private fields.
Suggested Products
What to show in a product page's "You might also like" section, in display order: the merchant's suggested products first, then products from the same category, never anything a shopper can't buy right now. Available from commerce-kit 0.74.0.
Each entry has the same shape as an entry of productBrowse, so the same product card renders both. With no suggestions set, the list still fills from the product's category. See Suggested products for the rules.
Displaying Prices
Prices are stored net. Every variant also carries a gross twin — priceGross, plus originalPriceGross, calculatedPriceGross, and prePromotionPriceGross — so the storefront never computes tax itself. Which one to render is decided by the store's tax behavior:
inclusive means shoppers see gross prices with tax included; exclusive means they see net prices and tax is added at checkout. With no tax rate assigned, gross equals net. See Prices and tax for the full field list.
Create a Product
Update a Product
Delete a Product
Working with Variants
Products have variants for different options (size, color, etc.). Manage variants with dedicated methods: