ProductTypesResource
This class is used to send requests to Store Product Type API Routes. All its method
are available in the JS Client under the medusa.productTypes
property.
Product types are string values that can be used to filter products by. Products can have more than one tag, and products can share types.
Methods
list
Retrieve a list of product types. The product types can be filtered by fields such as value
or q
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
customHeaders
Record<string, any>RequiredCustom headers to attach to the request.
Default: {}
Filters and pagination configurations to apply on retrieved product types.
Returns
ResponsePromise
ResponsePromise<StoreProductTypesListRes>RequiredResolves to the list of product types with pagination fields.
ResponsePromise
ResponsePromise<StoreProductTypesListRes>RequiredWas this section helpful?