WooCommerce · Capability

WooCommerce REST API — Product Categories

WooCommerce REST API — Product Categories. 5 operations. Lead operation: WooCommerce List All Product Categories. Self-contained Naftiko capability covering one Woocommerce business surface.

Run with Naftiko WoocommerceProduct Categories

What You Can Do

GET
Listproductcategories — WooCommerce List All Product Categories
/v1/products/categories
POST
Createproductcategory — WooCommerce Create a Product Category
/v1/products/categories
GET
Getproductcategory — WooCommerce Retrieve a Product Category
/v1/products/categories/{id}
PUT
Updateproductcategory — WooCommerce Update a Product Category
/v1/products/categories/{id}
DELETE
Deleteproductcategory — WooCommerce Delete a Product Category
/v1/products/categories/{id}

MCP Tools

woocommerce-list-all-product-categories

WooCommerce List All Product Categories

read-only idempotent
woocommerce-create-product-category

WooCommerce Create a Product Category

woocommerce-retrieve-product-category

WooCommerce Retrieve a Product Category

read-only idempotent
woocommerce-update-product-category

WooCommerce Update a Product Category

idempotent
woocommerce-delete-product-category

WooCommerce Delete a Product Category

idempotent

Capability Spec

rest-product-categories.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: WooCommerce REST API — Product Categories
  description: 'WooCommerce REST API — Product Categories. 5 operations. Lead operation: WooCommerce List All Product Categories.
    Self-contained Naftiko capability covering one Woocommerce business surface.'
  tags:
  - Woocommerce
  - Product Categories
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    WOOCOMMERCE_API_KEY: WOOCOMMERCE_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-product-categories
    baseUri: https://example.com/wp-json/wc/v3
    description: WooCommerce REST API — Product Categories business capability. Self-contained, no shared references.
    resources:
    - name: products-categories
      path: /products/categories
      operations:
      - name: listproductcategories
        method: GET
        description: WooCommerce List All Product Categories
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: hide_empty
          in: query
          type: boolean
          description: Whether to hide resources not assigned to any products.
        - name: parent
          in: query
          type: integer
          description: Filter categories by parent category ID.
      - name: createproductcategory
        method: POST
        description: WooCommerce Create a Product Category
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: products-categories-id
      path: /products/categories/{id}
      operations:
      - name: getproductcategory
        method: GET
        description: WooCommerce Retrieve a Product Category
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateproductcategory
        method: PUT
        description: WooCommerce Update a Product Category
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteproductcategory
        method: DELETE
        description: WooCommerce Delete a Product Category
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: basic
      username: '{{env.WOOCOMMERCE_USER}}'
      password: '{{env.WOOCOMMERCE_PASS}}'
  exposes:
  - type: rest
    namespace: rest-product-categories-rest
    port: 8080
    description: REST adapter for WooCommerce REST API — Product Categories. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/products/categories
      name: products-categories
      description: REST surface for products-categories.
      operations:
      - method: GET
        name: listproductcategories
        description: WooCommerce List All Product Categories
        call: rest-product-categories.listproductcategories
        with:
          hide_empty: rest.hide_empty
          parent: rest.parent
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createproductcategory
        description: WooCommerce Create a Product Category
        call: rest-product-categories.createproductcategory
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/products/categories/{id}
      name: products-categories-id
      description: REST surface for products-categories-id.
      operations:
      - method: GET
        name: getproductcategory
        description: WooCommerce Retrieve a Product Category
        call: rest-product-categories.getproductcategory
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateproductcategory
        description: WooCommerce Update a Product Category
        call: rest-product-categories.updateproductcategory
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteproductcategory
        description: WooCommerce Delete a Product Category
        call: rest-product-categories.deleteproductcategory
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-product-categories-mcp
    port: 9090
    transport: http
    description: MCP adapter for WooCommerce REST API — Product Categories. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: woocommerce-list-all-product-categories
      description: WooCommerce List All Product Categories
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-product-categories.listproductcategories
      with:
        hide_empty: tools.hide_empty
        parent: tools.parent
      outputParameters:
      - type: object
        mapping: $.
    - name: woocommerce-create-product-category
      description: WooCommerce Create a Product Category
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-product-categories.createproductcategory
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: woocommerce-retrieve-product-category
      description: WooCommerce Retrieve a Product Category
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-product-categories.getproductcategory
      outputParameters:
      - type: object
        mapping: $.
    - name: woocommerce-update-product-category
      description: WooCommerce Update a Product Category
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-product-categories.updateproductcategory
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: woocommerce-delete-product-category
      description: WooCommerce Delete a Product Category
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-product-categories.deleteproductcategory
      outputParameters:
      - type: object
        mapping: $.