WooCommerce · JSON Structure
Woocommerce Store Api Store Product Structure
A store product returned by the public Store API.
Type: object
Properties: 23
eCommerceOpen SourceOrdersProductsWordPress
StoreProduct is a JSON Structure definition published by WooCommerce, describing 23 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
Properties
id
name
slug
parent
type
variation
permalink
sku
short_description
description
on_sale
prices
purchasable
images
categories
tags
attributes
average_rating
review_count
is_in_stock
low_stock_remaining
sold_individually
add_to_cart
Meta-schema: https://json-structure.org/meta/core/v0/#
JSON Structure
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/json-structure/woocommerce-store-api-store-product-structure.json",
"name": "StoreProduct",
"description": "A store product returned by the public Store API.",
"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 slug.",
"example": "string-value"
},
"parent": {
"type": "int32",
"description": "Parent product ID for variations.",
"example": 1
},
"type": {
"type": "string",
"description": "Product type (simple, variable, grouped, external).",
"example": "standard"
},
"variation": {
"type": "string",
"description": "Variation description for variation-type products.",
"example": "string-value"
},
"permalink": {
"type": "uri",
"description": "Full URL to the product page.",
"example": "https://example.com/path"
},
"sku": {
"type": "string",
"description": "Product SKU.",
"example": "string-value"
},
"short_description": {
"type": "string",
"description": "Short product description (HTML).",
"example": "A sample description"
},
"description": {
"type": "string",
"description": "Full product description (HTML).",
"example": "A sample description"
},
"on_sale": {
"type": "boolean",
"description": "Whether the product is on sale.",
"example": true
},
"prices": {
"type": "object",
"description": "Formatted price information for a product or variation.",
"properties": {
"price": {
"type": "string",
"description": "Current price as a formatted string with currency symbol.",
"example": "string-value"
},
"regular_price": {
"type": "string",
"description": "Regular price as a formatted string.",
"example": "string-value"
},
"sale_price": {
"type": "string",
"description": "Sale price as a formatted string (empty when not on sale).",
"example": "string-value"
},
"price_range": {
"type": "object",
"description": "Price range for variable products.",
"nullable": true,
"properties": {
"min_amount": {
"type": "string",
"description": "Minimum variation price."
},
"max_amount": {
"type": "string",
"description": "Maximum variation price."
}
},
"example": {
"min_amount": "string-value",
"max_amount": "string-value"
}
},
"currency_code": {
"type": "string",
"description": "ISO 4217 currency code.",
"example": "string-value"
},
"currency_symbol": {
"type": "string",
"description": "Currency symbol.",
"example": "string-value"
},
"currency_decimal_separator": {
"type": "string",
"description": "Decimal separator character.",
"example": "string-value"
},
"currency_thousand_separator": {
"type": "string",
"description": "Thousands separator character.",
"example": "string-value"
},
"currency_prefix": {
"type": "string",
"description": "Currency prefix (e.g. $).",
"example": "string-value"
},
"currency_suffix": {
"type": "string",
"description": "Currency suffix.",
"example": "string-value"
}
}
},
"purchasable": {
"type": "boolean",
"description": "Whether the product can be purchased.",
"example": true
},
"images": {
"type": "array",
"description": "Product images.",
"items": {
"type": "object",
"description": "Product image with thumbnail variants.",
"properties": {
"id": {
"type": "int32",
"description": "Image attachment ID.",
"example": 1
},
"src": {
"type": "uri",
"description": "Full-size image URL.",
"example": "https://example.com/path"
},
"thumbnail": {
"type": "uri",
"description": "Thumbnail image URL.",
"example": "https://example.com/path"
},
"srcset": {
"type": "string",
"description": "Responsive image srcset attribute value.",
"example": "string-value"
},
"sizes": {
"type": "string",
"description": "Responsive image sizes attribute value.",
"example": "string-value"
},
"name": {
"type": "string",
"description": "Image file name.",
"example": "Example Name"
},
"alt": {
"type": "string",
"description": "Image alternative text.",
"example": "string-value"
}
}
},
"example": [
"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."
},
"link": {
"type": "uri",
"description": "Category archive URL."
}
}
},
"example": [
{
"id": 1,
"name": "Example Name",
"slug": "string-value",
"link": "https://example.com/path"
}
]
},
"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."
},
"link": {
"type": "uri",
"description": "Tag archive URL."
}
}
},
"example": [
{
"id": 1,
"name": "Example Name",
"slug": "string-value",
"link": "https://example.com/path"
}
]
},
"attributes": {
"type": "array",
"description": "Product attributes.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "int32",
"description": "Attribute ID."
},
"name": {
"type": "string",
"description": "Attribute name."
},
"taxonomy": {
"type": "string",
"description": "Attribute taxonomy slug."
},
"has_variations": {
"type": "boolean",
"description": "Whether this attribute is used for variations."
},
"terms": {
"type": "array",
"description": "Attribute terms.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "int32",
"description": "Term ID."
},
"name": {
"type": "string",
"description": "Term name."
},
"slug": {
"type": "string",
"description": "Term slug."
}
}
}
}
}
},
"example": [
{
"id": 1,
"name": "Example Name",
"taxonomy": "string-value",
"has_variations": true,
"terms": [
{
"id": {},
"name": {},
"slug": {}
}
]
}
]
},
"average_rating": {
"type": "string",
"description": "Average product rating as a decimal string.",
"example": "string-value"
},
"review_count": {
"type": "int32",
"description": "Number of approved reviews.",
"example": 1
},
"is_in_stock": {
"type": "boolean",
"description": "Whether the product is in stock.",
"example": true
},
"low_stock_remaining": {
"type": "int32",
"description": "Remaining stock quantity when low stock notice is applicable.",
"nullable": true,
"example": 1
},
"sold_individually": {
"type": "boolean",
"description": "Whether the product must be bought individually.",
"example": true
},
"add_to_cart": {
"type": "object",
"description": "Add-to-cart action details.",
"properties": {
"text": {
"type": "string",
"description": "Button label text."
},
"description": {
"type": "string",
"description": "Accessible button description."
},
"url": {
"type": "uri",
"description": "Add-to-cart URL for non-AJAX contexts."
}
},
"example": {
"text": "string-value",
"description": "A sample description",
"url": "https://example.com/path"
}
}
}
}