v1

latestOpenAPI 3.0.02026-07-226950132.6 KB
product-variations

Get product variations

Returns a list of product variations.

get/products/{product_id}/variations

Path parameters

product_idinteger required

Unique identifier for the variable product.

Query parameters

context'view' | 'embed'

Scope under which the request is made; determines fields present in response.

pageinteger

Current page of the collection.

per_pageinteger

Maximum number of items to be returned in result set.

searchstring

Limit results to those matching a string.

afterstring date-time

Limit response to resources published after a given ISO8601 compliant date.

beforestring date-time

Limit response to resources published before a given ISO8601 compliant date.

modified_afterstring date-time

Limit response to resources modified after a given ISO8601 compliant date.

modified_beforestring date-time

Limit response to resources modified before a given ISO8601 compliant date.

dates_are_gmtboolean

Whether to consider GMT post dates when limiting response by published or modified date.

excludeinteger[]

Ensure result set excludes specific IDs.

includeinteger[]

Limit result set to specific IDs.

offsetinteger

Offset the result set by a specific number of items.

order'asc' | 'desc'

Order sort attribute ascending or descending.

orderby'date' | 'id' | 'include' | 'title' | 'slug' | 'price' | 'popularity' | 'rating' | 'menu_order'

Sort collection by object attribute.

parentinteger[]

Limit result set to those of particular parent IDs.

parent_excludeinteger[]

Limit result set to all items except those of a particular parent ID.

slugstring

Limit result set to products with a specific slug.

status'draft' | 'pending' | 'private' | 'publish'

Limit result set to products assigned a specific status.

skustring

Limit result set to products with a specific SKU.

featuredboolean

Limit result set to featured products.

on_saleboolean

Limit result set to products on sale.

min_pricestring

Limit result set to products based on a minimum price.

max_pricestring

Limit result set to products based on a maximum price.

stock_status'instock' | 'outofstock' | 'onbackorder'

Limit result set to products with specified stock status.

Response

List of product variations.

idinteger

Unique identifier for the variation

parent_idinteger

Product parent ID (the variable product this variation belongs to)

namestring

Variation name

slugstring

Variation slug

permalinkstring

Variation URL

skustring

Unique identifier (SKU)

descriptionstring

Variation description

featuredboolean

Whether the variation is featured

total_salesinteger

Total number of sales for this variation