xclade
Store APIProduct categories

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.

GET
/store/product-categories

Query Parameters

fields?string

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.

offset?number

The number of items to skip when retrieving a list.

limit?number

Limit the number of items returned in the list.

order?string

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 -.

q?string

Search term to filter the product category's properties.

id?id|
description?description|
handle?handle|
parent_category_id?parent_category_id|
include_ancestors_tree?boolean

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.

include_descendants_tree?boolean

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.

created_at?

Filter by the category's creation date.

updated_at?

Filter by the category's update date.

$and?

Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.

$or?

The product category's $or.

name?name|
with_deleted?boolean

Whether to include deleted records in the result.

Header Parameters

x-publishable-api-key*string

Publishable API Key created in the Medusa Admin.

Response Body

application/json

application/json

text/plain

application/json

application/json

application/json

application/json

curl -X GET "https://{tenant}.api.myxclade.com/store/product-categories" \  -H "x-publishable-api-key: string"
{
  "limit": 0,
  "offset": 0,
  "count": 0,
  "product_categories": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "handle": "string",
      "rank": 0,
      "parent_category_id": "string",
      "parent_category": {},
      "category_children": [
        {}
      ],
      "metadata": {},
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "deleted_at": "2019-08-24T14:15:22Z",
      "products": [
        {
          "categories": [
            {}
          ],
          "type": {
            "id": "string",
            "metadata": {},
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z",
            "deleted_at": "2019-08-24T14:15:22Z",
            "value": "string"
          },
          "length": 0,
          "title": "string",
          "status": "draft",
          "options": [
            {
              "id": "string",
              "title": "string",
              "product": {},
              "product_id": "string",
              "values": [
                {
                  "id": "string",
                  "value": "string",
                  "option": {},
                  "option_id": "string",
                  "metadata": {},
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z",
                  "deleted_at": "2019-08-24T14:15:22Z"
                }
              ],
              "metadata": {},
              "created_at": "2019-08-24T14:15:22Z",
              "updated_at": "2019-08-24T14:15:22Z",
              "deleted_at": "2019-08-24T14:15:22Z"
            }
          ],
          "description": "string",
          "id": "string",
          "metadata": {},
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z",
          "variants": [
            {
              "options": [
                {
                  "id": "string",
                  "value": "string",
                  "option": {},
                  "option_id": "string",
                  "metadata": {},
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z",
                  "deleted_at": "2019-08-24T14:15:22Z"
                }
              ],
              "product": {},
              "length": 0,
              "title": "string",
              "metadata": {},
              "id": "string",
              "width": 0,
              "weight": 0,
              "height": 0,
              "origin_country": "string",
              "hs_code": "string",
              "mid_code": "string",
              "material": "string",
              "created_at": "2019-08-24T14:15:22Z",
              "updated_at": "2019-08-24T14:15:22Z",
              "deleted_at": "2019-08-24T14:15:22Z",
              "product_id": "string",
              "sku": "string",
              "barcode": "string",
              "ean": "string",
              "upc": "string",
              "allow_backorder": true,
              "manage_inventory": true,
              "inventory_quantity": 0,
              "variant_rank": 0,
              "calculated_price": {
                "id": "string",
                "is_calculated_price_price_list": true,
                "is_calculated_price_tax_inclusive": true,
                "calculated_amount": 0,
                "calculated_amount_with_tax": 0,
                "calculated_amount_without_tax": 0,
                "is_original_price_price_list": true,
                "is_original_price_tax_inclusive": true,
                "original_amount": 0,
                "currency_code": "usd",
                "calculated_price": {},
                "original_price": {},
                "original_amount_with_tax": 0,
                "original_amount_without_tax": 0
              }
            }
          ],
          "handle": "string",
          "subtitle": "string",
          "is_giftcard": true,
          "thumbnail": "string",
          "width": 0,
          "weight": 0,
          "height": 0,
          "origin_country": "string",
          "hs_code": "string",
          "mid_code": "string",
          "material": "string",
          "collection": {
            "id": "string",
            "title": "string",
            "handle": "string",
            "created_at": "2019-08-24T14:15:22Z",
            "updated_at": "2019-08-24T14:15:22Z",
            "deleted_at": "2019-08-24T14:15:22Z",
            "products": [
              {}
            ],
            "metadata": {}
          },
          "collection_id": "string",
          "type_id": "string",
          "tags": [
            {
              "id": "string",
              "value": "string",
              "created_at": "2019-08-24T14:15:22Z",
              "updated_at": "2019-08-24T14:15:22Z",
              "deleted_at": "2019-08-24T14:15:22Z",
              "metadata": {}
            }
          ],
          "images": [
            {
              "id": "string",
              "url": "string",
              "created_at": "2019-08-24T14:15:22Z",
              "updated_at": "2019-08-24T14:15:22Z",
              "deleted_at": "2019-08-24T14:15:22Z",
              "metadata": {},
              "rank": 0
            }
          ],
          "discountable": true,
          "external_id": "string",
          "deleted_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  ],
  "estimate_count": 0
}

{
  "message": "Discount must be set to dynamic",
  "type": "not_allowed"
}

"Unauthorized"
{
  "message": "Entity with id 1 was not found",
  "type": "not_found"
}
{
  "code": "unknown_error",
  "message": "The request conflicted with another request. You may retry the request with the provided Idempotency-Key.",
  "type": "QueryRunnerAlreadyReleasedError"
}
{
  "code": "invalid_request_error",
  "message": "Discount with code TEST already exists.",
  "type": "duplicate_error"
}

{
  "code": "api_error",
  "message": "An error occured while hashing password",
  "type": "database_error"
}