- Get Started
- Product
- Build
- User Guide
- Cloud
- Get Started
- Product
- Build
- Tools
- Reference
- User Guide
- Cloud
This documentation provides a reference to the sdk.admin.productCollection
set of methods used to send requests to Medusa's Admin API routes.
This method creates a product collection. It sends a request to the Create Collection API route.
Promise
Promise<AdminCollectionResponse>This method updates a collection. It sends a request to the Update Collection API route.
id
stringPromise
Promise<AdminCollectionResponse>This method retrieves a paginated list of collections. It sends a request to the List Collections API route.
To retrieve the list of collections:
To configure the pagination, pass the limit
and offset
query parameters.
For example, to retrieve only 10 items and skip 10 items:
Using the fields
query parameter, you can specify the fields and relations to retrieve
in each collection:
Learn more about the fields
property in the API reference.
Promise
Promise<AdminCollectionListResponse>This method retrieves a collection by its ID. It sends a request to the Get Collection API route.
To retrieve a collection by its ID:
To specify the fields and relations to retrieve:
Learn more about the fields
property in the API reference.
id
stringPromise
Promise<AdminCollectionResponse>This method deletes a product collection. It sends a request to the Delete Collection API route.
id
stringPromise
Promise<AdminCollectionDeleteResponse>This method manages the products of a collection to add or remove them. It sends a request to the Manage Products API route.
id
stringPromise
Promise<AdminCollectionResponse>