This page is the curated reference. The complete, generated type reference lives at /kit/api/core and is regenerated from the published typings.
products:read scope, except shop.get(), which needs checkout:read. Only visible products come back; cost prices, suppliers and internal notes are never exposed to a publishable key. The data shapes are on Types.
Every method takes an optional signal (an AbortSignal) to cancel the request on a route change or unmount.
Currency. Every product read carries the client’s currency as ?currency= (see Currencies), and each read also takes a per-call currency: a code prices that one read in it, null reads the shop’s own prices. Every product states what its prices came back in as product.currency; format with that. A well-formed code the shop does not offer silently falls back to the shop’s currency; a malformed one throws a ShopkitConfigError before the request.
products.list
products.search (below) instead: list() filters hidden products after paging, so its pages can come back shorter than limit.
Price this read for a campaign storefront. Omitted means the client’s binding;
null means the shop’s ordinary prices. See Campaign storefronts.Price this read in another currency. Omitted means the client’s currency;
null means the shop’s own. See Currencies.Who the page was priced for:
{ audience, groupId, vatDisplay }. Also on products.search. See Customer accounts.products.search
Free text, matched against product name, SKU, GTIN, variant SKU and GTIN, and option values. Words are AND-ed and order-independent (
"merino crew" finds “Crew neck, merino”). Only the first 10 words count.Same as on
list(). The results are converted; the price bounds and sort are not (see below).search() does not do: return facet counts, filter by an option value across the catalog (“everything in black”), or match slugs.
products.get
"prod_27" or 27. Resolves to null when the product does not exist or is not visible: a missing product is a normal answer, not an exception.
Only this method returns relatedProducts on the product. Like getBySlug(), it also returns product.pricing: who the product was priced for.
All product reads are priced for the logged-in customer, when there is one: group prices, and products visible only to the customer’s group. See Customer accounts.
products.getBySlug
maxPages defaults to 200.
products.listAll
categories.list
products:read. A category page is products.search({ categoryId }). To include products that live only in child categories, walk the tree with categories.list({ parentId }) and query each.
categories.get
null when the category does not exist.
shop.get
checkout:read, because it is served by the checkout’s shop endpoint, the only shop surface a publishable key can reach.
The shop’s own currency, upper-case ISO 4217. Absent on a platform older than the field.
Every currency a shopper may browse in, base first:
{ code, mode: "base" | "display" | "charge", rate }. Only the base entry when the merchant’s currency converter is off. See Currencies.The merchant’s GA4 measurement id, GTM container id and Meta pixel id (validated by the platform;
null when unset), and whether the platform sends Meta Conversions API events. What the kit’s analytics loads by default. See Consent and analytics.Shop cache
useCurrency() and <qb-currency-select> needs it. This cache gives them one request between them. A rejected read is evicted, so the next caller retries.
Product lookup cache
<ProductProvider slug|id> and <qb-product>. Two lookups of the same product share one request. Entries are keyed on the currency (the lookup’s own, else the client’s current one), the campaign and the logged-in customer (customers.cacheKey), so a currency switch or a login never hands back a promise priced for someone else. Call clearProductCache after a revalidation in a long-lived browser session.