WooCommerce Store API

The WooCommerce Store API provides unauthenticated public REST endpoints for building customer-facing cart, checkout, and product functionality. Accessible under /wp-json/wc/store/v1/, it covers products, categories, attributes, tags, reviews, cart operations, checkout, and customer orders. Write operations require a nonce token from the cart response.

OpenAPI Specification

woocommerce-store-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: WooCommerce Store API
  description: >-
    The WooCommerce Store API provides unauthenticated public REST endpoints for
    building customer-facing cart, checkout, and product functionality. Unlike
    the authenticated REST API, it is designed for frontend integrations and
    does not expose sensitive store data or other customers' information. The API
    is accessible under the /wp-json/wc/store/v1/ namespace and covers products,
    product categories, attributes, tags, brands, reviews, cart operations,
    checkout, and current customer orders. It uses cookie-based sessions to
    scope cart and checkout state to the active shopper. Write operations (cart
    mutations, checkout) require a nonce token obtained from the cart response
    and passed as the Nonce header.
  version: 'v1'
  contact:
    name: WooCommerce Developer Support
    url: https://developer.woocommerce.com/docs/apis/store-api/
  termsOfService: https://woocommerce.com/terms-conditions/
externalDocs:
  description: WooCommerce Store API Documentation
  url: https://developer.woocommerce.com/docs/apis/store-api/
servers:
- url: https://example.com/wp-json/wc/store/v1
  description: Production Server (replace example.com with your store domain)
tags:
- name: Products
  description: Browse products available in the store catalog
- name: Product Categories
  description: Retrieve product categories for navigation and filtering
- name: Product Attributes
  description: Retrieve global product attributes and their terms for filtering
- name: Product Tags
  description: Retrieve product tags for filtering
- name: Product Reviews
  description: Retrieve customer reviews on products
- name: Cart
  description: Manage the current shopper's cart session including items, coupons, and shipping
- name: Checkout
  description: Submit and manage the checkout process for the current shopper
- name: Orders
  description: Retrieve orders belonging to the currently authenticated customer
paths:
  /products:
    get:
      operationId: listStoreProducts
      summary: WooCommerce List Products
      description: >-
        Returns a paginated list of published products available for purchase.
        Supports filtering by category, tag, attribute, price range, on-sale
        status, featured status, and keyword search. This endpoint is public
        and requires no authentication.
      tags:
      - Products
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - $ref: '#/components/parameters/search'
      - name: category
        in: query
        description: Filter products by category slug.
        required: false
        schema:
          type: string
        example: string-value
      - name: tag
        in: query
        description: Filter products by tag slug.
        required: false
        schema:
          type: string
        example: string-value
      - name: on_sale
        in: query
        description: Return only on-sale products when true.
        required: false
        schema:
          type: boolean
        example: true
      - name: featured
        in: query
        description: Return only featured products when true.
        required: false
        schema:
          type: boolean
        example: true
      - name: min_price
        in: query
        description: Minimum product price filter.
        required: false
        schema:
          type: string
        example: string-value
      - name: max_price
        in: query
        description: Maximum product price filter.
        required: false
        schema:
          type: string
        example: string-value
      - name: stock_status
        in: query
        description: "Filter by stock status. Options: instock, outofstock, onbackorder."
        required: false
        schema:
          type: string
          enum: [instock, outofstock, onbackorder]
        example: instock
      - name: orderby
        in: query
        description: >-
          Sort products by field. Options: date, id, include, title, slug,
          price, popularity, rating, menu_order.
        required: false
        schema:
          type: string
        example: string-value
      - name: order
        in: query
        description: "Sort direction. Options: asc, desc."
        required: false
        schema:
          type: string
          enum: [asc, desc]
        example: asc
      responses:
        '200':
          description: Paginated list of store products
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoreProduct'
              examples:
                listStoreProducts200Example:
                  summary: Default listStoreProducts 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    name: Example Name
                    slug: string-value
                    parent: 1
                    type: standard
                    variation: string-value
                    permalink: https://example.com/path
                    sku: string-value
                    short_description: A sample description
                    description: A sample description
                    on_sale: true
                    prices:
                      price: {}
                      regular_price: {}
                      sale_price: {}
                      price_range: {}
                      currency_code: {}
                      currency_symbol: {}
                      currency_decimal_separator: {}
                      currency_thousand_separator: {}
                      currency_prefix: {}
                      currency_suffix: {}
                    purchasable: true
                    images: &id001
                    - string-value
                    categories: &id002
                    - id: 1
                      name: Example Name
                      slug: string-value
                      link: https://example.com/path
                    tags: &id003
                    - id: 1
                      name: Example Name
                      slug: string-value
                      link: https://example.com/path
                    attributes: &id004
                    - id: 1
                      name: Example Name
                      taxonomy: string-value
                      has_variations: true
                      terms:
                      - id: {}
                        name: {}
                        slug: {}
                    average_rating: string-value
                    review_count: 1
                    is_in_stock: true
                    low_stock_remaining: 1
                    sold_individually: true
                    add_to_cart: &id005
                      text: string-value
                      description: A sample description
                      url: https://example.com/path
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/{id}:
    get:
      operationId: getStoreProduct
      summary: WooCommerce Retrieve a Product
      description: >-
        Returns a single published product by its numeric ID. Includes pricing,
        stock status, images, categories, tags, and available variations for
        variable products. Public endpoint requiring no authentication.
      tags:
      - Products
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Store product details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoreProduct'
              examples:
                getStoreProduct200Example:
                  summary: Default getStoreProduct 200 response
                  x-microcks-default: true
                  value:
                    id: 1
                    name: Example Name
                    slug: string-value
                    parent: 1
                    type: standard
                    variation: string-value
                    permalink: https://example.com/path
                    sku: string-value
                    short_description: A sample description
                    description: A sample description
                    on_sale: true
                    prices:
                      price: string-value
                      regular_price: string-value
                      sale_price: string-value
                      price_range: &id015
                        min_amount: string-value
                        max_amount: string-value
                      currency_code: string-value
                      currency_symbol: string-value
                      currency_decimal_separator: string-value
                      currency_thousand_separator: string-value
                      currency_prefix: string-value
                      currency_suffix: string-value
                    purchasable: true
                    images: *id001
                    categories: *id002
                    tags: *id003
                    attributes: *id004
                    average_rating: string-value
                    review_count: 1
                    is_in_stock: true
                    low_stock_remaining: 1
                    sold_individually: true
                    add_to_cart: *id005
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/collection-data:
    get:
      operationId: getProductCollectionData
      summary: WooCommerce Get Product Collection Data
      description: >-
        Returns aggregate data about a product collection including price ranges,
        attribute counts, and category counts. Used to populate filter widgets on
        shop and category archive pages without fetching full product records.
      tags:
      - Products
      parameters:
      - name: calculate_price_range
        in: query
        description: Whether to calculate and return the min/max price range.
        required: false
        schema:
          type: boolean
        example: true
      - name: calculate_attribute_counts
        in: query
        description: >-
          Comma-separated list of attribute slugs to count active terms for
          filter UIs.
        required: false
        schema:
          type: string
        example: string-value
      - name: calculate_rating_counts
        in: query
        description: Whether to calculate and return review rating counts.
        required: false
        schema:
          type: boolean
        example: true
      responses:
        '200':
          description: Product collection aggregate data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductCollectionData'
              examples:
                getProductCollectionData200Example:
                  summary: Default getProductCollectionData 200 response
                  x-microcks-default: true
                  value:
                    price_range: &id019
                      min_price: string-value
                      max_price: string-value
                    attribute_counts: &id020
                    - term: 1
                      count: 1
                    rating_counts: &id021
                    - rating: 1
                      count: 1
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/categories:
    get:
      operationId: listStoreProductCategories
      summary: WooCommerce List Product Categories
      description: >-
        Returns all product categories for storefront navigation and filtering.
        Only categories containing visible products are returned by default.
        Public endpoint requiring no authentication.
      tags:
      - Product Categories
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - name: hide_empty
        in: query
        description: Hide categories with no visible products.
        required: false
        schema:
          type: boolean
          default: true
        example: true
      - name: parent
        in: query
        description: Limit to children of a specific category ID.
        required: false
        schema:
          type: integer
        example: 1
      responses:
        '200':
          description: List of product categories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoreProductCategory'
              examples:
                listStoreProductCategories200Example:
                  summary: Default listStoreProductCategories 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    name: Example Name
                    slug: string-value
                    description: A sample description
                    parent: 1
                    count: 1
                    link: https://example.com/path
                    image:
                      id: {}
                      src: {}
                      thumbnail: {}
                      srcset: {}
                      sizes: {}
                      name: {}
                      alt: {}
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /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
  /products/tags:
    get:
      operationId: listStoreProductTags
      summary: WooCommerce List Product Tags
      description: Returns all product tags used in the store catalog.
      tags:
      - Product Tags
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      responses:
        '200':
          description: List of product tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoreProductTag'
              examples:
                listStoreProductTags200Example:
                  summary: Default listStoreProductTags 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    name: Example Name
                    slug: string-value
                    description: A sample description
                    count: 1
                    link: https://example.com/path
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /products/reviews:
    get:
      operationId: listStoreProductReviews
      summary: WooCommerce List Product Reviews
      description: >-
        Returns published product reviews. Can be filtered by product ID and
        star rating. Public endpoint requiring no authentication.
      tags:
      - Product Reviews
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      - name: product_id
        in: query
        description: Filter reviews by product ID.
        required: false
        schema:
          type: integer
        example: 1
      - name: rating
        in: query
        description: Filter reviews by star rating (1-5).
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 5
        example: 1
      responses:
        '200':
          description: List of product reviews
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoreReview'
              examples:
                listStoreProductReviews200Example:
                  summary: Default listStoreProductReviews 200 response
                  x-microcks-default: true
                  value:
                  - id: 1
                    date_created: '2026-05-03T14:30:00Z'
                    product_id: 1
                    reviewer: string-value
                    review: string-value
                    rating: 1
                    verified: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /cart:
    get:
      operationId: getCart
      summary: WooCommerce Get the Current Cart
      description: >-
        Returns the current customer's cart contents including items, coupons,
        fees, totals, and available shipping rates. The response also includes
        a nonce token in the X-WC-Store-API-Nonce header (and body) required for
        write operations.
      tags:
      - Cart
      responses:
        '200':
          description: Cart contents and totals
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
              examples:
                getCart200Example:
                  summary: Default getCart 200 response
                  x-microcks-default: true
                  value:
                    items: &id006
                    - string-value
                    coupons: &id007
                    - code: string-value
                      discount_type: standard
                      totals: {}
                    fees: &id008
                    - id: '500123'
                      name: Example Name
                      totals: {}
                    totals:
                      total_items: string-value
                      total_items_tax: string-value
                      total_fees: string-value
                      total_fees_tax: string-value
                      total_discount: string-value
                      total_discount_tax: string-value
                      total_shipping: string-value
                      total_shipping_tax: string-value
                      total_price: string-value
                      total_tax: string-value
                      tax_lines: &id009
                      - name: Example Name
                        price: string-value
                        rate: string-value
                    shipping_rates: &id010
                    - string-value
                    billing_address:
                      first_name: Example Name
                      last_name: Example Name
                      company: string-value
                      address_1: string-value
                      address_2: string-value
                      city: string-value
                      state: string-value
                      postcode: string-value
                      country: string-value
                      email: [email protected]
                      phone: string-value
                    shipping_address:
                      first_name: Example Name
                      last_name: Example Name
                      company: string-value
                      address_1: string-value
                      address_2: string-value
                      city: string-value
                      state: string-value
                      postcode: string-value
                      country: string-value
                      email: [email protected]
                      phone: string-value
                    has_calculated_shipping: true
                    needs_payment: true
                    needs_shipping: true
                    items_count: 1
                    items_weight: 10.5
                    cross_sells: &id011
                    - string-value
                    errors: &id012
                    - code: string-value
                      message: string-value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /cart/add-item:
    post:
      operationId: addCartItem
      summary: WooCommerce Add an Item to the Cart
      description: >-
        Adds a product or variation to the cart. Requires a product_id, an
        optional variation_id, and quantity. Custom item data can be passed via
        the item_data array. Requires the Nonce header from a prior cart GET.
      tags:
      - Cart
      parameters:
      - $ref: '#/components/parameters/nonce'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCartItemInput'
      responses:
        '200':
          description: Updated cart after adding item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
              examples:
                addCartItem200Example:
                  summary: Default addCartItem 200 response
                  x-microcks-default: true
                  value:
                    items: *id006
                    coupons: *id007
                    fees: *id008
                    totals:
                      total_items: string-value
                      total_items_tax: string-value
                      total_fees: string-value
                      total_fees_tax: string-value
                      total_discount: string-value
                      total_discount_tax: string-value
                      total_shipping: string-value
                      total_shipping_tax: string-value
                      total_price: string-value
                      total_tax: string-value
                      tax_lines: *id009
                    shipping_rates: *id010
                    billing_address:
                      first_name: Example Name
                      last_name: Example Name
                      company: string-value
                      address_1: string-value
                      address_2: string-value
                      city: string-value
                      state: string-value
                      postcode: string-value
                      country: string-value
                      email: [email protected]
                      phone: string-value
                    shipping_address:
                      first_name: Example Name
                      last_name: Example Name
                      company: string-value
                      address_1: string-value
                      address_2: string-value
                      city: string-value
                      state: string-value
                      postcode: string-value
                      country: string-value
                      email: [email protected]
                      phone: string-value
                    has_calculated_shipping: true
                    needs_payment: true
                    needs_shipping: true
                    items_count: 1
                    items_weight: 10.5
                    cross_sells: *id011
                    errors: *id012
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /cart/remove-item:
    post:
      operationId: removeCartItem
      summary: WooCommerce Remove an Item from the Cart
      description: >-
        Removes a cart item identified by its unique cart item key. Requires the
        Nonce header.
      tags:
      - Cart
      parameters:
      - $ref: '#/components/parameters/nonce'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              properties:
                key:
                  type: string
                  description: The unique cart item key to remove.
      responses:
        '200':
          description: Updated cart after removing item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
              examples:
                removeCartItem200Example:
                  summary: Default removeCartItem 200 response
                  x-microcks-default: true
                  value:
                    items: *id006
                    coupons: *id007
                    fees: *id008
                    totals:
                      total_items: string-value
                      total_items_tax: string-value
                      total_fees: string-value
                      total_fees_tax: string-value
                      total_discount: string-value
                      total_discount_tax: string-value
                      total_shipping: string-value
                      total_shipping_tax: string-value
                      total_price: string-value
                      total_tax: string-value
                      tax_lines: *id009
                    shipping_rates: *id010
                    billing_address:
                      first_name: Example Name
                      last_name: Example Name
                      company: string-value
                      address_1: string-value
                      address_2: string-value
                      city: string-value
                      state: string-value
                      postcode: string-value
                      country: string-value
                      email: [email protected]
                      phone: string-value
                    shipping_address:
                      first_name: Example Name
                      last_name: Example Name
                      company: string-value
                      address_1: string-value
                      address_2: string-value
                      city: string-value
                      state: string-value
                      postcode: string-value
                      country: string-value
                      email: [email protected]
                      phone: string-value
                    has_calculated_shipping: true
                    needs_payment: true
                    needs_shipping: true
                    items_count: 1
                    items_weight: 10.5
                    cross_sells: *id011
                    errors: *id012
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /cart/update-item:
    post:
      operationId: updateCartItem
      summary: WooCommerce Update a Cart Item Quantity
      description: >-
        Updates the quantity of a cart item identified by its key. Set quantity
        to 0 to remove the item. Requires the Nonce header.
      tags:
      - Cart
      parameters:
      - $ref: '#/components/parameters/nonce'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - key
              - quantity
              properties:
                key:
                  type: string
                  description: Cart item key to update.
                quantity:
                  type: integer
                  description: New quantity. Set to 0 to remove the item.
                  minimum: 0
      responses:
        '200':
          description: Updated cart
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
              examples:
                updateCartItem200Example:
                  summary: Default updateCartItem 200 response
                  x-microcks-default: true
                  value:
                    items: *id006
                    cou

# --- truncated at 32 KB (102 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/openapi/woocommerce-store-api-openapi.yml