variant

A product variant.

PropertiesTypeDescription
availablebooleanReturns true if the variant is available. Returns false if not.
available_quantitynumberThe available quantity of the variant.
barcodestringThe barcode of the variant.
compare_at_pricestringThe compare at price of the variant in the currency's subunit.

The value is output in the customer's local (presentment) currency.
idstringThe ID of the variant.
imageimageThe image is attached to the variant.
inventory_quantitynumberThe inventory quantity of the variant.
notestringThe note of the variant.
off_rationumberThe discount ratio of the variant.
option1stringThe value of the variant for the first product option.

If there's no first product option, then nil is returned.
option2stringThe value of the variant for the second product option.

If there's no second product option, then nil is returned.
option3stringThe value of the variant for the third product option.

If there's no third product option, then nil is returned.
optionsan array of variant_optionThe values of the variant for each product option.
pricestringThe price of the variant in the currency's subunit.

The value is output in the customer's local (presentment) currency.
product_idstringThe id of the parent product of the variant.
retail_pricestringThe retail price of the variant in the currency's subunit.

The value is output in the customer's local (presentment) currency.
salesnumberThe sales of the variant.
skustringThe SKU of the variant.
titlestringA concatenation of each variant option, separated by a -.
urlstringThe URL of the variant.

Variant URLs use the following structure:
/products/[product-handle]?variant=[variant-id]
weightstringThe weight of the variant.
weight_unitstringThe unit for the weight of the variant.
wholesale_pricean arrayThe wholesale price of the variant.
{
  "id": "9953d128-28fe-46d8-b6cb-357994b96b6d",
  "product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
  "title": "DarkRed-35",
  "weight_unit": "kg",
  "inventory_quantity": 83,
  "sku": "WFF19FF0321D32-1",
  "barcode": "",
  "position": 1,
  "option1": "DarkRed",
  "option2": "35",
  "option3": "",
  "note": "1122",
  "image": null,
  "wholesale_price": [
    {
      "price": 328,
      "min_quantity": 1
    }
  ],
  "weight": "0",
  "compare_at_price": "358",
  "price": "328",
  "retail_price": "358",
  "available": true,
  "url": "/products/lace-up-leather-manston-runner?variant=9953d128-28fe-46d8-b6cb-357994b96b6d",
  "available_quantity": 999999999,
  "options": [
    {
      "name": "Color",
      "value": "DarkRed"
    },
    {
      "name": "Size",
      "value": "35"
    }
  ],
  "off_ratio": 8,
  "flashsale_info": [],
  "sales": 4
}