WooCommerce · JSON Structure

Woocommerce Rest Api Product Structure

A WooCommerce product in the store catalog.

Type: object Properties: 30
eCommerceOpen SourceOrdersProductsWordPress

Product is a JSON Structure definition published by WooCommerce, describing 30 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id name slug permalink type status featured description short_description sku price regular_price sale_price on_sale purchasable total_sales virtual downloadable manage_stock stock_quantity stock_status weight dimensions categories tags images attributes date_created date_modified meta_data

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/json-structure/woocommerce-rest-api-product-structure.json",
  "name": "Product",
  "description": "A WooCommerce product in the store catalog.",
  "type": "object",
  "properties": {
    "id": {
      "type": "int32",
      "description": "Product unique identifier.",
      "example": 1
    },
    "name": {
      "type": "string",
      "description": "Product name.",
      "example": "Example Name"
    },
    "slug": {
      "type": "string",
      "description": "URL-friendly product identifier.",
      "example": "string-value"
    },
    "permalink": {
      "type": "uri",
      "description": "Product URL on the storefront.",
      "example": "https://example.com/path"
    },
    "type": {
      "type": "string",
      "description": "Product type. Options: simple, grouped, external, variable.",
      "enum": [
        "simple",
        "grouped",
        "external",
        "variable"
      ],
      "example": "simple"
    },
    "status": {
      "type": "string",
      "description": "Product status. Options: draft, pending, private, publish.",
      "enum": [
        "draft",
        "pending",
        "private",
        "publish"
      ],
      "example": "draft"
    },
    "featured": {
      "type": "boolean",
      "description": "Whether the product is featured.",
      "example": true
    },
    "description": {
      "type": "string",
      "description": "Full product description (HTML allowed).",
      "example": "A sample description"
    },
    "short_description": {
      "type": "string",
      "description": "Short product description (HTML allowed).",
      "example": "A sample description"
    },
    "sku": {
      "type": "string",
      "description": "Stock-keeping unit identifier.",
      "example": "string-value"
    },
    "price": {
      "type": "string",
      "description": "Current product price as a decimal string.",
      "example": "string-value"
    },
    "regular_price": {
      "type": "string",
      "description": "Regular product price as a decimal string.",
      "example": "string-value"
    },
    "sale_price": {
      "type": "string",
      "description": "Sale price as a decimal string. Empty string when not on sale.",
      "example": "string-value"
    },
    "on_sale": {
      "type": "boolean",
      "description": "Whether the product is on sale.",
      "example": true
    },
    "purchasable": {
      "type": "boolean",
      "description": "Whether the product can be bought.",
      "example": true
    },
    "total_sales": {
      "type": "int32",
      "description": "Total number of sales for the product.",
      "example": 1
    },
    "virtual": {
      "type": "boolean",
      "description": "Whether the product is virtual (no shipping required).",
      "example": true
    },
    "downloadable": {
      "type": "boolean",
      "description": "Whether the product is downloadable.",
      "example": true
    },
    "manage_stock": {
      "type": "boolean",
      "description": "Whether stock management is enabled for this product.",
      "example": true
    },
    "stock_quantity": {
      "type": "int32",
      "description": "Stock quantity when manage_stock is true.",
      "nullable": true,
      "example": 1
    },
    "stock_status": {
      "type": "string",
      "description": "Stock status. Options: instock, outofstock, onbackorder.",
      "enum": [
        "instock",
        "outofstock",
        "onbackorder"
      ],
      "example": "instock"
    },
    "weight": {
      "type": "string",
      "description": "Product weight as a string in the store weight unit.",
      "example": "string-value"
    },
    "dimensions": {
      "type": "object",
      "description": "Product dimensions.",
      "properties": {
        "length": {
          "type": "string",
          "description": "Product length."
        },
        "width": {
          "type": "string",
          "description": "Product width."
        },
        "height": {
          "type": "string",
          "description": "Product height."
        }
      },
      "example": {
        "length": "string-value",
        "width": "string-value",
        "height": "string-value"
      }
    },
    "categories": {
      "type": "array",
      "description": "Categories assigned to the product.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "int32",
            "description": "Category ID."
          },
          "name": {
            "type": "string",
            "description": "Category name."
          },
          "slug": {
            "type": "string",
            "description": "Category slug."
          }
        }
      },
      "example": [
        {
          "id": 1,
          "name": "Example Name",
          "slug": "string-value"
        }
      ]
    },
    "tags": {
      "type": "array",
      "description": "Tags assigned to the product.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "int32",
            "description": "Tag ID."
          },
          "name": {
            "type": "string",
            "description": "Tag name."
          },
          "slug": {
            "type": "string",
            "description": "Tag slug."
          }
        }
      },
      "example": [
        {
          "id": 1,
          "name": "Example Name",
          "slug": "string-value"
        }
      ]
    },
    "images": {
      "type": "array",
      "description": "Images associated with the product.",
      "items": {
        "type": "object",
        "description": "An image associated with a product.",
        "properties": {
          "id": {
            "type": "int32",
            "description": "Image unique identifier.",
            "example": 1
          },
          "src": {
            "type": "uri",
            "description": "Image URL.",
            "example": "https://example.com/path"
          },
          "name": {
            "type": "string",
            "description": "Image name.",
            "example": "Example Name"
          },
          "alt": {
            "type": "string",
            "description": "Image alternative text.",
            "example": "string-value"
          }
        }
      },
      "example": [
        "string-value"
      ]
    },
    "attributes": {
      "type": "array",
      "description": "Product attributes for variable products.",
      "items": {
        "type": "object",
        "description": "A product attribute with option values.",
        "properties": {
          "id": {
            "type": "int32",
            "description": "Attribute ID (0 for custom attributes).",
            "example": 1
          },
          "name": {
            "type": "string",
            "description": "Attribute name.",
            "example": "Example Name"
          },
          "position": {
            "type": "int32",
            "description": "Attribute position in the product.",
            "example": 1
          },
          "visible": {
            "type": "boolean",
            "description": "Whether the attribute is visible on the product page.",
            "example": true
          },
          "variation": {
            "type": "boolean",
            "description": "Whether the attribute is used to define variations.",
            "example": true
          },
          "options": {
            "type": "array",
            "description": "List of available options (terms) for this attribute.",
            "items": {
              "type": "string"
            },
            "example": [
              "string-value"
            ]
          }
        }
      },
      "example": [
        "string-value"
      ]
    },
    "date_created": {
      "type": "datetime",
      "description": "Date the product was created, in the site timezone.",
      "example": "2026-05-03T14:30:00Z"
    },
    "date_modified": {
      "type": "datetime",
      "description": "Date the product was last modified, in the site timezone.",
      "example": "2026-05-03T14:30:00Z"
    },
    "meta_data": {
      "type": "array",
      "description": "Custom metadata attached to the product.",
      "items": {
        "type": "object",
        "description": "Custom metadata key-value entry.",
        "properties": {
          "id": {
            "type": "int32",
            "description": "Metadata unique identifier.",
            "example": 1
          },
          "key": {
            "type": "string",
            "description": "Metadata key.",
            "example": "string-value"
          },
          "value": {
            "type": "string",
            "description": "Metadata value.",
            "example": "string-value"
          }
        }
      },
      "example": [
        "string-value"
      ]
    }
  }
}