AdminProductTypesResource
This class is used to send requests to Admin Product Type API Routes. All its method
are available in the JS Client under the medusa.admin.productTypes property.
All methods in this class require user authentication.
Product types are string values created when you create or update a product with a new type. Products can have one type, and products can share types. This allows admins to associate products with a type that can be used to filter products.
Methods
list
Retrieve a list of product types. The product types can be filtered by fields such as q or value passed in the query parameter.
The product types can also be sorted or paginated.
Example
To list product types:
By default, only the first 20 records are retrieved. You can control pagination by specifying the limit and offset properties:
Parameters
customHeadersRecord<string, any>RequiredDefault: {}
Filters and pagination configurations to apply on the retrieved product types.
Returns
ResponsePromiseResponsePromise<AdminProductTypesListRes>RequiredResolves to the list of product types with pagination fields.
ResponsePromiseResponsePromise<AdminProductTypesListRes>Required