variant
A product variant.
Properties | Type | Description |
---|---|---|
available | boolean | Returns true if the variant is available. Returns false if not. |
available_quantity | number | The available quantity of the variant. |
barcode | string | The barcode of the variant. |
compare_at_price | string | The compare at price of the variant in the currency's subunit. The value is output in the customer's local (presentment) currency. |
id | string | The ID of the variant. |
image | image | The image is attached to the variant. |
inventory_quantity | number | The inventory quantity of the variant. |
note | string | The note of the variant. |
off_ratio | number | The discount ratio of the variant. |
option1 | string | The value of the variant for the first product option. If there's no first product option, then nil is returned. |
option2 | string | The value of the variant for the second product option. If there's no second product option, then nil is returned. |
option3 | string | The value of the variant for the third product option. If there's no third product option, then nil is returned. |
options | an array of variant_option | The values of the variant for each product option. |
price | string | The price of the variant in the currency's subunit. The value is output in the customer's local (presentment) currency. |
product_id | string | The id of the parent product of the variant. |
retail_price | string | The retail price of the variant in the currency's subunit. The value is output in the customer's local (presentment) currency. |
sales | number | The sales of the variant. |
sku | string | The SKU of the variant. |
title | string | A concatenation of each variant option, separated by a - . |
url | string | The URL of the variant. Variant URLs use the following structure: /products/[product-handle]?variant=[variant-id] |
weight | string | The weight of the variant. |
weight_unit | string | The unit for the weight of the variant. |
wholesale_price | an array | The 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
}
Updated over 1 year ago