Service for reading a site's storefront product collections.

Accessible via lynkow.productCollections. Returns only collections the merchant made visible. Requires a publishable key: pass publishableKey to createClient(...) so every request carries it (commerce routes reject calls without a valid key). Responses are cached in-memory for 5 minutes (SHORT TTL) when a cache adapter is configured on the client.

Access via: lynkow.productCollections

Methods

1 method

list

TypeScript
list(filters?: ProductCollectionsFilters, options?: BaseRequestOptions): Promise<ProductCollectionsListResponse>

Retrieves a paginated list of merchant-visible product collections. Cached for 5 minutes per unique filter combination.

Parameter

Type

Description

filters

ProductCollectionsFilters

Optional ProductCollectionsFilters: page/limit.

options

BaseRequestOptions

Base request options (locale override, custom fetch options).

Returns: Promise<ProductCollectionsListResponse>

TypeScript
const { data, meta } = await lynkow.productCollections.list({ page: 1, limit: 20 })