Skip to main content
GET
/
products
/
{product_id}
/
variations
[
  {
    "id": 123,
    "date_created": "2023-11-07T05:31:56Z",
    "date_created_gmt": "2023-11-07T05:31:56Z",
    "date_modified": "2023-11-07T05:31:56Z",
    "date_modified_gmt": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "permalink": "<string>",
    "sku": "<string>",
    "price": "<string>",
    "regular_price": "<string>",
    "sale_price": "<string>",
    "date_on_sale_from": "2023-11-07T05:31:56Z",
    "date_on_sale_from_gmt": "2023-11-07T05:31:56Z",
    "date_on_sale_to": "2023-11-07T05:31:56Z",
    "date_on_sale_to_gmt": "2023-11-07T05:31:56Z",
    "on_sale": true,
    "status": "<string>",
    "purchasable": true,
    "virtual": true,
    "downloadable": true,
    "downloads": [
      {
        "id": "<string>",
        "name": "<string>",
        "file": "<string>"
      }
    ],
    "download_limit": 123,
    "download_expiry": 123,
    "tax_status": "<string>",
    "tax_class": "<string>",
    "manage_stock": true,
    "stock_quantity": 123,
    "stock_status": "<string>",
    "backorders": "<string>",
    "backorders_allowed": true,
    "backordered": true,
    "weight": "<string>",
    "dimensions": {
      "length": "<string>",
      "width": "<string>",
      "height": "<string>"
    },
    "shipping_class": "<string>",
    "shipping_class_id": 123,
    "image": {
      "id": 123,
      "src": "<string>",
      "name": "<string>",
      "alt": "<string>"
    },
    "attributes": [
      {
        "id": 123,
        "name": "<string>",
        "option": "<string>"
      }
    ],
    "meta_data": [
      {
        "id": 123,
        "key": "<string>",
        "value": "<string>"
      }
    ],
    "links": {
      "self": [
        {
          "href": "<string>"
        }
      ],
      "collection": [
        {
          "href": "<string>"
        }
      ],
      "up": [
        {
          "href": "<string>"
        }
      ]
    }
  }
]

Path Parameters

product_id
integer
required

Unique identifier for the variable product.

Query Parameters

context
enum<string>
default:view

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

Available options:
view,
embed
page
integer
default:1

Current page of the collection.

per_page
integer
default:10

Maximum number of items to be returned in result set.

Required range: x <= 100

Limit results to those matching a string.

after
string<date-time>

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

before
string<date-time>

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

modified_after
string<date-time>

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

modified_before
string<date-time>

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

dates_are_gmt
boolean
default:false

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

exclude
integer[]

Ensure result set excludes specific IDs.

include
integer[]

Limit result set to specific IDs.

offset
integer

Offset the result set by a specific number of items.

order
enum<string>
default:desc

Order sort attribute ascending or descending.

Available options:
asc,
desc
orderby
enum<string>
default:date

Sort collection by object attribute.

Available options:
date,
id,
include,
title,
slug,
price,
popularity,
rating,
menu_order
parent
integer[]

Limit result set to those of particular parent IDs.

parent_exclude
integer[]

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

slug
string

Limit result set to products with a specific slug.

status
enum<string>
default:publish

Limit result set to products assigned a specific status.

Available options:
draft,
pending,
private,
publish
sku
string

Limit result set to products with a specific SKU.

Limit result set to featured products.

on_sale
boolean

Limit result set to products on sale.

min_price
string

Limit result set to products based on a minimum price.

max_price
string

Limit result set to products based on a maximum price.

stock_status
enum<string>

Limit result set to products with specified stock status.

Available options:
instock,
outofstock,
onbackorder

Response

List of product variations.

id
integer

Unique identifier for the variation.

date_created
string<date-time>

Date when the variation was created.

date_created_gmt
string<date-time>

Date when the variation was created in GMT.

date_modified
string<date-time>

Date when the variation was last modified.

date_modified_gmt
string<date-time>

Date when the variation was last modified in GMT.

description
string

Variation description.

Variation URL.

sku
string

Variation SKU.

price
string

Variation price.

regular_price
string

Variation regular price.

sale_price
string

Variation sale price.

date_on_sale_from
string<date-time>

Date when the sale price starts.

date_on_sale_from_gmt
string<date-time>

Date when the sale price starts in GMT.

date_on_sale_to
string<date-time>

Date when the sale price ends.

date_on_sale_to_gmt
string<date-time>

Date when the sale price ends in GMT.

on_sale
boolean

Whether the variation is on sale.

status
string

Variation status.

purchasable
boolean

Whether the variation is purchasable.

virtual
boolean

Whether the variation is virtual.

downloadable
boolean

Whether the variation is downloadable.

downloads
object[]
download_limit
integer

Download limit.

download_expiry
integer

Download expiry.

tax_status
string

Tax status.

tax_class
string

Tax class.

manage_stock
boolean

Whether stock management is enabled.

stock_quantity
integer

Stock quantity.

stock_status
string

Stock status.

backorders
string

Backorders status.

backorders_allowed
boolean

Whether backorders are allowed.

backordered
boolean

Whether the variation is backordered.

weight
string

Variation weight.

dimensions
object
shipping_class
string

Shipping class.

shipping_class_id
integer

Shipping class ID.

image
object
attributes
object[]
meta_data
object[]
I