Collections
Methods for handling collections.
listCollections v1.18.0 read products Types
Get a paginated list of collections for the store.
- ESM
- UMD
import { listCollections } from '@rechargeapps/storefront-client';
await listCollections(session, {
limit: 25,
sort_by: 'id-asc',
});
await recharge.collection.listCollections(session, {
limit: 25,
sort_by: 'id-asc',
});
getCollection v1.18.0 read products Types
Get a collection.
- ESM
- UMD
import { getCollection } from '@rechargeapps/storefront-client';
await getCollection(session, 123);
await recharge.collection.getCollection(session, 123);
listCollectionProducts v1.18.0 read products Types
Get a list of products for a collection in collection sort order, additional product search query params may filter out products from the collection.
Currently this will return up to 250 products, pagination is not currently supported.
- ESM
- UMD
import { listCollectionProducts } from '@rechargeapps/storefront-client';
await listCollectionProducts(session, 123, { format_version: '2022-06' });
await recharge.collection.listCollectionProducts(session, 123, { format_version: '2022-06' });