---
title: "Get product variations"
method: GET
path: "/products/{id}/variations"
tags: ["product-variations"]
---

# Get product variations

`GET /products/{id}/variations`

Gets variations for a variable product.

## Path parameters

- `id` integer, required

## Query parameters

- `page` integer
- `per_page` integer

## Response `200`

Product variations retrieved successfully.

- ProductVariation[]
  - `id` integer — Unique identifier for the variation
  - `parent_id` integer — Product parent ID (the variable product this variation belongs to)
  - `name` string — Variation name
  - `slug` string — Variation slug
  - `permalink` string — Variation URL
  - `sku` string — Unique identifier (SKU)
  - `description` string — Variation description
  - `dates` object — Variation dates
    - `created` string, date-time — Date created in local time
    - `created_gmt` string, date-time — Date created in GMT
    - `modified` string, date-time — Date modified in local time
    - `modified_gmt` string, date-time — Date modified in GMT
  - `featured` boolean — Whether the variation is featured
  - `prices` object — Variation pricing information
    - `price` string — Current variation price
    - `regular_price` string — Variation regular price
    - `sale_price` string — Variation sale price (empty string if not on sale)
    - `price_range` object, nullable — Price range (null for variations)
    - `on_sale` boolean — Whether the variation is on sale
    - `date_on_sale` object — Sale date information
      - `from` string, date-time, nullable — Sale start date in local time
      - `from_gmt` string, date-time, nullable — Sale start date in GMT
      - `to` string, date-time, nullable — Sale end date in local time
      - `to_gmt` string, date-time, nullable — Sale end date in GMT
    - `currency` Currency
      - `currency_code` string — Currency code.
      - `currency_symbol` string — Currency symbol.
      - `currency_symbol_pos` string — Currency symbol position.
      - `currency_minor_unit` integer — Currency minor unit.
      - `currency_decimal_separator` string — Currency decimal separator.
      - `currency_thousand_separator` string — Currency thousand separator.
      - `currency_prefix` string — Currency prefix.
      - `currency_suffix` string — Currency suffix.
  - `hidden_conditions` object — Variation conditional flags (note reviews_allowed is not present)
    - `virtual` boolean — Whether the variation is virtual
    - `downloadable` boolean — Whether the variation is downloadable
    - `manage_stock` boolean — Whether stock is managed at variation level
    - `sold_individually` boolean — Whether only one item can be bought in a single order
    - `shipping_required` boolean — Whether the variation needs to be shipped
  - `images` ProductImage[] — Variation images
    - `id` integer — Image ID
    - `src` object — Image URLs in different sizes
    - `name` string — Image name
    - `alt` string — Image alternative text
    - `position` integer — Image position in gallery
    - `featured` boolean — Whether this is the featured image
  - `categories` ProductCategory[] — Product categories (inherited from parent)
    - `id` integer — Category ID
    - `name` string — Category name
    - `slug` string — Category slug
    - `rest_url` string — REST URL for this category
  - `tags` ProductTag[] — Product tags (inherited from parent)
    - `id` integer — Tag ID
    - `name` string — Tag name
    - `slug` string — Tag slug
    - `rest_url` string — REST URL for this tag
  - `attributes` ProductAttribute[] — Variation attributes
    - `id` integer — Attribute ID.
    - `name` string — Attribute name.
    - `position` integer — Attribute position.
    - `visible` boolean — Define if the attribute is visible on the "Additional information" tab in the product's page.
    - `variation` boolean — Define if the attribute can be used as variation.
    - `options` string[] — List of available term names of the attribute.
  - `stock` object — Stock information
    - `is_in_stock` boolean — Whether the variation is in stock
    - `stock_quantity` integer, nullable — Stock quantity (null if not managing stock)
    - `stock_status` 'instock' | 'outofstock' | 'onbackorder' — Stock status
    - `backorders` 'no' | 'notify' | 'yes' — If managing stock, this controls if backorders are allowed
    - `backorders_allowed` boolean — Whether backorders are allowed
    - `backordered` boolean — Whether the variation is on backorder
    - `low_stock_amount` integer, nullable — Low stock threshold amount
  - `weight` object — Variation weight
    - `value` string, nullable — Weight value
    - `unit` string — Weight unit (kg, g, lbs, oz, etc.)
  - `dimensions` object — Variation dimensions
    - `length` string, nullable — Length value
    - `width` string, nullable — Width value
    - `height` string, nullable — Height value
    - `unit` string — Dimension unit (cm, m, in, etc.)
  - `total_sales` integer — Total number of sales for this variation
  - `add_to_cart` object — Add to cart information (note has_options is not present)
    - `text` string — Add to cart button text
    - `description` string — Add to cart description
    - `is_purchasable` boolean — Whether the variation is purchasable
    - `purchase_quantity` object — Purchase quantity limits
      - `min_purchase` integer — Minimum purchase quantity
      - `max_purchase` integer — Maximum purchase quantity allowed
    - `rest_url` string — REST URL for adding this variation to cart
  - `meta_data` object[] — Meta data
    - `key` string
    - `value` string

## Other responses

- `400` — Bad request - invalid product ID or parameters.
- `404` — Product not found.

---

[API](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication.md) · [All operations](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cocartapi/cocart-jwt-authentication/revisions/2031b047ca5f/schema)
