Skip to main content

ProductVariant

Represents a version of a product such as different size or color.

type ProductVariant implements Node, ObjectWithMetadata {
id: ID!
metadata: [MetadataItem!]!
privateMetadata: [MetadataItem!]!
name: String!
sku: String
nauticalStockNumber: String
trackInventory: Boolean!
currency: String!
overrideCurrency: Boolean!
isPriceOverrideAllowed: Boolean!
isDigital: Boolean!
isShippingRequired: Boolean!
isPublished: Boolean!
publishedAt: DateTime
createdAt: DateTime!
updatedAt: DateTime!
seoTitle: String
seoDescription: String
externalId: String
externalSource: String
allowBackorders: Boolean
status: ProductVariantStatus!
subStatus: ProductSubStatusEnum
dimensions: ProductDimensions
warnings: [WarningMessageItem!]!
weight: Weight
pricing: VariantPricingInfo
product: Product
seller: Seller
images: [ProductImage!]!
attributes: [SelectedAttribute!]!
customFields: [SelectedAttribute!]!
price: Money
costPrice: Money
margin: Int
digitalContent: DigitalContent
stocks(
countryCode: CountryCode
): [Stock!]!
quantityAvailable(
countryCode: CountryCode
): Int!
quantityOrdered: Int
netRevenue: Float
grossRevenue: Float
sortOrderInCollection: Int
availableImages: [ProductImage!]!
documents: [Document!]!
stockEvents: [StockEvent!]!
sales: [Sale!]!
vouchers: [Voucher!]!
webhookHistory(
before: String
after: String
first: Int
last: Int
): ShopifyWebhookTransactionCountableConnection!
}
Show more ↓

Fields

ProductVariant.id ● ID! non-null scalar

The Globally Unique ID of this object

ProductVariant.metadata ● [MetadataItem!]! non-null object

List of public metadata items. Can be accessed without permissions.

ProductVariant.privateMetadata ● [MetadataItem!]! non-null object

List of private metadata items. Requires proper staff permissions to access.

ProductVariant.name ● String! non-null scalar

Name of the variant

ProductVariant.sku ● String scalar

Stock Keeping Unit

ProductVariant.nauticalStockNumber ● String scalar

Nautical Stock Number (NSN)

ProductVariant.trackInventory ● Boolean! non-null scalar

Whether to track inventory for this variant

ProductVariant.currency ● String! non-null scalar

Currency code for pricing

ProductVariant.overrideCurrency ● Boolean! non-null scalar

Whether to override the default currency

ProductVariant.isPriceOverrideAllowed ● Boolean! non-null scalar

Whether price override is allowed

ProductVariant.isDigital ● Boolean! non-null scalar

Whether this is a digital product variant

ProductVariant.isShippingRequired ● Boolean! non-null scalar

Whether shipping is required for this variant

ProductVariant.isPublished ● Boolean! non-null scalar

Whether the product variant is published

ProductVariant.publishedAt ● DateTime scalar

When the variant was published

ProductVariant.createdAt ● DateTime! non-null scalar

When the variant was created

ProductVariant.updatedAt ● DateTime! non-null scalar

When the variant was last updated

ProductVariant.seoTitle ● String scalar

SEO title

ProductVariant.seoDescription ● String scalar

SEO meta description

ProductVariant.externalId ● String scalar

External system identifier

ProductVariant.externalSource ● String scalar

External system source

ProductVariant.allowBackorders ● Boolean scalar

Whether backorders are allowed

ProductVariant.status ● ProductVariantStatus! non-null enum

Status of the variant

ProductVariant.subStatus ● ProductSubStatusEnum enum

The sub status of the product variant

ProductVariant.dimensions ● ProductDimensions object

Product dimensions

ProductVariant.warnings ● [WarningMessageItem!]! non-null object

List of warnings for this variant

ProductVariant.weight ● Weight object

Weight of the variant

ProductVariant.pricing ● VariantPricingInfo object

Variant pricing information for storefront display

ProductVariant.product ● Product object

The product this variant belongs to

ProductVariant.seller ● Seller object

The seller that owns this variant

ProductVariant.images ● [ProductImage!]! non-null object

List of images assigned to this variant

ProductVariant.attributes ● [SelectedAttribute!]! non-null object

List of attributes assigned to this variant

ProductVariant.customFields ● [SelectedAttribute!]! non-null object

List of custom fields assigned to this variant

ProductVariant.price ● Money object

Base price of the variant (requires MANAGE_PRODUCTS permission)

ProductVariant.costPrice ● Money object

Cost price of the variant (requires MANAGE_PRODUCTS permission)

ProductVariant.margin ● Int scalar

Gross margin percentage (requires MANAGE_PRODUCTS permission)

ProductVariant.digitalContent ● DigitalContent object

Digital content (requires MANAGE_PRODUCTS permission)

ProductVariant.stocks ● [Stock!]! non-null object

Stock information (requires MANAGE_PRODUCTS or MANAGE_ORDERS)

ProductVariant.stocks.countryCode ● CountryCode enum

ProductVariant.quantityAvailable ● Int! non-null scalar

Quantity of variant available for sale

ProductVariant.quantityAvailable.countryCode ● CountryCode enum

ProductVariant.quantityOrdered ● Int scalar

Total quantity ordered.

ProductVariant.netRevenue ● Float scalar

Net revenue from sales.

ProductVariant.grossRevenue ● Float scalar

Gross revenue from sales.

ProductVariant.sortOrderInCollection ● Int scalar

Variant sort order in the specific collection.

ProductVariant.availableImages ● [ProductImage!]! non-null object

List of product images available for assignment to a variant.

ProductVariant.documents ● [Document!]! non-null object

List of documents associated with the product variant.

ProductVariant.stockEvents ● [StockEvent!]! non-null object

List of stock events associated with the variant.

ProductVariant.sales ● [Sale!]! non-null object

List of sales associated with the product.

ProductVariant.vouchers ● [Voucher!]! non-null object

List of vouchers associated with the product.

ProductVariant.webhookHistory ● ShopifyWebhookTransactionCountableConnection! non-null object

Shopify webhook events related to this variant.

ProductVariant.webhookHistory.before ● String scalar

Returns the items in the list that come before the specified cursor.

ProductVariant.webhookHistory.after ● String scalar

Returns the items in the list that come after the specified cursor.

ProductVariant.webhookHistory.first ● Int scalar

Returns the first n items from the list.

ProductVariant.webhookHistory.last ● Int scalar

Returns the items in the list that come after the specified cursor.

Interfaces

Node interface

An object with a Globally Unique ID

ObjectWithMetadata interface

An object that supports metadata.

Returned By

productVariant query

Member Of

CheckoutLine object ● DigitalContent object ● DigitalContentCreate object ● DigitalContentDelete object ● DigitalContentUpdate object ● NauticalOrderLine object ● OrderLine object ● Product object ● ProductVariantBulkCreate object ● ProductVariantCountableEdge object ● ProductVariantCreate object ● ProductVariantDelete object ● ProductVariantImageAssign object ● ProductVariantImageBulkAssign object ● ProductVariantImageUnassign object ● ProductVariantStocksCreate object ● ProductVariantStocksDelete object ● ProductVariantStocksUpdate object ● ProductVariantUpdate object ● ProductVariantVideoAssign object ● ProductVariantVideoUnassign object ● Stock object ● WishlistItem object

Implemented By

CustomFieldInstance union ● DocumentTargetInstance union

Was this page helpful?