CommerceOS docsmenu

Storefront API

Products & collections

Catalog reads return exactly what a storefront needs to render: card shapes for grids, a detail shape with variants and live availability for product pages. Only active products are visible on this surface.

GET/storefront/v1/productsrate tier: public-read
QueryTypeDescription
limitnumberPage size (capped server-side).
cursorstringOpaque cursor from the previous page.
wire · product cards
▸ GET /storefront/v1/products?limit=2▸ X-Publishable-Key: pk_live_9f2…◂ 200 OK{  "items": [    {      "id": "ad9b7bd4-14dd-4d9f-966d-4224bdb9d652",      "title": "Classic Cotton Tee",      "image": "https://cdn…/tee.webp",      "priceAmount": 79900,      "currency": "INR"    },    { "id": "…", "title": "Everyday Tote", "image": null,      "priceAmount": 129900, "currency": "INR" }  ],  "nextCursor": "eyJjcmVhdGVkQXQi…"}
GET/storefront/v1/products/:idrate tier: public-read

The detail shape adds description and variants. available is live sellable stock — checkout re-verifies it atomically, so treat it as display data, not a reservation.

wire · product detail
▸ GET /storefront/v1/products/ad9b7bd4-14dd-4d9f-966d-4224bdb9d652◂ 200 OK{  "id": "ad9b7bd4-…",  "title": "Classic Cotton Tee",  "description": "Heavyweight combed cotton…",  "image": "https://cdn…/tee.webp",  "priceAmount": 79900,  "currency": "INR",  "variants": [    {      "id": "be970bc3-…",      "sku": "TEE-M",      "label": "M",      "priceAmount": 79900,      "compareAtAmount": null,      "available": 40    }  ]}
VariantTypeDescription
iduuidUse this id in cart items.
skustring | nullMerchant SKU, when set.
labelstringDisplay label ("M", "Blue / L", …).
priceAmountintMinor units.
compareAtAmountint | nullStrike-through price when the variant is discounted.
availableint ≥ 0Sellable stock right now.
GET/storefront/v1/collectionsrate tier: public-read

Cursor-paginated { id, title, slug } cards for navigation.

GET/storefront/v1/collections/:slugrate tier: public-read
GET/storefront/v1/collections/:slug/productsrate tier: public-read

Products inside a collection, in the same card shape as the main list — manual and smart (rule-based) collections resolve identically on the wire:

wire · collection products
▸ GET /storefront/v1/collections/summer-24/products?limit=12◂ 200 OK{ "items": [ { "id": "…", "title": "…", "image": "…",               "priceAmount": 49900, "currency": "INR" } ],  "nextCursor": null }