Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

productVariant Query

Look up a product variant by ID or SKU.

Requires one of the following permissions to include the unpublished items:MANAGE_ORDERSMANAGE_DISCOUNTSMANAGE_PRODUCTS
productVariant(id: ID, sku: String, externalReference: String, channel: String): ProductVariant

Returns

ProductVariant

Show return type
type ProductVariant implements Node & ObjectWithMetadata & ObjectWithAttributes {
  id: ID!
  privateMetadata: [MetadataItem!]!
  privateMetafield(key: String!): String
  privateMetafields(keys: [String!]): Metadata
  metadata: [MetadataItem!]!
  metafield(key: String!): String
  metafields(keys: [String!]): Metadata
  assignedAttribute(slug: String!): AssignedAttribute
  assignedAttributes(limit: PositiveInt = 100): [AssignedAttribute!]!
  name: String!
  sku: String
  product: Product!
  trackInventory: Boolean!
  quantityLimitPerCustomer: Int
  weight: Weight
  channel: String
  channelListings: [ProductVariantChannelListing!]
  pricing(address: AddressInput): VariantPricingInfo
  attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]! @deprecated(reason: "Use the `assignedAttributes` field instead.")
  margin: Int
  quantityOrdered: Int
  revenue(period: ReportingPeriod): TaxedMoney
  images: [ProductImage!] @deprecated(reason: "Use the `media` field instead.")
  media: [ProductMedia!]
  translation(languageCode: LanguageCodeEnum!): ProductVariantTranslation
  stocks(address: AddressInput @deprecated, countryCode: CountryCode @deprecated(reason: "Use `address` argument instead.")): [Stock!]
  quantityAvailable(address: AddressInput @deprecated, countryCode: CountryCode @deprecated(reason: "Use `address` argument instead.")): Int
  preorder: PreorderData @deprecated(reason: "Preorder is deprecated and will be removed. Model pre-sales with regular stock instead: create the planned quantity in a warehouse, or set `trackInventory` to false to sell without a stock limit.")
  created: DateTime!
  updatedAt: DateTime!
  externalReference: String
}

Arguments

id

id · ID

ID of the product variant.

sku

sku · String

SKU of the product variant.

externalReference

externalReference · String

External ID of the product.

channel

channel · String

Slug of a channel for which the data should be returned.


Schema: Saleor 3.23.43. Download SDL.

Last updated on August 24, 2026

Was this page helpful?