List Product Categories
Retrieve a list of product categories. The product categories can be filtered by fields such as id
. The product categories can also be sorted or paginated.
Headers
Publishable API Key created in the Medusa Admin.
Query Parameters
Comma-separated fields that should be included in the returned data. if a field is prefixed with +
it will be added to the default fields, using -
will remove it from the default fields. without prefix it will replace the entire default fields.
The number of items to skip when retrieving a list.
Limit the number of items returned in the list.
The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -
.
Search term to filter the product category's properties.
Filter by a product category's ID.
Filter by a description. This only matches categories with the exact description. To search by a term or keyword, use the q
query parameter instead.
Filter by a category's handle.
The ID of a category to retrieve its child categories.
Whether to retrieve the category's parent. If you enable this, add to the fields
query parameter parent_category
to set the parent of a category in this field. You can either pass *parent_category
to retreieve the fields of all parent categories, or select specific fields to make the response size smaller. For example, fields=parent_category.id,parent_category.name
.
Whether to retrieve a list of child categories. If you enable this, add to the fields
query parameter category_children
to set the child of a category in this field. You can either pass *category_children
to retreieve the fields of all child categories, or select specific fields to make the response size smaller. For example, fields=category_children.id,category_children.name
.
Filter by the category's creation date.
Filter by the category's update date.
Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
The product category's $or.
Filter by a product category name.
Whether to include deleted records in the result.
Response
OK
The paginated list of product categories.