StoreKitdocs
SDKReference

Catalog

products, categories, search, and store resource methods.

Every method returns Promise<Result<T>> and accepts an optional final options argument. Examples use the Next.js storekit instance, but the methods are identical on every client.

products

products.list(query?, options?)

List products with keyset pagination.

const { data } = await storekit.products.list({
  limit: 24,          // 1–100, default 20
  cursor,             // from a previous nextCursor
  categorySlug: "shoes", // includes the subtree
  tagSlug: "sale",
  status: "active",
});
// data → { data: Product[], nextCursor, hasMore }

products.get(slug, options?)

Fetch a single active product by slug. NOT_FOUND error if it doesn't exist.

const { data: product, error } = await storekit.products.get("air-zoom");

products.listAll(query?, options?)

Auto-paginate every page into one array. Best for build-time generation.

const { data: all } = await storekit.products.listAll({ categorySlug: "shoes" });

A Product includes variants[], each with price/compareAtPrice (strings), inventoryQty, and attributes.

categories

categories.list(options?)

Flat list of all categories, each with a parentId — build the tree client-side.

const { data: categories } = await storekit.categories.list();

categories.get(slug, query?, options?)

A category plus its products (paginated over the subtree).

const { data } = await storekit.categories.get("footwear", { limit: 24, cursor });
// data → { category, products: { data, nextCursor, hasMore } }

search is callable directly — not a namespace.

search(query, options?)

const { data } = await storekit.search({
  q: "running shoes", // required
  limit: 20,
  cursor,
  categorySlug: "footwear",
  inStock: true,
});
// data → { results, facets, nextCursor, hasMore, total }

facets gives category counts, a price range, and in/out-of-stock counts for building filter UI. See Pagination & filtering.

store

store.get(options?)

Store configuration: name, currency, websiteConfig, operating hours, delivery charges, tax config, and isTakingOrders.

const { data: store } = await storekit.store.get();

store.outlets(options?)

Active outlets for the store.

const { data } = await storekit.store.outlets();
// data → { outlets: Outlet[] }

Pass { outletId } in a method's options to scope that call to a specific outlet.

On this page