WooCommerce Product Attributes API

Retrieve global product attributes and their terms for filtering

Operations 4

GET /products/attributes WooCommerce List Product Attributes #
GET /products/attributes/{id} WooCommerce Retrieve a Product Attribute #
GET /products/attributes/{id}/terms WooCommerce List Product Attribute Terms #
GET /products/brands WooCommerce List Product Brands #

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/woocommerce-product-attributes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

woocommerce-product-attributes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WooCommerce Store Product Attributes API
  description: The WooCommerce Store API provides unauthenticated public REST endpoints for building customer-facing cart, checkout, and product functionality.
  version: v1
  contact:
    name: WooCommerce Developer Support
    url: https://developer.woocommerce.com/docs/apis/store-api/
  termsOfService: https://woocommerce.com/terms-conditions/
servers:
- url: https://example.com/wp-json/wc/store/v1
  description: Production Server (replace example.com with your store domain)
tags:
- name: Product Attributes
  description: Retrieve global product attributes and their terms for filtering
paths:
  /products/attributes:
    get:
      operationId: listStoreProductAttributes
      summary: WooCommerce List Product Attributes
      description: Returns all global product attributes registered in the store. Used to build attribute-based filters and variation selectors on the storefront.
      tags:
      - Product Attributes
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      responses:
        '200':
          description: List of product attributes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoreProductAttribute'
              examples:
                listStoreProductAttributes200Example:
                  summary: Default listStoreProductAttributes 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    name: Example Name
                    taxonomy: string-value
                    has_archives: true
                    order: string-value
                    count: 1
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/attributes/{id}:
    get:
      operationId: getStoreProductAttribute
      summary: WooCommerce Retrieve a Product Attribute
      description: Returns a single product attribute by its numeric ID.
      tags:
      - Product Attributes
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Product attribute details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreProductAttribute'
              examples:
                getStoreProductAttribute200Example:
                  summary: Default getStoreProductAttribute 200 response
                  x-microcks-default: true
                  value:
                    id: 1
                    name: Example Name
                    taxonomy: string-value
                    has_archives: true
                    order: string-value
                    count: 1
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/attributes/{id}/terms:
    get:
      operationId: listStoreProductAttributeTerms
      summary: WooCommerce List Product Attribute Terms
      description: Returns all terms (options) for a specific product attribute. Used to populate attribute-based filter dropdowns and swatches on the storefront.
      tags:
      - Product Attributes
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      responses:
        '200':
          description: List of attribute terms
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AttributeTerm'
              examples:
                listStoreProductAttributeTerms200Example:
                  summary: Default listStoreProductAttributeTerms 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    name: Example Name
                    slug: string-value
                    description: A sample description
                    count: 1
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/brands:
    get:
      operationId: listStoreProductBrands
      summary: WooCommerce List Product Brands
      description: Returns all product brands registered in the store. Brand support requires WooCommerce Brands or a compatible extension.
      tags:
      - Product Attributes
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      responses:
        '200':
          description: List of product brands
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoreBrand'
              examples:
                listStoreProductBrands200Example:
                  summary: Default listStoreProductBrands 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    name: Example Name
                    slug: string-value
                    description: A sample description
                    image:
                      id: {}
                      src: {}
                      thumbnail: {}
                      srcset: {}
                      sizes: {}
                      name: {}
                      alt: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Error:
      type: object
      description: Error response returned when a request fails.
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: string-value
        message:
          type: string
          description: Human-readable error message.
          example: string-value
        data:
          type: object
          description: Additional context including HTTP status.
          properties:
            status:
              type: integer
              description: HTTP status code.
          example:
            status: 1
    StoreProductImage:
      type: object
      description: Product image with thumbnail variants.
      properties:
        id:
          type: integer
          description: Image attachment ID.
          example: 1
        src:
          type: string
          format: uri
          description: Full-size image URL.
          example: https://example.com/path
        thumbnail:
          type: string
          format: uri
          description: Thumbnail image URL.
          example: https://example.com/path
        srcset:
          type: string
          description: Responsive image srcset attribute value.
          example: string-value
        sizes:
          type: string
          description: Responsive image sizes attribute value.
          example: string-value
        name:
          type: string
          description: Image file name.
          example: Example Name
        alt:
          type: string
          description: Image alternative text.
          example: string-value
    StoreProductAttribute:
      type: object
      description: A global product attribute for filtering and variation selection.
      properties:
        id:
          type: integer
          description: Attribute unique identifier.
          example: 1
        name:
          type: string
          description: Attribute label.
          example: Example Name
        taxonomy:
          type: string
          description: Attribute taxonomy slug (e.g. pa_color).
          example: string-value
        has_archives:
          type: boolean
          description: Whether the attribute has archive pages.
          example: true
        order:
          type: string
          description: How terms in this attribute are ordered (menu_order, name, name_num, id).
          example: string-value
        count:
          type: integer
          description: Number of terms in this attribute.
          example: 1
    AttributeTerm:
      type: object
      description: A term (option value) for a product attribute.
      properties:
        id:
          type: integer
          description: Term unique identifier.
          example: 1
        name:
          type: string
          description: Term display name.
          example: Example Name
        slug:
          type: string
          description: URL-friendly term slug.
          example: string-value
        description:
          type: string
          description: Term description.
          example: A sample description
        count:
          type: integer
          description: Number of products using this term.
          example: 1
    StoreBrand:
      type: object
      description: A product brand.
      properties:
        id:
          type: integer
          description: Brand unique identifier.
          example: 1
        name:
          type: string
          description: Brand display name.
          example: Example Name
        slug:
          type: string
          description: URL-friendly brand slug.
          example: string-value
        description:
          type: string
          description: Brand description.
          example: A sample description
        image:
          $ref: '#/components/schemas/StoreProductImage'
  parameters:
    page:
      name: page
      in: query
      description: Current page of the collection.
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
    id:
      name: id
      in: path
      description: Unique identifier for the resource.
      required: true
      schema:
        type: integer
    per_page:
      name: per_page
      in: query
      description: Maximum number of items per page (maximum 100).
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
externalDocs:
  description: WooCommerce Store API Documentation
  url: https://developer.woocommerce.com/docs/apis/store-api/