openapi: 3.0.3
info:
  title: WooCommerce REST API
  version: 3.0.0
  description: |-
    A hand-written OpenAPI description of the **WooCommerce REST API v3**, served through Swagger UI
    with a live `Try it out` proxy so you can hit a real store without fighting CORS.

    ---

    ### Authentication

    WooCommerce issues a **consumer key** and **consumer secret** under
    *WooCommerce → Settings → Advanced → REST API*. Two ways to present them:

    | Transport | How | When |
    | --- | --- | --- |
    | HTTP Basic | key as username, secret as password | Any HTTPS store. Preferred. |
    | Query string | `?consumer_key=…&consumer_secret=…` | Plain HTTP, or hosts that strip `Authorization` |

    Keys carry a permission level — *read*, *write*, or *read/write*. A read key hitting `POST /products`
    returns **403**, not 401; the request authenticated fine, it just wasn't allowed.

    When this documentation is served with a store configured, the **`Try it out`** button routes through
    this app's own gateway, which attaches the credentials server-side. Your browser never sees them.

    ### Conventions worth knowing before you write a client

    - **Money is a string.** `total: "2998.00"`, not `2998.00`. Parse as decimal; float arithmetic on
      order totals will eventually cost someone a rupee.
    - **`PUT` is a merge, not a replace.** Send only the fields you intend to change.
    - **Pagination lives in headers.** `X-WP-Total` and `X-WP-TotalPages`, plus RFC 5988 `Link` headers.
      `per_page` is capped at 100.
    - **`context=view` vs `context=edit`.** `edit` returns fields that require elevated capabilities and
      is what you want for any write-then-read round trip.
    - **Deletes usually trash.** Pass `?force=true` for permanent removal. Some resources (terms, refunds,
      webhooks) have no trash and *require* `force=true`.
    - **Batch endpoints are not transactional.** A `/batch` call applies each entry independently; inspect
      every element of the response for an `error` key.
    - **Errors are uniform.** Every failure returns `{ code, message, data: { status } }`.

    ### The point of this demo: API surface vs MCP surface

    This spec is deliberately complete — **133 operations** across products, orders, customers,
    coupons, reports and store configuration. That completeness is exactly what makes it a good
    counterpoint to an MCP server.

    - **REST + OpenAPI** is a contract for *programmers*. It describes every field and every filter, and
      assumes a developer reads it, decides which of the 90 operations to call, chains them, and handles
      the errors.
    - **MCP** is a contract for *models*. The companion WooCommerce MCP server wraps this same surface in
      roughly a dozen intent-shaped tools (`find_orders`, `check_stock`, `refund_order`), each with a
      narrow schema, a description written for a reader with no prior context, and results already shaped
      for reasoning rather than rendering.

    Same store, same data, same underlying HTTP calls. What differs is who the interface is written for.
  contact:
    name: KR3 Infosys
    url: https://kr3infosys.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://woocommerce.com/terms-conditions/
externalDocs:
  description: Official WooCommerce REST API documentation
  url: https://woocommerce.github.io/woocommerce-rest-api-docs/
servers:
  - url: https://api.autaxe.com/api/wc
    description: Gateway on this host → https://autaxe.com (credentials attached server-side, read-only)
  - url: https://autaxe.com/wp-json/wc/v3
    description: The WooCommerce store directly (browser calls will be blocked by CORS)
  - url: https://{store_domain}/wp-json/{api_version}
    description: Any WooCommerce store
    variables:
      store_domain:
        default: example.com
        description: Domain of the WordPress site hosting WooCommerce.
      api_version:
        default: wc/v3
        enum:
          - wc/v3
          - wc/v2
          - wc/v1
        description: REST namespace. `wc/v3` unless you are maintaining something old.
tags:
  - name: Products
    description: The catalogue. Simple, grouped, external and variable products, with stock, pricing and taxonomy.
    externalDocs:
      description: WooCommerce product properties
      url: https://woocommerce.github.io/woocommerce-rest-api-docs/#products
  - name: Product variations
    description: Purchasable combinations belonging to a variable product.
  - name: Product categories
    description: Hierarchical catalogue taxonomy.
  - name: Product tags
    description: Flat catalogue taxonomy.
  - name: Product attributes
    description: Global attribute definitions and their terms, e.g. Size → S/M/L.
  - name: Product shipping classes
    description: Groupings that shipping methods can price differently.
  - name: Product reviews
    description: Customer reviews and their moderation status.
  - name: Orders
    description: Orders, their line items and totals. The busiest surface in most integrations.
    externalDocs:
      description: WooCommerce order properties
      url: https://woocommerce.github.io/woocommerce-rest-api-docs/#orders
  - name: Order notes
    description: Internal and customer-facing notes attached to an order.
  - name: Order refunds
    description: Refunds against an order. Creating one can move real money.
  - name: Customers
    description: WordPress users with the customer role, plus their addresses.
  - name: Coupons
    description: Discount codes and the rules constraining them.
  - name: Reports
    description: Pre-aggregated sales, top sellers and per-status totals.
  - name: Tax rates
    description: Tax rate rows and tax classes.
  - name: Shipping
    description: Zones, the locations that route into them, and method instances.
  - name: Payment gateways
    description: Installed gateways and their settings.
  - name: Settings
    description: Store settings, grouped as they appear in wp-admin.
  - name: Webhooks
    description: Outbound HTTP callbacks. Use these instead of polling; verify `X-WC-Webhook-Signature` on every delivery.
  - name: System status
    description: Diagnostics and maintenance tools.
  - name: Data
    description: "Read-only reference data: countries, states, currencies, continents."
security:
  - basicAuth: []
  - consumerKeyQuery: []
    consumerSecretQuery: []
paths:
  /products:
    get:
      tags:
        - Products
      operationId: listProducts
      summary: List products
      description: |-
        Retrieve a paginated collection of products. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Filters combine with AND. `search` matches the title, SKU-ish content and excerpt depending on store configuration — use `sku` for an exact SKU lookup.
      parameters:
        - &a9
          $ref: "#/components/parameters/Context"
        - &a10
          $ref: "#/components/parameters/Page"
        - &a11
          $ref: "#/components/parameters/PerPage"
        - &a12
          $ref: "#/components/parameters/Search"
        - &a13
          $ref: "#/components/parameters/Offset"
        - &a14
          $ref: "#/components/parameters/Order"
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - date
              - id
              - include
              - title
              - slug
              - modified
              - menu_order
              - price
              - popularity
              - rating
            default: date
        - &a15
          $ref: "#/components/parameters/Include"
        - &a16
          $ref: "#/components/parameters/Exclude"
        - &a17
          $ref: "#/components/parameters/After"
        - &a18
          $ref: "#/components/parameters/Before"
        - &a19
          $ref: "#/components/parameters/ModifiedAfter"
        - &a20
          $ref: "#/components/parameters/ModifiedBefore"
        - &a21
          $ref: "#/components/parameters/DatesAreGmt"
        - $ref: "#/components/parameters/Parent"
        - $ref: "#/components/parameters/ParentExclude"
        - name: slug
          in: query
          description: Limit result set to products with a specific slug.
          schema:
            type: string
        - name: status
          in: query
          description: Limit result set to products assigned a specific status.
          schema:
            type: string
            enum:
              - any
              - draft
              - pending
              - private
              - publish
            default: any
        - name: type
          in: query
          description: Limit result set to products assigned a specific type.
          schema:
            type: string
            enum:
              - simple
              - grouped
              - external
              - variable
        - name: sku
          in: query
          description: Limit result set to products with a specific SKU. Comma-separate for several.
          schema:
            type: string
            example: POUR-CER-01
        - name: featured
          in: query
          description: Limit result set to featured products.
          schema:
            type: boolean
        - name: category
          in: query
          description: Limit result set to products assigned a specific category ID.
          schema:
            type: string
            example: "19"
        - name: tag
          in: query
          description: Limit result set to products assigned a specific tag ID.
          schema:
            type: string
        - name: shipping_class
          in: query
          description: Limit result set to products assigned a specific shipping class ID.
          schema:
            type: string
        - name: attribute
          in: query
          description: Limit result set to products with a specific attribute taxonomy.
          schema:
            type: string
            example: pa_size
        - name: attribute_term
          in: query
          description: Limit result set to products with a specific attribute term ID. Requires `attribute`.
          schema:
            type: string
        - name: tax_class
          in: query
          description: Limit result set to products with a specific tax class.
          schema:
            type: string
        - name: on_sale
          in: query
          description: Limit result set to products on sale.
          schema:
            type: boolean
        - name: min_price
          in: query
          description: Limit result set to products based on a minimum price.
          schema:
            type: string
        - name: max_price
          in: query
          description: Limit result set to products based on a maximum price.
          schema:
            type: string
        - name: stock_status
          in: query
          description: Limit result set to products with a specific stock status.
          schema:
            type: string
            enum:
              - instock
              - outofstock
              - onbackorder
      responses:
        "200":
          description: A page of products.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Product"
        "400": &a1
          $ref: "#/components/responses/BadRequest"
        "401": &a2
          $ref: "#/components/responses/Unauthorized"
        "403": &a3
          $ref: "#/components/responses/Forbidden"
        "429": &a4
          $ref: "#/components/responses/TooManyRequests"
        "500": &a5
          $ref: "#/components/responses/ServerError"
    post:
      tags:
        - Products
      operationId: createProduct
      summary: Create a product
      description: Create a new product. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The product to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Product"
      responses:
        "201":
          description: The created product.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": &a8
          $ref: "#/components/responses/MethodNotAllowed"
        "429": *a4
        "500": *a5
  /products/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Products
      operationId: getProduct
      summary: Retrieve a product
      description: Retrieve a single product by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested product.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": &a6
          $ref: "#/components/responses/NotFound"
        "429": *a4
        "500": *a5
    put:
      tags:
        - Products
      operationId: updateProduct
      summary: Update a product
      description: Partially update a product. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Product"
      responses:
        "200":
          description: The updated product.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": &a7
          $ref: "#/components/responses/MethodNotAllowed"
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Products
      operationId: deleteProduct
      summary: Delete a product
      description: |-
        Move the product to the trash, or delete it permanently with `force=true`.

        Deleting a variable product also removes its variations. Trashed products keep their IDs and can be restored from wp-admin.
      parameters:
        - $ref: "#/components/parameters/Force"
      responses:
        "200":
          description: The deleted product.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/batch:
    post:
      tags:
        - Products
      operationId: batchProducts
      summary: Batch create, update and delete products
      description: Apply up to 100 create, update and delete operations to products in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/{product_id}/variations:
    get:
      tags:
        - Product variations
      operationId: listProductVariations
      summary: List variations
      description: |-
        Retrieve a paginated collection of variations. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Variations only exist on products whose `type` is `variable`. The parent product’s `attributes` entries must have `variation: true` before a matching variation can be created.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - &a26
          $ref: "#/components/parameters/OrderBy"
        - *a15
        - *a16
        - *a17
        - *a18
        - *a19
        - *a20
        - *a21
        - name: slug
          in: query
          description: Limit result set to variations with a specific slug.
          schema:
            type: string
        - name: status
          in: query
          description: Limit result set to variations assigned a specific status.
          schema:
            type: string
            enum:
              - any
              - draft
              - pending
              - private
              - publish
            default: any
        - name: sku
          in: query
          description: Limit result set to variations with a specific SKU.
          schema:
            type: string
        - name: on_sale
          in: query
          description: Limit result set to variations on sale.
          schema:
            type: boolean
        - name: min_price
          in: query
          description: Limit result set to variations based on a minimum price.
          schema:
            type: string
        - name: max_price
          in: query
          description: Limit result set to variations based on a maximum price.
          schema:
            type: string
        - name: stock_status
          in: query
          description: Limit result set to variations with a specific stock status.
          schema:
            type: string
            enum:
              - instock
              - outofstock
              - onbackorder
      responses:
        "200":
          description: A page of variations.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductVariation"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product variations
      operationId: createProductVariation
      summary: Create a variation
      description: Create a new variation. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The variation to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductVariation"
      responses:
        "201":
          description: The created variation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductVariation"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters: &a23
      - &a22
        $ref: "#/components/parameters/ProductIdPath"
  /products/{product_id}/variations/{id}:
    parameters:
      - *a22
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product variations
      operationId: getProductVariation
      summary: Retrieve a variation
      description: Retrieve a single variation by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested variation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductVariation"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product variations
      operationId: updateProductVariation
      summary: Update a variation
      description: Partially update a variation. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductVariation"
      responses:
        "200":
          description: The updated variation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductVariation"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product variations
      operationId: deleteProductVariation
      summary: Delete a variation
      description: Move the variation to the trash, or delete it permanently with `force=true`.
      parameters:
        - $ref: "#/components/parameters/Force"
      responses:
        "200":
          description: The deleted variation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductVariation"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/{product_id}/variations/batch:
    post:
      tags:
        - Product variations
      operationId: batchProductVariations
      summary: Batch create, update and delete variations
      description: Apply up to 100 create, update and delete operations to variations in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters: *a23
  /products/categories:
    get:
      tags:
        - Product categories
      operationId: listProductCategories
      summary: List product categories
      description: Retrieve a paginated collection of product categories. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - name
              - id
              - include
              - slug
              - term_group
              - description
              - count
            default: name
        - *a15
        - *a16
        - $ref: "#/components/parameters/HideEmpty"
        - $ref: "#/components/parameters/Parent"
        - name: product
          in: query
          description: Limit result set to categories assigned to a specific product.
          schema:
            type: integer
        - name: slug
          in: query
          description: Limit result set to categories with a specific slug.
          schema:
            type: string
      responses:
        "200":
          description: A page of product categories.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductCategory"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product categories
      operationId: createProductCategory
      summary: Create a product category
      description: Create a new product category. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The product category to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductCategory"
      responses:
        "201":
          description: The created product category.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductCategory"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/categories/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product categories
      operationId: getProductCategory
      summary: Retrieve a product category
      description: Retrieve a single product category by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested product category.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductCategory"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product categories
      operationId: updateProductCategory
      summary: Update a product category
      description: Partially update a product category. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductCategory"
      responses:
        "200":
          description: The updated product category.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductCategory"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product categories
      operationId: deleteProductCategory
      summary: Delete a product category
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted product category.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductCategory"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/categories/batch:
    post:
      tags:
        - Product categories
      operationId: batchProductCategories
      summary: Batch create, update and delete product categories
      description: Apply up to 100 create, update and delete operations to product categories in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/tags:
    get:
      tags:
        - Product tags
      operationId: listProductTags
      summary: List product tags
      description: Retrieve a paginated collection of product tags. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - name
              - id
              - include
              - slug
              - term_group
              - description
              - count
            default: name
        - *a15
        - *a16
        - $ref: "#/components/parameters/HideEmpty"
        - name: product
          in: query
          description: Limit result set to tags assigned to a specific product.
          schema:
            type: integer
        - name: slug
          in: query
          description: Limit result set to tags with a specific slug.
          schema:
            type: string
      responses:
        "200":
          description: A page of product tags.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductTag"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product tags
      operationId: createProductTag
      summary: Create a product tag
      description: Create a new product tag. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The product tag to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductTag"
      responses:
        "201":
          description: The created product tag.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductTag"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/tags/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product tags
      operationId: getProductTag
      summary: Retrieve a product tag
      description: Retrieve a single product tag by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested product tag.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductTag"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product tags
      operationId: updateProductTag
      summary: Update a product tag
      description: Partially update a product tag. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductTag"
      responses:
        "200":
          description: The updated product tag.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductTag"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product tags
      operationId: deleteProductTag
      summary: Delete a product tag
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted product tag.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductTag"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/tags/batch:
    post:
      tags:
        - Product tags
      operationId: batchProductTags
      summary: Batch create, update and delete product tags
      description: Apply up to 100 create, update and delete operations to product tags in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/attributes:
    get:
      tags:
        - Product attributes
      operationId: listProductAttributes
      summary: List product attributes
      description: |-
        Retrieve a paginated collection of product attributes. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Global attributes are store-wide taxonomies (`pa_*`). Per-product custom attributes are not returned here — they live on the product itself.
      parameters:
        - *a9
      responses:
        "200":
          description: A page of product attributes.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductAttribute"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product attributes
      operationId: createProductAttribute
      summary: Create a product attribute
      description: Create a new product attribute. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The product attribute to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductAttribute"
      responses:
        "201":
          description: The created product attribute.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttribute"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/attributes/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product attributes
      operationId: getProductAttribute
      summary: Retrieve a product attribute
      description: Retrieve a single product attribute by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested product attribute.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttribute"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product attributes
      operationId: updateProductAttribute
      summary: Update a product attribute
      description: Partially update a product attribute. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductAttribute"
      responses:
        "200":
          description: The updated product attribute.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttribute"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product attributes
      operationId: deleteProductAttribute
      summary: Delete a product attribute
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted product attribute.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttribute"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/attributes/batch:
    post:
      tags:
        - Product attributes
      operationId: batchProductAttributes
      summary: Batch create, update and delete product attributes
      description: Apply up to 100 create, update and delete operations to product attributes in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/attributes/{attribute_id}/terms:
    get:
      tags:
        - Product attributes
      operationId: listProductAttributeTerms
      summary: List attribute terms
      description: Retrieve a paginated collection of attribute terms. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - name
              - id
              - include
              - slug
              - term_group
              - description
              - count
              - menu_order
            default: name
        - *a15
        - *a16
        - $ref: "#/components/parameters/HideEmpty"
        - name: product
          in: query
          description: Limit result set to terms assigned to a specific product.
          schema:
            type: integer
        - name: slug
          in: query
          description: Limit result set to terms with a specific slug.
          schema:
            type: string
      responses:
        "200":
          description: A page of attribute terms.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductAttributeTerm"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product attributes
      operationId: createProductAttributeTerm
      summary: Create a attribute term
      description: Create a new attribute term. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The attribute term to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductAttributeTerm"
      responses:
        "201":
          description: The created attribute term.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttributeTerm"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters: &a25
      - &a24
        $ref: "#/components/parameters/AttributeIdPath"
  /products/attributes/{attribute_id}/terms/{id}:
    parameters:
      - *a24
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product attributes
      operationId: getProductAttributeTerm
      summary: Retrieve a attribute term
      description: Retrieve a single attribute term by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested attribute term.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttributeTerm"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product attributes
      operationId: updateProductAttributeTerm
      summary: Update a attribute term
      description: Partially update a attribute term. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductAttributeTerm"
      responses:
        "200":
          description: The updated attribute term.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttributeTerm"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product attributes
      operationId: deleteProductAttributeTerm
      summary: Delete a attribute term
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted attribute term.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductAttributeTerm"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/attributes/{attribute_id}/terms/batch:
    post:
      tags:
        - Product attributes
      operationId: batchProductAttributeTerms
      summary: Batch create, update and delete attribute terms
      description: Apply up to 100 create, update and delete operations to attribute terms in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters: *a25
  /products/shipping_classes:
    get:
      tags:
        - Product shipping classes
      operationId: listProductShippingClasses
      summary: List shipping classes
      description: Retrieve a paginated collection of shipping classes. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - name
              - id
              - include
              - slug
              - term_group
              - description
              - count
            default: name
        - *a15
        - *a16
        - $ref: "#/components/parameters/HideEmpty"
        - name: product
          in: query
          description: Limit result set to classes assigned to a specific product.
          schema:
            type: integer
        - name: slug
          in: query
          description: Limit result set to classes with a specific slug.
          schema:
            type: string
      responses:
        "200":
          description: A page of shipping classes.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductShippingClass"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product shipping classes
      operationId: createProductShippingClass
      summary: Create a shipping class
      description: Create a new shipping class. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The shipping class to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductShippingClass"
      responses:
        "201":
          description: The created shipping class.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductShippingClass"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/shipping_classes/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product shipping classes
      operationId: getProductShippingClass
      summary: Retrieve a shipping class
      description: Retrieve a single shipping class by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested shipping class.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductShippingClass"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product shipping classes
      operationId: updateProductShippingClass
      summary: Update a shipping class
      description: Partially update a shipping class. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductShippingClass"
      responses:
        "200":
          description: The updated shipping class.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductShippingClass"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product shipping classes
      operationId: deleteProductShippingClass
      summary: Delete a shipping class
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted shipping class.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductShippingClass"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/shipping_classes/batch:
    post:
      tags:
        - Product shipping classes
      operationId: batchProductShippingClasses
      summary: Batch create, update and delete shipping classes
      description: Apply up to 100 create, update and delete operations to shipping classes in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/reviews:
    get:
      tags:
        - Product reviews
      operationId: listProductReviews
      summary: List product reviews
      description: Retrieve a paginated collection of product reviews. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - *a26
        - *a15
        - *a16
        - *a17
        - *a18
        - *a19
        - *a20
        - *a21
        - name: product
          in: query
          description: Limit result set to reviews assigned to specific product IDs.
          schema:
            type: array
            items:
              type: integer
          style: form
          explode: false
        - name: status
          in: query
          description: Limit result set to reviews with a specific status.
          schema:
            type: string
            enum:
              - all
              - hold
              - approved
              - spam
              - trash
            default: approved
        - name: reviewer_email
          in: query
          description: Limit result set to reviews from a specific email address.
          schema:
            type: string
            format: email
      responses:
        "200":
          description: A page of product reviews.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ProductReview"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Product reviews
      operationId: createProductReview
      summary: Create a product review
      description: Create a new product review. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The product review to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductReview"
      responses:
        "201":
          description: The created product review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductReview"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /products/reviews/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Product reviews
      operationId: getProductReview
      summary: Retrieve a product review
      description: Retrieve a single product review by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested product review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductReview"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Product reviews
      operationId: updateProductReview
      summary: Update a product review
      description: Partially update a product review. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProductReview"
      responses:
        "200":
          description: The updated product review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductReview"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Product reviews
      operationId: deleteProductReview
      summary: Delete a product review
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted product review.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductReview"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /products/reviews/batch:
    post:
      tags:
        - Product reviews
      operationId: batchProductReviews
      summary: Batch create, update and delete product reviews
      description: Apply up to 100 create, update and delete operations to product reviews in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /orders:
    get:
      tags:
        - Orders
      operationId: listOrders
      summary: List orders
      description: |-
        Retrieve a paginated collection of orders. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        The single most useful endpoint for operations work: reconciliation, fulfilment queues and support lookups all start here. Order totals are strings — parse them as decimals, never as floats, before doing arithmetic.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - date
              - id
              - include
              - title
              - slug
              - modified
            default: date
        - *a15
        - *a16
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/ModifiedAfter"
        - $ref: "#/components/parameters/ModifiedBefore"
        - $ref: "#/components/parameters/DatesAreGmt"
        - $ref: "#/components/parameters/Parent"
        - $ref: "#/components/parameters/ParentExclude"
        - name: status
          in: query
          description: Limit result set to orders assigned a specific status. Repeatable; `any` returns everything including trash.
          schema:
            type: array
            items:
              type: string
              enum:
                - any
                - pending
                - processing
                - on-hold
                - completed
                - cancelled
                - refunded
                - failed
                - trash
                - checkout-draft
            default:
              - any
          style: form
          explode: false
        - name: customer
          in: query
          description: Limit result set to orders assigned a specific customer (user ID). Use `0` for guests.
          schema:
            type: integer
            example: 57
        - name: product
          in: query
          description: Limit result set to orders containing a specific product ID.
          schema:
            type: integer
        - name: dp
          in: query
          description: Number of decimal points to use in each monetary value.
          schema:
            type: integer
            default: 2
        - name: search
          in: query
          description: Search orders. Matches billing details, item names and order IDs depending on store configuration.
          schema:
            type: string
      responses:
        "200":
          description: A page of orders.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Order"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Orders
      operationId: createOrder
      summary: Create a order
      description: Create a new order. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The order to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Order"
      responses:
        "201":
          description: The created order.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /orders/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Orders
      operationId: getOrder
      summary: Retrieve a order
      description: Retrieve a single order by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested order.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Orders
      operationId: updateOrder
      summary: Update a order
      description: Partially update a order. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Order"
      responses:
        "200":
          description: The updated order.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Orders
      operationId: deleteOrder
      summary: Delete a order
      description: |-
        Move the order to the trash, or delete it permanently with `force=true`.

        Trashed orders are still visible in wp-admin and still hold their order number. `force=true` is irreversible and removes the line items too.
      parameters:
        - $ref: "#/components/parameters/Force"
      responses:
        "200":
          description: The deleted order.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /orders/batch:
    post:
      tags:
        - Orders
      operationId: batchOrders
      summary: Batch create, update and delete orders
      description: Apply up to 100 create, update and delete operations to orders in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /orders/{order_id}/notes:
    get:
      tags:
        - Order notes
      operationId: listOrderNotes
      summary: List order notes
      description: |-
        Retrieve a paginated collection of order notes. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Notes cannot be updated once created — create a new one instead. Setting `customer_note: true` emails the note to the buyer.
      parameters:
        - *a9
        - name: type
          in: query
          description: Limit result set to notes of a specific type.
          schema:
            type: string
            enum:
              - any
              - customer
              - internal
            default: any
      responses:
        "200":
          description: A page of order notes.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/OrderNote"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Order notes
      operationId: createOrderNote
      summary: Create a order note
      description: Create a new order note. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The order note to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OrderNote"
      responses:
        "201":
          description: The created order note.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderNote"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters:
      - &a27
        $ref: "#/components/parameters/OrderIdPath"
  /orders/{order_id}/notes/{id}:
    parameters:
      - *a27
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Order notes
      operationId: getOrderNote
      summary: Retrieve a order note
      description: Retrieve a single order note by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested order note.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderNote"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Order notes
      operationId: deleteOrderNote
      summary: Delete a order note
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted order note.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderNote"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /orders/{order_id}/refunds:
    get:
      tags:
        - Order refunds
      operationId: listOrderRefunds
      summary: List refunds
      description: |-
        Retrieve a paginated collection of refunds. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Refunds are immutable: there is no `PUT`. Creating a refund with `api_refund: true` also asks the payment gateway to move the money, so treat `POST` here as a real financial action, not a bookkeeping entry.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - *a26
        - *a15
        - *a16
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/DatesAreGmt"
        - $ref: "#/components/parameters/Parent"
        - $ref: "#/components/parameters/ParentExclude"
        - name: dp
          in: query
          description: Number of decimal points to use in each monetary value.
          schema:
            type: integer
            default: 2
      responses:
        "200":
          description: A page of refunds.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/OrderRefund"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Order refunds
      operationId: createOrderRefund
      summary: Create a refund
      description: Create a new refund. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The refund to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OrderRefund"
      responses:
        "201":
          description: The created refund.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderRefund"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters:
      - &a28
        $ref: "#/components/parameters/OrderIdPath"
  /orders/{order_id}/refunds/{id}:
    parameters:
      - *a28
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Order refunds
      operationId: getOrderRefund
      summary: Retrieve a refund
      description: Retrieve a single refund by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested refund.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderRefund"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Order refunds
      operationId: deleteOrderRefund
      summary: Delete a refund
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted refund.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderRefund"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /customers:
    get:
      tags:
        - Customers
      operationId: listCustomers
      summary: List customers
      description: |-
        Retrieve a paginated collection of customers. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Customers are WordPress users. Guest checkouts never appear here — look for `customer_id: 0` orders instead.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - id
              - include
              - name
              - registered_date
            default: id
        - *a15
        - *a16
        - name: email
          in: query
          description: Limit result set to the customer with a specific email address.
          schema:
            type: string
            format: email
        - name: role
          in: query
          description: Limit result set to users with a specific role.
          schema:
            type: string
            enum:
              - all
              - administrator
              - editor
              - author
              - contributor
              - subscriber
              - customer
              - shop_manager
            default: customer
      responses:
        "200":
          description: A page of customers.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Customer"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Customers
      operationId: createCustomer
      summary: Create a customer
      description: Create a new customer. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The customer to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Customer"
      responses:
        "201":
          description: The created customer.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Customer"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /customers/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Customers
      operationId: getCustomer
      summary: Retrieve a customer
      description: Retrieve a single customer by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested customer.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Customer"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Customers
      operationId: updateCustomer
      summary: Update a customer
      description: Partially update a customer. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Customer"
      responses:
        "200":
          description: The updated customer.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Customer"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Customers
      operationId: deleteCustomer
      summary: Delete a customer
      description: |-
        This resource does not support the trash, so `force=true` is required and deletion is permanent.

        Deletion is permanent and also deletes the underlying WordPress user. Pass `reassign` to move their content to another user first.
      parameters:
        - $ref: "#/components/parameters/Reassign"
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted customer.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Customer"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /customers/batch:
    post:
      tags:
        - Customers
      operationId: batchCustomers
      summary: Batch create, update and delete customers
      description: Apply up to 100 create, update and delete operations to customers in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /customers/{id}/downloads:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Customers
      operationId: listCustomerDownloads
      summary: List a customer’s downloadable products
      description: Every downloadable file the customer currently has access to, with remaining download counts and expiry.
      responses:
        "200":
          description: Downloadable files available to this customer.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CustomerDownload"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/ServerError"
  /coupons:
    get:
      tags:
        - Coupons
      operationId: listCoupons
      summary: List coupons
      description: |-
        Retrieve a paginated collection of coupons. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Coupon codes are case-insensitive and stored lowercase. `search` does not match codes reliably — use `code` for exact lookups.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - *a26
        - *a15
        - *a16
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Before"
        - $ref: "#/components/parameters/ModifiedAfter"
        - $ref: "#/components/parameters/ModifiedBefore"
        - $ref: "#/components/parameters/DatesAreGmt"
        - name: code
          in: query
          description: Limit result set to the coupon with a specific code.
          schema:
            type: string
            example: welcome10
      responses:
        "200":
          description: A page of coupons.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Coupon"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Coupons
      operationId: createCoupon
      summary: Create a coupon
      description: Create a new coupon. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The coupon to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Coupon"
      responses:
        "201":
          description: The created coupon.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Coupon"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /coupons/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Coupons
      operationId: getCoupon
      summary: Retrieve a coupon
      description: Retrieve a single coupon by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested coupon.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Coupon"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Coupons
      operationId: updateCoupon
      summary: Update a coupon
      description: Partially update a coupon. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Coupon"
      responses:
        "200":
          description: The updated coupon.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Coupon"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Coupons
      operationId: deleteCoupon
      summary: Delete a coupon
      description: Move the coupon to the trash, or delete it permanently with `force=true`.
      parameters:
        - $ref: "#/components/parameters/Force"
      responses:
        "200":
          description: The deleted coupon.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Coupon"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /coupons/batch:
    post:
      tags:
        - Coupons
      operationId: batchCoupons
      summary: Batch create, update and delete coupons
      description: Apply up to 100 create, update and delete operations to coupons in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /reports:
    get:
      tags:
        - Reports
      operationId: listReports
      summary: List available reports
      description: Index of the report endpoints this store exposes.
      responses:
        "200":
          description: Available reports.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ReportIndexEntry"
        "401": &a29
          $ref: "#/components/responses/Unauthorized"
        "403": &a30
          $ref: "#/components/responses/Forbidden"
        "429": &a31
          $ref: "#/components/responses/TooManyRequests"
        "500": &a32
          $ref: "#/components/responses/ServerError"
  /reports/sales:
    get:
      tags:
        - Reports
      operationId: getSalesReport
      summary: Retrieve the sales report
      description: Aggregated revenue, order count, tax, shipping and discounts for a period, plus a per-day breakdown under `totals`. Supply either `period` or an explicit `date_min`/`date_max` pair — if both are present the explicit dates win. Note this endpoint returns an array containing a single report object.
      parameters: &a36
        - &a33
          $ref: "#/components/parameters/ReportPeriod"
        - &a34
          $ref: "#/components/parameters/ReportDateMin"
        - &a35
          $ref: "#/components/parameters/ReportDateMax"
      responses:
        "200":
          description: A one-element array holding the sales report.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SalesReport"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/top_sellers:
    get:
      tags:
        - Reports
      operationId: getTopSellersReport
      summary: Retrieve the top sellers report
      description: Best-selling products by units sold for the requested period.
      parameters:
        - *a33
        - *a34
        - *a35
        - $ref: "#/components/parameters/Page"
        - $ref: "#/components/parameters/PerPage"
      responses:
        "200":
          description: Top selling products.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TopSellerReport"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/coupons/totals:
    get:
      tags:
        - Reports
      operationId: getCouponTotalsReport
      summary: Retrieve coupon totals
      description: Coupon counts grouped by discount type.
      responses:
        "200":
          description: Coupon totals.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ReportTotal"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/customers/totals:
    get:
      tags:
        - Reports
      operationId: getCustomerTotalsReport
      summary: Retrieve customer totals
      description: Customer counts split into paying and non-paying.
      responses:
        "200":
          description: Counts per bucket.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ReportTotal"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/orders/totals:
    get:
      tags:
        - Reports
      operationId: getOrderTotalsReport
      summary: Retrieve order totals
      description: Order counts grouped by status — the quickest way to size a fulfilment backlog.
      responses:
        "200":
          description: Counts per bucket.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ReportTotal"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/products/totals:
    get:
      tags:
        - Reports
      operationId: getProductTotalsReport
      summary: Retrieve product totals
      description: Product counts grouped by product type.
      responses:
        "200":
          description: Counts per bucket.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ReportTotal"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/reviews/totals:
    get:
      tags:
        - Reports
      operationId: getReviewTotalsReport
      summary: Retrieve review totals
      description: Review counts grouped by moderation status.
      responses:
        "200":
          description: Counts per bucket.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ReportTotal"
        "401": *a29
        "403": *a30
        "429": *a31
        "500": *a32
  /reports/sales/summary:
    get:
      tags:
        - Reports
      operationId: getSalesSummary
      summary: Retrieve a sales summary
      description: Convenience alias some builds expose for the current period’s sales figures. Falls back to `/reports/sales` semantics.
      parameters: *a36
      responses:
        "200":
          description: Sales summary.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SalesReport"
        "401": *a29
        "403": *a30
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a31
        "500": *a32
  /taxes:
    get:
      tags:
        - Tax rates
      operationId: listTaxRates
      summary: List tax rates
      description: |-
        Retrieve a paginated collection of tax rates. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Rates are matched most-specific-first: postcode, then city, then state, then country. `priority` groups rates that stack.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a14
        - name: orderby
          in: query
          description: Field to sort the collection by.
          schema:
            type: string
            enum:
              - order
              - id
              - include
            default: order
        - *a15
        - *a16
        - name: class
          in: query
          description: Limit result set to tax rates in a specific tax class.
          schema:
            type: string
            default: standard
      responses:
        "200":
          description: A page of tax rates.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TaxRate"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Tax rates
      operationId: createTaxRate
      summary: Create a tax rate
      description: Create a new tax rate. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The tax rate to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaxRate"
      responses:
        "201":
          description: The created tax rate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /taxes/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Tax rates
      operationId: getTaxRate
      summary: Retrieve a tax rate
      description: Retrieve a single tax rate by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested tax rate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Tax rates
      operationId: updateTaxRate
      summary: Update a tax rate
      description: Partially update a tax rate. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaxRate"
      responses:
        "200":
          description: The updated tax rate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Tax rates
      operationId: deleteTaxRate
      summary: Delete a tax rate
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted tax rate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxRate"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /taxes/batch:
    post:
      tags:
        - Tax rates
      operationId: batchTaxRates
      summary: Batch create, update and delete tax rates
      description: Apply up to 100 create, update and delete operations to tax rates in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /taxes/classes:
    get:
      tags:
        - Tax rates
      operationId: listTaxClasses
      summary: List tax classes
      description: The tax classes configured on the store, e.g. standard, reduced rate, zero rate.
      responses:
        "200":
          description: All tax classes.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TaxClass"
        "401": &a37
          $ref: "#/components/responses/Unauthorized"
        "403": &a38
          $ref: "#/components/responses/Forbidden"
        "429": &a39
          $ref: "#/components/responses/TooManyRequests"
        "500": &a40
          $ref: "#/components/responses/ServerError"
    post:
      tags:
        - Tax rates
      operationId: createTaxClass
      summary: Create a tax class
      description: Create a tax class. The slug is derived from the name.
      requestBody:
        description: The tax class to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaxClass"
      responses:
        "201":
          description: The created tax class.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxClass"
        "400": &a41
          $ref: "#/components/responses/BadRequest"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /taxes/classes/{slug}:
    parameters:
      - name: slug
        in: path
        required: true
        description: Tax class slug.
        schema:
          type: string
        example: reduced-rate
    delete:
      tags:
        - Tax rates
      operationId: deleteTaxClass
      summary: Delete a tax class
      description: Permanently delete a tax class. Products still referencing it fall back to standard.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; tax classes cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted tax class.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaxClass"
        "400": *a41
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /shipping/zones:
    get:
      tags:
        - Shipping
      operationId: listShippingZones
      summary: List shipping zones
      description: |-
        Retrieve a paginated collection of shipping zones. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Zone `0` is the built-in "Locations not covered by your other zones" fallback and cannot be deleted.
      parameters:
        - *a9
      responses:
        "200":
          description: A page of shipping zones.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ShippingZone"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Shipping
      operationId: createShippingZone
      summary: Create a shipping zone
      description: Create a new shipping zone. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The shipping zone to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ShippingZone"
      responses:
        "201":
          description: The created shipping zone.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZone"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /shipping/zones/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Shipping
      operationId: getShippingZone
      summary: Retrieve a shipping zone
      description: Retrieve a single shipping zone by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested shipping zone.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZone"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Shipping
      operationId: updateShippingZone
      summary: Update a shipping zone
      description: Partially update a shipping zone. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ShippingZone"
      responses:
        "200":
          description: The updated shipping zone.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZone"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Shipping
      operationId: deleteShippingZone
      summary: Delete a shipping zone
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted shipping zone.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZone"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /shipping/zones/{zone_id}/locations:
    parameters:
      - $ref: "#/components/parameters/ZoneIdPath"
    get:
      tags:
        - Shipping
      operationId: listShippingZoneLocations
      summary: List locations in a shipping zone
      description: The countries, states, postcodes or continents that route orders into this zone.
      responses:
        "200":
          description: Locations attached to the zone.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ShippingZoneLocation"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
    put:
      tags:
        - Shipping
      operationId: replaceShippingZoneLocations
      summary: Replace the locations in a shipping zone
      description: Replaces the entire location set for the zone. Send the full desired list — omitted locations are removed.
      requestBody:
        description: The complete set of locations for this zone.
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/ShippingZoneLocation"
      responses:
        "200":
          description: The zone’s locations after the update.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ShippingZoneLocation"
        "400": *a41
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /shipping/zones/{zone_id}/methods:
    get:
      tags:
        - Shipping
      operationId: listShippingZoneMethods
      summary: List shipping method instances
      description: |-
        Retrieve a paginated collection of shipping method instances. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Each entry is one configured instance of a method (e.g. two different flat rates in the same zone), identified by `instance_id`.
      parameters:
        - *a9
      responses:
        "200":
          description: A page of shipping method instances.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ShippingZoneMethod"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Shipping
      operationId: createShippingZoneMethod
      summary: Create a shipping method instance
      description: Create a new shipping method instance. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The shipping method instance to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ShippingZoneMethod"
      responses:
        "201":
          description: The created shipping method instance.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZoneMethod"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
    parameters:
      - &a42
        $ref: "#/components/parameters/ZoneIdPath"
  /shipping/zones/{zone_id}/methods/{instance_id}:
    parameters:
      - *a42
      - $ref: "#/components/parameters/InstanceIdPath"
    get:
      tags:
        - Shipping
      operationId: getShippingZoneMethod
      summary: Retrieve a shipping method instance
      description: Retrieve a single shipping method instance by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested shipping method instance.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZoneMethod"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Shipping
      operationId: updateShippingZoneMethod
      summary: Update a shipping method instance
      description: Partially update a shipping method instance. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ShippingZoneMethod"
      responses:
        "200":
          description: The updated shipping method instance.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZoneMethod"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Shipping
      operationId: deleteShippingZoneMethod
      summary: Delete a shipping method instance
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted shipping method instance.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingZoneMethod"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /shipping_methods:
    get:
      tags:
        - Shipping
      operationId: listShippingMethods
      summary: List available shipping method types
      description: The shipping method types registered on the store (flat rate, free shipping, local pickup, plus any from plugins). Use the `id` here when attaching a method to a zone.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: Registered shipping method types.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ShippingMethod"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /shipping_methods/{id}:
    parameters:
      - $ref: "#/components/parameters/StringId"
    get:
      tags:
        - Shipping
      operationId: getShippingMethod
      summary: Retrieve a shipping method type
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested shipping method type.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShippingMethod"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /payment_gateways:
    get:
      tags:
        - Payment gateways
      operationId: listPaymentGateways
      summary: List payment gateways
      description: All installed gateways, enabled or not, including their settings. Secrets are redacted unless `context=edit` and the key has write permission.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: Installed payment gateways.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PaymentGateway"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /payment_gateways/{id}:
    parameters:
      - $ref: "#/components/parameters/StringId"
    get:
      tags:
        - Payment gateways
      operationId: getPaymentGateway
      summary: Retrieve a payment gateway
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested gateway.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentGateway"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
    put:
      tags:
        - Payment gateways
      operationId: updatePaymentGateway
      summary: Update a payment gateway
      description: Enable/disable a gateway, retitle it, reorder it, or change its settings. Only supply the settings keys you intend to change.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PaymentGateway"
      responses:
        "200":
          description: The updated gateway.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaymentGateway"
        "400": *a41
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /settings:
    get:
      tags:
        - Settings
      operationId: listSettingGroups
      summary: List setting groups
      description: The top-level settings groups, mirroring the tabs in WooCommerce > Settings.
      responses:
        "200":
          description: Setting groups.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SettingGroup"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /settings/{group_id}:
    parameters:
      - $ref: "#/components/parameters/GroupIdPath"
    get:
      tags:
        - Settings
      operationId: listSettingOptions
      summary: List options in a setting group
      responses:
        "200":
          description: Options in the group.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SettingOption"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /settings/{group_id}/{id}:
    parameters:
      - $ref: "#/components/parameters/GroupIdPath"
      - $ref: "#/components/parameters/StringId"
    get:
      tags:
        - Settings
      operationId: getSettingOption
      summary: Retrieve a setting option
      responses:
        "200":
          description: The requested option.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SettingOption"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
    put:
      tags:
        - Settings
      operationId: updateSettingOption
      summary: Update a setting option
      description: 'Send `{ "value": ... }`. The accepted value type depends on the option’s `type`.'
      requestBody:
        description: The new value.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SettingOption"
      responses:
        "200":
          description: The updated option.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SettingOption"
        "400": *a41
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /settings/{group_id}/batch:
    parameters:
      - $ref: "#/components/parameters/GroupIdPath"
    post:
      tags:
        - Settings
      operationId: batchSettingOptions
      summary: Batch update setting options
      description: Update several options in one group at once. Only the `update` action is supported.
      requestBody:
        description: Options to update.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                update:
                  type: array
                  items:
                    $ref: "#/components/schemas/SettingOption"
      responses:
        "200":
          description: Results for each update.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a41
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /webhooks:
    get:
      tags:
        - Webhooks
      operationId: listWebhooks
      summary: List webhooks
      description: |-
        Retrieve a paginated collection of webhooks. Pagination totals are returned in the `X-WP-Total` and `X-WP-TotalPages` response headers.

        Webhooks are how you get push instead of poll. WooCommerce signs each delivery with `X-WC-Webhook-Signature` (base64 HMAC-SHA256 of the raw body using the webhook secret) — always verify it before trusting a payload.
      parameters:
        - *a9
        - *a10
        - *a11
        - *a12
        - *a13
        - *a14
        - *a26
        - *a15
        - *a16
        - $ref: "#/components/parameters/After"
        - $ref: "#/components/parameters/Before"
        - name: status
          in: query
          description: Limit result set to webhooks with a specific status.
          schema:
            type: string
            enum:
              - all
              - active
              - paused
              - disabled
            default: all
      responses:
        "200":
          description: A page of webhooks.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Webhook"
        "400": *a1
        "401": *a2
        "403": *a3
        "429": *a4
        "500": *a5
    post:
      tags:
        - Webhooks
      operationId: createWebhook
      summary: Create a webhook
      description: Create a new webhook. Fields marked read-only are ignored if supplied.
      requestBody:
        description: The webhook to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Webhook"
      responses:
        "201":
          description: The created webhook.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /webhooks/{id}:
    parameters:
      - $ref: "#/components/parameters/Id"
    get:
      tags:
        - Webhooks
      operationId: getWebhook
      summary: Retrieve a webhook
      description: Retrieve a single webhook by its identifier.
      parameters:
        - $ref: "#/components/parameters/Context"
      responses:
        "200":
          description: The requested webhook.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "429": *a4
        "500": *a5
    put:
      tags:
        - Webhooks
      operationId: updateWebhook
      summary: Update a webhook
      description: Partially update a webhook. Only the fields present in the body are changed; WooCommerce treats `PUT` as a merge, not a replace.
      requestBody:
        description: Fields to change.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Webhook"
      responses:
        "200":
          description: The updated webhook.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
    delete:
      tags:
        - Webhooks
      operationId: deleteWebhook
      summary: Delete a webhook
      description: This resource does not support the trash, so `force=true` is required and deletion is permanent.
      parameters:
        - name: force
          in: query
          required: true
          description: Must be `true`; this resource cannot be trashed.
          schema:
            type: boolean
            enum:
              - true
            default: true
      responses:
        "200":
          description: The deleted webhook.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Webhook"
        "400": *a1
        "401": *a2
        "403": *a3
        "404": *a6
        "405": *a7
        "429": *a4
        "500": *a5
  /webhooks/batch:
    post:
      tags:
        - Webhooks
      operationId: batchWebhooks
      summary: Batch create, update and delete webhooks
      description: Apply up to 100 create, update and delete operations to webhooks in a single request. Each action is applied independently — a failure in one entry does not roll back the others; inspect every element of the response for an `error` key.
      requestBody:
        description: Actions to apply.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BatchRequest"
      responses:
        "200":
          description: Results for each requested action.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchResponse"
        "400": *a1
        "401": *a2
        "403": *a3
        "405": *a8
        "429": *a4
        "500": *a5
  /system_status:
    get:
      tags:
        - System status
      operationId: getSystemStatus
      summary: Retrieve the system status report
      description: 'Full diagnostics: PHP/WP versions, database sizes, active plugins, theme info and WooCommerce settings. The single best endpoint for "why is this store behaving oddly".'
      responses:
        "200":
          description: The system status report.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SystemStatus"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /system_status/tools:
    get:
      tags:
        - System status
      operationId: listSystemStatusTools
      summary: List maintenance tools
      description: Tools available under WooCommerce > Status > Tools.
      responses:
        "200":
          description: Available tools.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SystemStatusTool"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /system_status/tools/{id}:
    parameters:
      - $ref: "#/components/parameters/StringId"
    get:
      tags:
        - System status
      operationId: getSystemStatusTool
      summary: Retrieve a maintenance tool
      responses:
        "200":
          description: The requested tool.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SystemStatusTool"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
    put:
      tags:
        - System status
      operationId: runSystemStatusTool
      summary: Run a maintenance tool
      description: 'Executes the tool. Send `{ "confirm": true }`. Some tools (regenerate lookup tables, clear sessions) are destructive or long-running — do not call these casually against production.'
      requestBody:
        description: Confirmation flag.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                confirm:
                  type: boolean
                  enum:
                    - true
              required:
                - confirm
      responses:
        "200":
          description: The tool result, including `success` and `message`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SystemStatusTool"
        "400": *a41
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /data:
    get:
      tags:
        - Data
      operationId: listDataIndex
      summary: List data endpoints
      description: Index of the read-only reference data available (countries, currencies, continents).
      responses:
        "200":
          description: Available data endpoints.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /data/countries:
    get:
      tags:
        - Data
      operationId: listCountries
      summary: List countries and their states
      description: ISO country codes with the state/province lists WooCommerce validates addresses against.
      responses:
        "200":
          description: All countries.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DataCountry"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /data/countries/{location}:
    parameters:
      - name: location
        in: path
        required: true
        description: ISO 3166-1 alpha-2 country code.
        schema:
          type: string
        example: IN
    get:
      tags:
        - Data
      operationId: getCountry
      summary: Retrieve a country
      responses:
        "200":
          description: The requested country.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataCountry"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /data/currencies:
    get:
      tags:
        - Data
      operationId: listCurrencies
      summary: List currencies
      responses:
        "200":
          description: All currencies.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DataCurrency"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /data/currencies/current:
    get:
      tags:
        - Data
      operationId: getCurrentCurrency
      summary: Retrieve the store currency
      description: The currency the store is currently configured to charge in.
      responses:
        "200":
          description: The store currency.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataCurrency"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /data/currencies/{currency}:
    parameters:
      - name: currency
        in: path
        required: true
        description: ISO 4217 currency code.
        schema:
          type: string
        example: INR
    get:
      tags:
        - Data
      operationId: getCurrency
      summary: Retrieve a currency
      responses:
        "200":
          description: The requested currency.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataCurrency"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
  /data/continents:
    get:
      tags:
        - Data
      operationId: listContinents
      summary: List continents
      description: Continents with their countries — useful when building shipping zones programmatically.
      responses:
        "200":
          description: All continents.
          headers:
            X-WP-Total:
              description: Total number of resources matching the query, ignoring pagination.
              schema:
                type: integer
                example: 137
            X-WP-TotalPages:
              description: Total number of pages available for the current `per_page` value.
              schema:
                type: integer
                example: 14
            Link:
              description: RFC 5988 pagination links (`rel="next"`, `rel="prev"`).
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DataContinent"
        "401": *a37
        "403": *a38
        "429": *a39
        "500": *a40
  /data/continents/{location}:
    parameters:
      - name: location
        in: path
        required: true
        description: Two-letter continent code, e.g. `AS`, `EU`, `NA`.
        schema:
          type: string
        example: AS
    get:
      tags:
        - Data
      operationId: getContinent
      summary: Retrieve a continent
      responses:
        "200":
          description: The requested continent.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DataContinent"
        "401": *a37
        "403": *a38
        "404":
          $ref: "#/components/responses/NotFound"
        "429": *a39
        "500": *a40
components:
  schemas:
    Error:
      type: object
      description: Standard WordPress REST API error envelope. Returned for every 4xx and 5xx response.
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: woocommerce_rest_product_invalid_id
        message:
          type: string
          description: Human-readable error message.
          example: Invalid ID.
        data:
          type: object
          nullable: true
          properties:
            status:
              type: integer
              example: 404
            params:
              type: object
              additionalProperties:
                type: string
              description: Per-parameter validation messages, present on 400 responses.
            details:
              type: object
              additionalProperties: true
          additionalProperties: true
      required:
        - code
        - message
    MetaData:
      type: object
      description: Arbitrary key/value pair stored against a resource. This is where plugins (and your own integrations) hang custom fields.
      properties:
        id:
          type: integer
          readOnly: true
          description: Meta ID.
          example: 21455
        key:
          type: string
          description: Meta key.
          example: _custom_field
        value:
          description: Meta value. Scalar, array or object depending on what wrote it.
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items: {}
            - type: object
              additionalProperties: true
          nullable: true
    Links:
      type: object
      readOnly: true
      description: HAL-style hypermedia links returned under the `_links` key.
      additionalProperties:
        type: array
        items:
          type: object
          properties:
            href:
              type: string
              format: uri
            embeddable:
              type: boolean
      example:
        self:
          - href: https://example.com/wp-json/wc/v3/products/799
        collection:
          - href: https://example.com/wp-json/wc/v3/products
    Image:
      type: object
      description: A media-library image attached to a product or category.
      properties:
        id:
          type: integer
          description: Attachment ID.
          example: 795
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
        date_modified_gmt:
          type: string
          format: date-time
          readOnly: true
        src:
          type: string
          format: uri
          description: Image URL. On create/update you may pass a remote URL and WooCommerce will sideload it.
          example: https://example.com/wp-content/uploads/2026/01/hoodie.jpg
        name:
          type: string
          example: hoodie
        alt:
          type: string
          example: Navy hoodie, front view
    Dimensions:
      type: object
      description: Physical dimensions in the store unit (WooCommerce > Settings > Products).
      properties:
        length:
          type: string
          example: "12"
        width:
          type: string
          example: "8"
        height:
          type: string
          example: "2"
    Address:
      type: object
      description: Billing or shipping address block.
      properties:
        first_name:
          type: string
          example: Asha
        last_name:
          type: string
          example: Iyer
        company:
          type: string
          example: ""
        address_1:
          type: string
          example: 221B Residency Road
        address_2:
          type: string
          example: Ashok Nagar
        city:
          type: string
          example: Bengaluru
        state:
          type: string
          description: ISO code for the state/province where supported, otherwise free text.
          example: KA
        postcode:
          type: string
          example: "560025"
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code.
          example: IN
        email:
          type: string
          format: email
          description: Billing addresses only.
          example: asha@example.com
        phone:
          type: string
          description: Billing addresses only.
          example: +91 98800 12345
    BatchRequest:
      type: object
      description: Batch envelope accepted by every `/batch` endpoint. Up to 100 objects per action per request by default.
      properties:
        create:
          type: array
          items:
            type: object
            additionalProperties: true
        update:
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              id:
                type: integer
            required:
              - id
        delete:
          type: array
          items:
            type: integer
          description: IDs to delete. Force-deletes where the resource supports it.
    BatchResponse:
      type: object
      description: Per-action results, in the same order the request supplied them.
      properties:
        create:
          type: array
          items:
            type: object
            additionalProperties: true
        update:
          type: array
          items:
            type: object
            additionalProperties: true
        delete:
          type: array
          items:
            type: object
            additionalProperties: true
    Product:
      type: object
      description: "A catalogue product: simple, grouped, external/affiliate or variable."
      properties:
        id:
          type: integer
          readOnly: true
          example: 799
        name:
          type: string
          example: Ceramic Pour-Over Kit
        slug:
          type: string
          example: ceramic-pour-over-kit
        permalink:
          type: string
          format: uri
          readOnly: true
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
        date_modified_gmt:
          type: string
          format: date-time
          readOnly: true
        type:
          type: string
          enum:
            - simple
            - grouped
            - external
            - variable
          default: simple
        status:
          type: string
          enum:
            - draft
            - pending
            - private
            - publish
          default: publish
        featured:
          type: boolean
          default: false
        catalog_visibility:
          type: string
          enum:
            - visible
            - catalog
            - search
            - hidden
          default: visible
        description:
          type: string
          description: Full HTML description.
        short_description:
          type: string
          description: Excerpt shown near the add-to-cart box.
        sku:
          type: string
          example: POUR-CER-01
        price:
          type: string
          readOnly: true
          description: Current effective price.
          example: "2499.00"
        regular_price:
          type: string
          example: "2999.00"
        sale_price:
          type: string
          example: "2499.00"
        date_on_sale_from:
          type: string
          format: date-time
          nullable: true
        date_on_sale_from_gmt:
          type: string
          format: date-time
          nullable: true
        date_on_sale_to:
          type: string
          format: date-time
          nullable: true
        date_on_sale_to_gmt:
          type: string
          format: date-time
          nullable: true
        price_html:
          type: string
          readOnly: true
        on_sale:
          type: boolean
          readOnly: true
        purchasable:
          type: boolean
          readOnly: true
        total_sales:
          type: integer
          readOnly: true
          example: 412
        virtual:
          type: boolean
          default: false
          description: No shipping required.
        downloadable:
          type: boolean
          default: false
        downloads:
          type: array
          items:
            $ref: "#/components/schemas/ProductDownload"
        download_limit:
          type: integer
          default: -1
          description: -1 means unlimited.
        download_expiry:
          type: integer
          default: -1
          description: Days until expiry, -1 for never.
        external_url:
          type: string
          format: uri
          description: External/affiliate products only.
        button_text:
          type: string
          description: External/affiliate products only.
        tax_status:
          type: string
          enum:
            - taxable
            - shipping
            - none
          default: taxable
        tax_class:
          type: string
          example: ""
        manage_stock:
          description: Boolean on products; variations may also inherit with the string "parent".
          oneOf:
            - type: boolean
            - type: string
              enum:
                - parent
          default: false
        stock_quantity:
          type: integer
          nullable: true
          example: 24
        stock_status:
          type: string
          enum:
            - instock
            - outofstock
            - onbackorder
          default: instock
        backorders:
          type: string
          enum:
            - no
            - notify
            - yes
          default: no
        backorders_allowed:
          type: boolean
          readOnly: true
        backordered:
          type: boolean
          readOnly: true
        low_stock_amount:
          type: integer
          nullable: true
        sold_individually:
          type: boolean
          default: false
        weight:
          type: string
          example: "1.4"
        dimensions:
          $ref: "#/components/schemas/Dimensions"
        shipping_required:
          type: boolean
          readOnly: true
        shipping_taxable:
          type: boolean
          readOnly: true
        shipping_class:
          type: string
        shipping_class_id:
          type: integer
          readOnly: true
        reviews_allowed:
          type: boolean
          default: true
        average_rating:
          type: string
          readOnly: true
          example: "4.67"
        rating_count:
          type: integer
          readOnly: true
          example: 18
        related_ids:
          type: array
          readOnly: true
          items:
            type: integer
        upsell_ids:
          type: array
          items:
            type: integer
        cross_sell_ids:
          type: array
          items:
            type: integer
        parent_id:
          type: integer
          default: 0
        purchase_note:
          type: string
        categories:
          type: array
          items:
            $ref: "#/components/schemas/ProductTermRef"
        tags:
          type: array
          items:
            $ref: "#/components/schemas/ProductTermRef"
        images:
          type: array
          items:
            $ref: "#/components/schemas/Image"
        attributes:
          type: array
          items:
            $ref: "#/components/schemas/ProductAttributeValue"
        default_attributes:
          type: array
          items:
            $ref: "#/components/schemas/ProductDefaultAttribute"
        variations:
          type: array
          readOnly: true
          items:
            type: integer
        grouped_products:
          type: array
          items:
            type: integer
        menu_order:
          type: integer
          default: 0
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        _links:
          $ref: "#/components/schemas/Links"
      example:
        id: 799
        name: Ceramic Pour-Over Kit
        slug: ceramic-pour-over-kit
        type: simple
        status: publish
        sku: POUR-CER-01
        regular_price: "2999.00"
        sale_price: "2499.00"
        price: "2499.00"
        on_sale: true
        stock_status: instock
        stock_quantity: 24
        categories:
          - id: 19
            name: Brewing
            slug: brewing
    ProductDownload:
      type: object
      properties:
        id:
          type: string
          description: Download MD5 hash.
          readOnly: true
        name:
          type: string
          example: Brew guide (PDF)
        file:
          type: string
          format: uri
    ProductTermRef:
      type: object
      description: Lightweight category/tag reference embedded inside a product.
      properties:
        id:
          type: integer
          example: 19
        name:
          type: string
          readOnly: true
          example: Brewing
        slug:
          type: string
          readOnly: true
          example: brewing
      required:
        - id
    ProductAttributeValue:
      type: object
      description: An attribute as attached to a product. Global attributes carry an `id`; custom (per-product) attributes carry only a `name`.
      properties:
        id:
          type: integer
          description: Global attribute ID, 0 for custom attributes.
          example: 3
        name:
          type: string
          example: Size
        position:
          type: integer
          default: 0
        visible:
          type: boolean
          default: false
          description: Show on the product page.
        variation:
          type: boolean
          default: false
          description: Usable for variations.
        options:
          type: array
          items:
            type: string
          example:
            - S
            - M
            - L
    ProductDefaultAttribute:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          example: Size
        option:
          type: string
          example: M
    ProductVariation:
      type: object
      description: A purchasable combination of attribute values belonging to a variable product.
      properties:
        id:
          type: integer
          readOnly: true
          example: 812
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
        description:
          type: string
        permalink:
          type: string
          format: uri
          readOnly: true
        sku:
          type: string
          example: TEE-NVY-M
        price:
          type: string
          readOnly: true
        regular_price:
          type: string
          example: "1299.00"
        sale_price:
          type: string
        date_on_sale_from:
          type: string
          format: date-time
          nullable: true
        date_on_sale_to:
          type: string
          format: date-time
          nullable: true
        on_sale:
          type: boolean
          readOnly: true
        status:
          type: string
          enum:
            - draft
            - pending
            - private
            - publish
          default: publish
        purchasable:
          type: boolean
          readOnly: true
        virtual:
          type: boolean
          default: false
        downloadable:
          type: boolean
          default: false
        downloads:
          type: array
          items:
            $ref: "#/components/schemas/ProductDownload"
        download_limit:
          type: integer
          default: -1
        download_expiry:
          type: integer
          default: -1
        tax_status:
          type: string
          enum:
            - taxable
            - shipping
            - none
          default: taxable
        tax_class:
          type: string
        manage_stock:
          oneOf:
            - type: boolean
            - type: string
              enum:
                - parent
        stock_quantity:
          type: integer
          nullable: true
        stock_status:
          type: string
          enum:
            - instock
            - outofstock
            - onbackorder
        backorders:
          type: string
          enum:
            - no
            - notify
            - yes
          default: no
        weight:
          type: string
        dimensions:
          $ref: "#/components/schemas/Dimensions"
        shipping_class:
          type: string
        shipping_class_id:
          type: integer
          readOnly: true
        image:
          $ref: "#/components/schemas/Image"
        attributes:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
                example: Size
              option:
                type: string
                example: M
        menu_order:
          type: integer
          default: 0
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        _links:
          $ref: "#/components/schemas/Links"
    ProductCategory:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
          example: 19
        name:
          type: string
          example: Brewing
        slug:
          type: string
          example: brewing
        parent:
          type: integer
          default: 0
        description:
          type: string
        display:
          type: string
          enum:
            - default
            - products
            - subcategories
            - both
          default: default
        image:
          $ref: "#/components/schemas/Image"
        menu_order:
          type: integer
          default: 0
        count:
          type: integer
          readOnly: true
          description: Number of published products.
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ProductTag:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
          example: 34
        name:
          type: string
          example: Gift ideas
        slug:
          type: string
          example: gift-ideas
        description:
          type: string
        count:
          type: integer
          readOnly: true
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ProductAttribute:
      type: object
      description: A global (store-wide) attribute definition, e.g. Colour or Size.
      properties:
        id:
          type: integer
          readOnly: true
          example: 3
        name:
          type: string
          example: Size
        slug:
          type: string
          example: pa_size
        type:
          type: string
          enum:
            - select
          default: select
        order_by:
          type: string
          enum:
            - menu_order
            - name
            - name_num
            - id
          default: menu_order
        has_archives:
          type: boolean
          default: false
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ProductAttributeTerm:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          example: Medium
        slug:
          type: string
          example: medium
        description:
          type: string
        menu_order:
          type: integer
        count:
          type: integer
          readOnly: true
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ProductShippingClass:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          example: Fragile
        slug:
          type: string
          example: fragile
        description:
          type: string
        count:
          type: integer
          readOnly: true
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ProductReview:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        product_id:
          type: integer
          example: 799
        product_name:
          type: string
          readOnly: true
        product_permalink:
          type: string
          format: uri
          readOnly: true
        status:
          type: string
          enum:
            - approved
            - hold
            - spam
            - unspam
            - trash
            - untrash
          default: approved
        reviewer:
          type: string
          example: Asha Iyer
        reviewer_email:
          type: string
          format: email
        review:
          type: string
          example: Brews beautifully. Packaging could be better.
        rating:
          type: integer
          minimum: 0
          maximum: 5
          example: 4
        verified:
          type: boolean
          readOnly: true
        reviewer_avatar_urls:
          type: object
          additionalProperties:
            type: string
          readOnly: true
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - product_id
        - review
        - reviewer
        - reviewer_email
    Order:
      type: object
      description: A customer order with its line items, totals, addresses and fulfilment state.
      properties:
        id:
          type: integer
          readOnly: true
          example: 1042
        parent_id:
          type: integer
          default: 0
        number:
          type: string
          readOnly: true
          example: "1042"
        order_key:
          type: string
          readOnly: true
          example: wc_order_qw12ER34ty
        created_via:
          type: string
          readOnly: true
          example: rest-api
        version:
          type: string
          readOnly: true
          example: 9.4.2
        status:
          type: string
          description: Order status. Plugins may register additional statuses; treat this as an open set.
          enum:
            - pending
            - processing
            - on-hold
            - completed
            - cancelled
            - refunded
            - failed
            - trash
            - checkout-draft
          default: pending
        currency:
          type: string
          description: ISO 4217 currency code.
          default: USD
          example: INR
        currency_symbol:
          type: string
          readOnly: true
          example: ₹
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
        date_modified_gmt:
          type: string
          format: date-time
          readOnly: true
        discount_total:
          type: string
          readOnly: true
          example: "250.00"
        discount_tax:
          type: string
          readOnly: true
          example: "0.00"
        shipping_total:
          type: string
          readOnly: true
          example: "99.00"
        shipping_tax:
          type: string
          readOnly: true
          example: "0.00"
        cart_tax:
          type: string
          readOnly: true
          example: "404.82"
        total:
          type: string
          readOnly: true
          example: "2998.00"
        total_tax:
          type: string
          readOnly: true
          example: "404.82"
        prices_include_tax:
          type: boolean
          readOnly: true
        customer_id:
          type: integer
          default: 0
          description: 0 for guest checkouts.
          example: 57
        customer_ip_address:
          type: string
          readOnly: true
        customer_user_agent:
          type: string
          readOnly: true
        customer_note:
          type: string
          example: Leave with the security desk.
        billing:
          $ref: "#/components/schemas/Address"
        shipping:
          $ref: "#/components/schemas/Address"
        payment_method:
          type: string
          example: razorpay
        payment_method_title:
          type: string
          example: Credit Card (Razorpay)
        transaction_id:
          type: string
        date_paid:
          type: string
          format: date-time
          nullable: true
          readOnly: true
        date_paid_gmt:
          type: string
          format: date-time
          nullable: true
          readOnly: true
        date_completed:
          type: string
          format: date-time
          nullable: true
          readOnly: true
        date_completed_gmt:
          type: string
          format: date-time
          nullable: true
          readOnly: true
        cart_hash:
          type: string
          readOnly: true
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        line_items:
          type: array
          items:
            $ref: "#/components/schemas/OrderLineItem"
        tax_lines:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/OrderTaxLine"
        shipping_lines:
          type: array
          items:
            $ref: "#/components/schemas/OrderShippingLine"
        fee_lines:
          type: array
          items:
            $ref: "#/components/schemas/OrderFeeLine"
        coupon_lines:
          type: array
          items:
            $ref: "#/components/schemas/OrderCouponLine"
        refunds:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/OrderRefundRef"
        set_paid:
          type: boolean
          writeOnly: true
          description: Write-only. Set true on create/update to mark the order paid immediately.
          default: false
        _links:
          $ref: "#/components/schemas/Links"
      example:
        id: 1042
        status: processing
        currency: INR
        total: "2998.00"
        customer_id: 57
        payment_method: razorpay
        payment_method_title: Credit Card (Razorpay)
        billing:
          first_name: Asha
          last_name: Iyer
          address_1: 221B Residency Road
          city: Bengaluru
          state: KA
          postcode: "560025"
          country: IN
          email: asha@example.com
        line_items:
          - id: 9
            product_id: 799
            quantity: 1
            total: "2499.00"
    OrderLineItem:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
          example: Ceramic Pour-Over Kit
        product_id:
          type: integer
          example: 799
        variation_id:
          type: integer
          default: 0
        quantity:
          type: integer
          example: 1
        tax_class:
          type: string
        subtotal:
          type: string
          example: "2499.00"
        subtotal_tax:
          type: string
          readOnly: true
        total:
          type: string
          description: Line total after discounts. Omit on create to let WooCommerce calculate it.
          example: "2499.00"
        total_tax:
          type: string
          readOnly: true
        taxes:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/OrderItemTax"
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        sku:
          type: string
          readOnly: true
        price:
          type: number
          readOnly: true
          example: 2499
        image:
          type: object
          readOnly: true
          properties:
            id:
              type: string
            src:
              type: string
              format: uri
        parent_name:
          type: string
          nullable: true
          readOnly: true
      required:
        - product_id
    OrderItemTax:
      type: object
      readOnly: true
      properties:
        id:
          type: integer
          description: Tax rate ID.
        total:
          type: string
        subtotal:
          type: string
    OrderTaxLine:
      type: object
      readOnly: true
      properties:
        id:
          type: integer
        rate_code:
          type: string
          example: IN-KA-GST-1
        rate_id:
          type: integer
        label:
          type: string
          example: GST
        compound:
          type: boolean
        tax_total:
          type: string
        shipping_tax_total:
          type: string
        rate_percent:
          type: number
          example: 18
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
    OrderShippingLine:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        method_title:
          type: string
          example: Standard Delivery
        method_id:
          type: string
          example: flat_rate
        instance_id:
          type: string
          example: "3"
        total:
          type: string
          example: "99.00"
        total_tax:
          type: string
          readOnly: true
        taxes:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/OrderItemTax"
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
      required:
        - method_id
    OrderFeeLine:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          example: Gift wrapping
        tax_class:
          type: string
        tax_status:
          type: string
          enum:
            - taxable
            - none
          default: taxable
        total:
          type: string
          example: "75.00"
        total_tax:
          type: string
          readOnly: true
        taxes:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/OrderItemTax"
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
      required:
        - name
    OrderCouponLine:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        code:
          type: string
          example: welcome10
        discount:
          type: string
          readOnly: true
          example: "250.00"
        discount_tax:
          type: string
          readOnly: true
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
      required:
        - code
    OrderRefundRef:
      type: object
      readOnly: true
      properties:
        id:
          type: integer
        reason:
          type: string
        total:
          type: string
          example: "-2499.00"
    OrderRefund:
      type: object
      description: A refund against an order. Creating one may also trigger a gateway refund.
      properties:
        id:
          type: integer
          readOnly: true
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        amount:
          type: string
          description: Total refund amount. Required unless line items are supplied.
          example: "2499.00"
        reason:
          type: string
          example: Damaged on arrival
        refunded_by:
          type: integer
          description: User ID that issued the refund.
        refunded_payment:
          type: boolean
          readOnly: true
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        line_items:
          type: array
          items:
            $ref: "#/components/schemas/OrderLineItem"
        api_refund:
          type: boolean
          writeOnly: true
          default: true
          description: When true, also refund via the payment gateway API if it supports it.
        api_restock:
          type: boolean
          writeOnly: true
          default: true
          description: When true, restock refunded line items.
        _links:
          $ref: "#/components/schemas/Links"
    OrderNote:
      type: object
      description: A note on an order. Customer notes are emailed to the buyer.
      properties:
        id:
          type: integer
          readOnly: true
        author:
          type: string
          readOnly: true
          example: system
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        note:
          type: string
          example: Shipped via BlueDart, AWB 1234567890.
        customer_note:
          type: boolean
          default: false
        added_by_user:
          type: boolean
          writeOnly: true
          default: false
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - note
    Customer:
      type: object
      description: A WordPress user with the `customer` role plus WooCommerce billing/shipping data.
      properties:
        id:
          type: integer
          readOnly: true
          example: 57
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        date_modified_gmt:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        email:
          type: string
          format: email
          example: asha@example.com
        first_name:
          type: string
          example: Asha
        last_name:
          type: string
          example: Iyer
        role:
          type: string
          readOnly: true
          default: customer
        username:
          type: string
          example: asha.iyer
        password:
          type: string
          format: password
          writeOnly: true
          description: Write-only. Omit to have WordPress generate one and email the customer.
        billing:
          $ref: "#/components/schemas/Address"
        shipping:
          $ref: "#/components/schemas/Address"
        is_paying_customer:
          type: boolean
          readOnly: true
        avatar_url:
          type: string
          format: uri
          readOnly: true
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - email
      example:
        id: 57
        email: asha@example.com
        first_name: Asha
        last_name: Iyer
        username: asha.iyer
        is_paying_customer: true
    CustomerDownload:
      type: object
      readOnly: true
      description: A downloadable file the customer has purchased access to.
      properties:
        download_id:
          type: string
        download_url:
          type: string
          format: uri
        product_id:
          type: integer
        product_name:
          type: string
        download_name:
          type: string
        order_id:
          type: integer
        order_key:
          type: string
        downloads_remaining:
          type: string
          example: unlimited
        access_expires:
          type: string
          nullable: true
          example: never
        access_expires_gmt:
          type: string
          nullable: true
        file:
          type: object
          properties:
            name:
              type: string
            file:
              type: string
              format: uri
        _links:
          $ref: "#/components/schemas/Links"
    Coupon:
      type: object
      description: A discount coupon and the rules that constrain it.
      properties:
        id:
          type: integer
          readOnly: true
          example: 310
        code:
          type: string
          description: Coupon code. Always stored lowercase.
          example: welcome10
        amount:
          type: string
          description: Discount value. A percentage when `discount_type` is `percent`.
          example: "10.00"
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
        date_modified_gmt:
          type: string
          format: date-time
          readOnly: true
        discount_type:
          type: string
          enum:
            - percent
            - fixed_cart
            - fixed_product
          default: fixed_cart
        description:
          type: string
        date_expires:
          type: string
          format: date-time
          nullable: true
        date_expires_gmt:
          type: string
          format: date-time
          nullable: true
        usage_count:
          type: integer
          readOnly: true
          example: 214
        individual_use:
          type: boolean
          default: false
          description: Cannot be combined with other coupons.
        product_ids:
          type: array
          items:
            type: integer
        excluded_product_ids:
          type: array
          items:
            type: integer
        usage_limit:
          type: integer
          nullable: true
          example: 1000
        usage_limit_per_user:
          type: integer
          nullable: true
          example: 1
        limit_usage_to_x_items:
          type: integer
          nullable: true
        free_shipping:
          type: boolean
          default: false
        product_categories:
          type: array
          items:
            type: integer
        excluded_product_categories:
          type: array
          items:
            type: integer
        exclude_sale_items:
          type: boolean
          default: false
        minimum_amount:
          type: string
          example: "999.00"
        maximum_amount:
          type: string
          example: ""
        email_restrictions:
          type: array
          items:
            type: string
            format: email
        used_by:
          type: array
          readOnly: true
          items:
            type: string
        meta_data:
          type: array
          items:
            $ref: "#/components/schemas/MetaData"
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - code
      example:
        id: 310
        code: welcome10
        discount_type: percent
        amount: "10.00"
        individual_use: true
        usage_limit_per_user: 1
        minimum_amount: "999.00"
    TaxRate:
      type: object
      description: A tax rate row. Matching is by country/state/postcode/city, most specific first.
      properties:
        id:
          type: integer
          readOnly: true
        country:
          type: string
          example: IN
        state:
          type: string
          example: KA
        postcode:
          type: string
          deprecated: true
          description: Deprecated in favour of `postcodes`.
        city:
          type: string
          deprecated: true
          description: Deprecated in favour of `cities`.
        postcodes:
          type: array
          items:
            type: string
        cities:
          type: array
          items:
            type: string
        rate:
          type: string
          description: Rate percentage.
          example: "18.0000"
        name:
          type: string
          example: GST
        priority:
          type: integer
          default: 1
        compound:
          type: boolean
          default: false
        shipping:
          type: boolean
          default: true
          description: Whether the rate applies to shipping.
        order:
          type: integer
          description: Sort order.
        class:
          type: string
          default: standard
        _links:
          $ref: "#/components/schemas/Links"
    TaxClass:
      type: object
      properties:
        slug:
          type: string
          readOnly: true
          example: reduced-rate
        name:
          type: string
          example: Reduced rate
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ShippingZone:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
          example: 3
        name:
          type: string
          example: South India
        order:
          type: integer
          default: 0
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - name
    ShippingZoneLocation:
      type: object
      properties:
        code:
          type: string
          description: "Location code: country, state, postcode or continent."
          example: IN:KA
        type:
          type: string
          enum:
            - postcode
            - state
            - country
            - continent
          default: country
    ShippingZoneMethod:
      type: object
      properties:
        instance_id:
          type: integer
          readOnly: true
        title:
          type: string
          readOnly: true
          example: Flat rate
        order:
          type: integer
        enabled:
          type: boolean
          default: true
        method_id:
          type: string
          example: flat_rate
        method_title:
          type: string
          readOnly: true
        method_description:
          type: string
          readOnly: true
        settings:
          type: object
          description: Method-specific settings, keyed by setting ID.
          additionalProperties:
            $ref: "#/components/schemas/SettingOption"
        _links:
          $ref: "#/components/schemas/Links"
    ShippingMethod:
      type: object
      readOnly: true
      description: A shipping method type registered on the store (not bound to a zone).
      properties:
        id:
          type: string
          example: flat_rate
        title:
          type: string
          example: Flat rate
        description:
          type: string
        _links:
          $ref: "#/components/schemas/Links"
    PaymentGateway:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          example: razorpay
        title:
          type: string
          example: Credit Card (Razorpay)
        description:
          type: string
        order:
          oneOf:
            - type: integer
            - type: string
          description: Display order.
        enabled:
          type: boolean
        method_title:
          type: string
          readOnly: true
        method_description:
          type: string
          readOnly: true
        method_supports:
          type: array
          readOnly: true
          items:
            type: string
          example:
            - products
            - refunds
        settings:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/SettingOption"
        needs_setup:
          type: boolean
          readOnly: true
        post_install_scripts:
          type: array
          readOnly: true
          items:
            type: string
        settings_url:
          type: string
          format: uri
          readOnly: true
        connection_url:
          type: string
          format: uri
          nullable: true
          readOnly: true
        setup_help_text:
          type: string
          nullable: true
          readOnly: true
        required_settings_keys:
          type: array
          readOnly: true
          items:
            type: string
        _links:
          $ref: "#/components/schemas/Links"
    SettingGroup:
      type: object
      properties:
        id:
          type: string
          example: products
        label:
          type: string
          example: Products
        description:
          type: string
        parent_id:
          type: string
          example: ""
        sub_groups:
          type: array
          items:
            type: string
        _links:
          $ref: "#/components/schemas/Links"
    SettingOption:
      type: object
      properties:
        id:
          type: string
          example: woocommerce_currency
        label:
          type: string
          example: Currency
        description:
          type: string
        value:
          description: Current value. Type depends on the setting.
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items: {}
            - type: object
              additionalProperties: true
          nullable: true
        default:
          oneOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items: {}
          nullable: true
        tip:
          type: string
        placeholder:
          type: string
        type:
          type: string
          description: Control type used to render the setting.
          example: select
        options:
          type: object
          additionalProperties:
            type: string
        group_id:
          type: string
          readOnly: true
        _links:
          $ref: "#/components/schemas/Links"
    Webhook:
      type: object
      description: An outbound webhook. WooCommerce POSTs a JSON payload to `delivery_url` when `topic` fires.
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          example: Order created -> fulfilment service
        status:
          type: string
          enum:
            - active
            - paused
            - disabled
          default: active
        topic:
          type: string
          description: "`{resource}.{event}`, e.g. `order.created`, `product.updated`, `customer.deleted`."
          example: order.created
        resource:
          type: string
          readOnly: true
          example: order
        event:
          type: string
          readOnly: true
          example: created
        hooks:
          type: array
          readOnly: true
          items:
            type: string
        delivery_url:
          type: string
          format: uri
          example: https://hooks.example.com/woo/orders
        secret:
          type: string
          writeOnly: true
          description: Used to sign the payload (`X-WC-Webhook-Signature`). Defaults to the API consumer secret.
        date_created:
          type: string
          format: date-time
          readOnly: true
        date_created_gmt:
          type: string
          format: date-time
          readOnly: true
        date_modified:
          type: string
          format: date-time
          readOnly: true
        date_modified_gmt:
          type: string
          format: date-time
          readOnly: true
        _links:
          $ref: "#/components/schemas/Links"
      required:
        - topic
        - delivery_url
    SystemStatus:
      type: object
      readOnly: true
      description: "Diagnostics snapshot: environment, database, active plugins, theme and settings."
      properties:
        environment:
          type: object
          additionalProperties: true
        database:
          type: object
          additionalProperties: true
        active_plugins:
          type: array
          items:
            type: object
            additionalProperties: true
        inactive_plugins:
          type: array
          items:
            type: object
            additionalProperties: true
        dropins_mu_plugins:
          type: object
          additionalProperties: true
        theme:
          type: object
          additionalProperties: true
        settings:
          type: object
          additionalProperties: true
        security:
          type: object
          additionalProperties: true
        pages:
          type: array
          items:
            type: object
            additionalProperties: true
        post_type_counts:
          type: array
          items:
            type: object
            additionalProperties: true
        _links:
          $ref: "#/components/schemas/Links"
    SystemStatusTool:
      type: object
      description: A maintenance tool. `PUT` on the item endpoint runs it.
      properties:
        id:
          type: string
          example: clear_transients
        name:
          type: string
          example: WooCommerce transients
        action:
          type: string
          example: Clear transients
        description:
          type: string
        success:
          type: boolean
          readOnly: true
        message:
          type: string
          readOnly: true
        confirm:
          type: boolean
          writeOnly: true
          description: Must be true to actually run the tool.
        _links:
          $ref: "#/components/schemas/Links"
    DataCountry:
      type: object
      readOnly: true
      properties:
        code:
          type: string
          example: IN
        name:
          type: string
          example: India
        states:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: KA
              name:
                type: string
                example: Karnataka
        _links:
          $ref: "#/components/schemas/Links"
    DataCurrency:
      type: object
      readOnly: true
      properties:
        code:
          type: string
          example: INR
        name:
          type: string
          example: Indian rupee
        symbol:
          type: string
          example: "&#8377;"
        _links:
          $ref: "#/components/schemas/Links"
    DataContinent:
      type: object
      readOnly: true
      properties:
        code:
          type: string
          example: AS
        name:
          type: string
          example: Asia
        countries:
          type: array
          items:
            type: object
            additionalProperties: true
        _links:
          $ref: "#/components/schemas/Links"
    ReportIndexEntry:
      type: object
      readOnly: true
      properties:
        slug:
          type: string
          example: sales
        description:
          type: string
          example: List of sales reports.
        _links:
          $ref: "#/components/schemas/Links"
    SalesReport:
      type: object
      readOnly: true
      description: Aggregated sales for the requested period.
      properties:
        total_sales:
          type: string
          example: "184320.00"
        net_sales:
          type: string
          example: "162110.25"
        average_sales:
          type: string
          example: "6144.00"
        total_orders:
          type: integer
          example: 96
        total_items:
          type: integer
          example: 231
        total_tax:
          type: string
          example: "19730.75"
        total_shipping:
          type: string
          example: "2479.00"
        total_refunds:
          type: integer
          example: 3
        total_discount:
          type: integer
          example: 4120
        totals_grouped_by:
          type: string
          example: day
        totals:
          type: object
          description: Per-bucket breakdown keyed by date.
          additionalProperties:
            type: object
            properties:
              sales:
                type: string
              orders:
                type: integer
              items:
                type: integer
              tax:
                type: string
              shipping:
                type: string
              discount:
                type: string
              customers:
                type: integer
        _links:
          $ref: "#/components/schemas/Links"
    TopSellerReport:
      type: object
      readOnly: true
      properties:
        name:
          type: string
          example: Ceramic Pour-Over Kit
        product_id:
          type: integer
          example: 799
        quantity:
          type: integer
          example: 62
        _links:
          $ref: "#/components/schemas/Links"
    ReportTotal:
      type: object
      readOnly: true
      description: Count of resources bucketed by status/type.
      properties:
        slug:
          type: string
          example: processing
        name:
          type: string
          example: Processing
        total:
          oneOf:
            - type: integer
            - type: string
          example: 12
  parameters:
    Id:
      name: id
      in: path
      required: true
      description: Unique identifier for the resource.
      schema:
        type: integer
      example: 799
    StringId:
      name: id
      in: path
      required: true
      description: Unique string identifier for the resource.
      schema:
        type: string
    ProductIdPath:
      name: product_id
      in: path
      required: true
      description: Unique identifier for the parent product.
      schema:
        type: integer
      example: 799
    OrderIdPath:
      name: order_id
      in: path
      required: true
      description: Unique identifier for the parent order.
      schema:
        type: integer
      example: 1042
    AttributeIdPath:
      name: attribute_id
      in: path
      required: true
      description: Unique identifier for the global attribute.
      schema:
        type: integer
      example: 3
    ZoneIdPath:
      name: zone_id
      in: path
      required: true
      description: Unique identifier for the shipping zone.
      schema:
        type: integer
      example: 3
    InstanceIdPath:
      name: instance_id
      in: path
      required: true
      description: Unique identifier for the shipping method instance within the zone.
      schema:
        type: integer
    GroupIdPath:
      name: group_id
      in: path
      required: true
      description: Settings group identifier.
      schema:
        type: string
      example: general
    Context:
      name: context
      in: query
      description: Scope under which the request is made; determines which fields are returned. `view` omits fields that require elevated capabilities.
      schema:
        type: string
        enum:
          - view
          - edit
        default: view
    Page:
      name: page
      in: query
      description: Current page of the collection.
      schema:
        type: integer
        minimum: 1
        default: 1
    PerPage:
      name: per_page
      in: query
      description: Maximum number of items returned per page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    Search:
      name: search
      in: query
      description: Limit results to those matching a string.
      schema:
        type: string
    Offset:
      name: offset
      in: query
      description: Offset the result set by a specific number of items.
      schema:
        type: integer
        minimum: 0
    Order:
      name: order
      in: query
      description: Sort direction.
      schema:
        type: string
        enum:
          - asc
          - desc
        default: desc
    OrderBy:
      name: orderby
      in: query
      description: Field to sort the collection by.
      schema:
        type: string
        enum:
          - date
          - id
          - include
          - title
          - slug
          - modified
        default: date
    Include:
      name: include
      in: query
      description: Limit the result set to specific IDs.
      schema:
        type: array
        items:
          type: integer
      style: form
      explode: false
      example:
        - 799
        - 812
    Exclude:
      name: exclude
      in: query
      description: Ensure the result set excludes specific IDs.
      schema:
        type: array
        items:
          type: integer
      style: form
      explode: false
    After:
      name: after
      in: query
      description: Limit response to resources published after a given ISO 8601 date.
      schema:
        type: string
        format: date-time
    Before:
      name: before
      in: query
      description: Limit response to resources published before a given ISO 8601 date.
      schema:
        type: string
        format: date-time
    ModifiedAfter:
      name: modified_after
      in: query
      description: Limit response to resources modified after a given ISO 8601 date.
      schema:
        type: string
        format: date-time
    ModifiedBefore:
      name: modified_before
      in: query
      description: Limit response to resources modified before a given ISO 8601 date.
      schema:
        type: string
        format: date-time
    DatesAreGmt:
      name: dates_are_gmt
      in: query
      description: Interpret `after`/`before` (and their modified variants) as GMT rather than site time.
      schema:
        type: boolean
        default: false
    Force:
      name: force
      in: query
      description: Permanently delete the resource instead of moving it to the trash. Required (and forced to `true`) for resources that do not support trashing.
      schema:
        type: boolean
        default: false
    Reassign:
      name: reassign
      in: query
      description: User ID to reassign the deleted customer’s posts and orders to.
      schema:
        type: integer
    Parent:
      name: parent
      in: query
      description: Limit result set to resources with the specified parent IDs.
      schema:
        type: array
        items:
          type: integer
      style: form
      explode: false
    ParentExclude:
      name: parent_exclude
      in: query
      description: Limit result set to all items except those with the specified parent IDs.
      schema:
        type: array
        items:
          type: integer
      style: form
      explode: false
    HideEmpty:
      name: hide_empty
      in: query
      description: Hide terms not assigned to any products.
      schema:
        type: boolean
        default: false
    ReportPeriod:
      name: period
      in: query
      description: Preset report period.
      schema:
        type: string
        enum:
          - week
          - month
          - last_month
          - year
        default: week
    ReportDateMin:
      name: date_min
      in: query
      description: Return report data after this date (YYYY-MM-DD).
      schema:
        type: string
        format: date
    ReportDateMax:
      name: date_max
      in: query
      description: Return report data before this date (YYYY-MM-DD).
      schema:
        type: string
        format: date
  responses:
    BadRequest:
      description: Invalid or missing parameters.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: rest_invalid_param
            message: "Invalid parameter(s): per_page"
            data:
              status: 400
              params:
                per_page: per_page must be between 1 and 100 (inclusive)
    Unauthorized:
      description: Authentication failed. The consumer key/secret was missing, malformed or rejected.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: woocommerce_rest_authentication_error
            message: Consumer key is invalid.
            data:
              status: 401
    Forbidden:
      description: Authenticated, but the key’s permissions do not cover this operation (e.g. a read-only key attempting a write).
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: woocommerce_rest_cannot_create
            message: Sorry, you are not allowed to create resources.
            data:
              status: 403
    NotFound:
      description: No resource matches the supplied identifier.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: woocommerce_rest_invalid_id
            message: Invalid ID.
            data:
              status: 404
    MethodNotAllowed:
      description: The demo proxy is running read-only. Set `PROXY_ALLOW_WRITES=true` to permit writes.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: proxy_read_only
            message: This gateway is running in read-only mode; POST, PUT, PATCH and DELETE are blocked.
            data:
              status: 405
    TooManyRequests:
      description: Rate limit exceeded for this gateway.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: proxy_rate_limited
            message: Too many requests. Slow down and retry shortly.
            data:
              status: 429
    ServerError:
      description: Unexpected upstream or gateway failure.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: proxy_upstream_error
            message: The WooCommerce store did not respond in time.
            data:
              status: 502
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic auth. Username = consumer key (`ck_...`), password = consumer secret (`cs_...`). Requires HTTPS.
    consumerKeyQuery:
      type: apiKey
      in: query
      name: consumer_key
      description: Consumer key as a query parameter. Use together with `consumer_secret` when the `Authorization` header cannot be relied on.
    consumerSecretQuery:
      type: apiKey
      in: query
      name: consumer_secret
      description: Consumer secret as a query parameter. Pairs with `consumer_key`.
