{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/woocommerce/json-schema/woocommerce-product-category-schema.json",
  "title": "ProductCategory",
  "description": "A product category used to organize the store catalog.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woocommerce-product-categories-api-openapi.yml#/components/schemas/ProductCategory",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Category unique identifier."
    },
    "name": {
      "type": "string",
      "description": "Category name."
    },
    "slug": {
      "type": "string",
      "description": "URL-friendly category identifier."
    },
    "parent": {
      "type": "integer",
      "description": "Parent category ID (0 for top-level categories)."
    },
    "description": {
      "type": "string",
      "description": "Category description."
    },
    "display": {
      "type": "string",
      "description": "Category archive display type. Options: default, products, subcategories, both."
    },
    "image": {
      "$ref": "#/$defs/ProductImage"
    },
    "menu_order": {
      "type": "integer",
      "description": "Menu order position for sorting."
    },
    "count": {
      "type": "integer",
      "description": "Number of products in the category."
    }
  },
  "$defs": {
    "ProductImage": {
      "type": "object",
      "description": "An image associated with a product.",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Image unique identifier."
        },
        "src": {
          "type": "string",
          "format": "uri",
          "description": "Image URL."
        },
        "name": {
          "type": "string",
          "description": "Image name."
        },
        "alt": {
          "type": "string",
          "description": "Image alternative text."
        }
      }
    }
  }
}