ProductVariant
Describes a product variant.
Type Definition
type ProductVariant {
product: Product
productId: Int
measureUnit: String
weightUnit: String
unit: String
selected: Boolean
image: Image
featuredImage: Image
previousPrices: PreviousPriceConnection
previousLowerPrice: PreviousPrice
isNew: Boolean
option1: ProductVariantOption
option2: ProductVariantOption
option3: ProductVariantOption
options: [ProductVariantOption]
url: String
id: Int
title: String
hasCustomizationsWithPrice: Boolean
customizations: [CustomizationGroup]
inPreview: Boolean
isAvailable: Boolean
isDirectlyBuyable: Boolean
gtin: String
modelNumber: String
rate: Float
bundleContents: [ProductBundleContent]
discountInformation: ProductDiscount
promotion: ProductPromotion
bulkRates: [ProductBulkRate]
originalNetPrice: Float
originalPrice: Float
netPrice: Float
price: Float
tax: Float
isOutOfStock: Boolean
stockAlarm: Boolean
discontinuedProduct: Boolean
inventoryManagement: String
notificationsSupported: Boolean
inventoryPolicy: String
attributeBasedInventory: Boolean
stock: Int
stockInOtherInventories: Boolean
quantitiesInOtherInventories: [InventoryQuantity]
sku: String
deliveryTime: DeliveryTime
weight: Float
length: Float
height: Float
width: Float
inCustomersWishlist: Boolean
customerHasPurchased: Boolean
additionalBuyButtons: Boolean
contentForAdditionalBuyButtons: String
financingOffers: Boolean
contentForFinancingOffers: String
createdAt: String
updatedAt: String
requiresShipping: Boolean
minQuantity: Int
maxQuantity: Int
}Fields
| Field | Type | Description |
|---|---|---|
| product | Product | Returns the product object. |
| productId | Int | Returns the variant product id. |
| measureUnit | String | Returns the measure unit name |
| weightUnit | String | Returns the weight unit name |
| unit | String | Returns the product quantity unit |
| selected | Boolean | Returns true if this variant is selected in the product page. |
| image | Image | Returns the image of the product variant. Alias for featured_image. |
| featuredImage | Image | Returns the featured image of the product variant. |
| previousPrices | PreviousPriceConnection | Returns information about the previous prices in GraphQL format. |
| previousLowerPrice | PreviousPrice | Returns information about the previous lower price in GraphQL format. |
| isNew | Boolean | Returns true if products in considered as new. |
| option1 | ProductVariantOption | Returns the first option with its selected value in GraphQL format. |
| option2 | ProductVariantOption | Returns the second option with its selected value in GraphQL format. |
| option3 | ProductVariantOption | Returns the third option with its selected value in GraphQL format. |
| options | [ProductVariantOption] | Returns all options with their selected values in GraphQL format. |
| url | String | Returns the url. |
| id | Int | Returns the id. |
| title | String | Returns the title. |
| hasCustomizationsWithPrice | Boolean | Returns true if some of the customizations are increasing product price. |
| customizations | [CustomizationGroup] | The product customization groups for this variant. |
| inPreview | Boolean | Returns true if product is in preview. |
| isAvailable | Boolean | Returns true if product is available for purchase. |
| isDirectlyBuyable | Boolean | Returns true if product can be bought without selecting any attributes. |
| gtin | String | Returns the GTIN number. |
| modelNumber | String | Returns the product model number. |
| rate | Float | Returns the tax rate. This is same as product tax rate. |
| bundleContents | [ProductBundleContent] | Returns the bundle contents. |
| discountInformation | ProductDiscount | Returns the discount if any. |
| promotion | ProductPromotion | Returns the promotion if any. |
| bulkRates | [ProductBulkRate] | Returns the bulk rates if any. |
| originalNetPrice | Float | Returns the original net price without any discounts |
| originalPrice | Float | Returns the original price without any discounts |
| netPrice | Float | Returns the net price |
| price | Float | Returns the price |
| tax | Float | Returns the tax amount |
| isOutOfStock | Boolean | Returns true if product is out of stock |
| stockAlarm | Boolean | Returns true if product is low on stock. |
| discontinuedProduct | Boolean | Returns true if product won’t be restocked when it runs out of stock. |
| inventoryManagement | String | Returns the inventory management. |
| notificationsSupported | Boolean | Returns true if product supports availability notifications. |
| inventoryPolicy | String | Returns the inventory policy, continue or deny. |
| attributeBasedInventory | Boolean | Returns true if inventory is based on attributes rather than on product itself. |
| stock | Int | Returns the stock quantity |
| stockInOtherInventories | Boolean | Returns true if product has stock set in other inventories. |
| quantitiesInOtherInventories | [InventoryQuantity] | Returns the stock quantity in other inventories in GraphQL format. |
| sku | String | Returns the SKU |
| deliveryTime | DeliveryTime | Returns the delivery time in GraphQL format. |
| weight | Float | Returns the weight |
| length | Float | Returns the length |
| height | Float | Returns the height |
| width | Float | Returns the width |
| inCustomersWishlist | Boolean | Returns true if products is in customers wishlist. |
| customerHasPurchased | Boolean | Returns true if customer has purchased the product. |
| additionalBuyButtons | Boolean | Returns true if there are additional buy buttons. |
| contentForAdditionalBuyButtons | String | Returns the content for the additional buy buttons. |
| financingOffers | Boolean | Returns the financing offers. |
| contentForFinancingOffers | String | Returns the content for the financing offers. |
| createdAt | String | Returns the creation date. |
| updatedAt | String | Returns the last updated date. |
| requiresShipping | Boolean | Returns true if product requires shipping. |
| minQuantity | Int | Returns the minimum quantity that can be bought. |
| maxQuantity | Int | Returns the maximum quantity that can be bought. |
Relationships
ProductVariant represents a specific variant of a product and maintains relationships with several key types. It references a parent Product object, allowing access to product-level information. The variant can contain multiple ProductVariantOption objects representing customizable attributes. It also relates to pricing and promotional information through PreviousPrice, ProductDiscount, ProductPromotion, and ProductBulkRate types. The variant can include visual content via Image and shipping details through DeliveryTime. For products with bundles, it references ProductBundleContent, and for customizable products, it contains CustomizationGroup objects. Inventory information across multiple locations is accessible through InventoryQuantity.
Example
{
productVariant(id: 12345) {
id
title
sku
price
netPrice
originalPrice
isAvailable
isOutOfStock
stock
product {
id
title
}
featuredImage {
url
alt
}
options {
name
value
}
deliveryTime {
min
max
}
}
}Implements
This type does not implement any interfaces.