Setup
To use the Collections API, install the @wix/stores
package using npm or Yarn:
1npm install @wix/stores
or
1yarn add @wix/stores
Then import { collections }
from @wix/stores
:
1import { collections } from '@wix/stores'
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a collection with the provided ID.
function getCollection(_id: string): Promise<Collection>
Requested collection ID.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a collection with the provided slug.
function getCollectionBySlug(slug: string): Promise<GetCollectionBySlugResponse>
Slug of the collection to retrieve.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering. See Stores Pagination for more information.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
_id | eq() ,ne() ,exists() ,in() ,hasSome() ,startsWith() ,ascending() ,descending() |
name | eq() ,ne() ,exists() ,in() ,hasSome() ,startsWith() ,ascending() ,descending() |
function queryCollections(): CollectionsQueryBuilder