---
title: "productVariant"
description: "Retrieve a ProductVariant using the provided ID."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/product-variant'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/product-variant.md'
---
# productVariant

Retrieve a ProductVariant using the provided ID.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`ProductVariant`

## Arguments

* `id`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The ProductVariant's ID

## Returns

* `availableForSale`

  [Boolean!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  The availability of the variant for sale.

* `barcode`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The barcode value linked to the product.

* `compareAtPrice`

  [Money](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/money.md)

  The variant's original price, using the store's default currency.

* `createdAt`

  [Date!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/date.md)

  Creation date and time of the variant.

* `defaultCursor`

  [String!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Returns the default cursor for the next variant, sorted in ascending order by variant ID.

* `displayName`

  [String!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The variant's display name, derived from the product title and variant title.

* `id`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The ID of product variant, a universally unique identifier.

* `image`

  [Image](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/image.md)

  The image of the variant.

* `inventoryItem`

  [InventoryItem!](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/objects/inventory-item.md)

  A product inventory item used for querying stock information.

* `inventoryPolicy`

  [ProductVariantInventoryPolicy](https://developer.shopline.com/docs/admin-graph-ql-api/inventory/enums/product-variant-inventory-policy.md)

  Whether the product variant can be ordered when inventory is depleted.

* `inventoryQuantity`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  The total available quantity for sale of the product variant.

* `price`

  [Money](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/money.md)

  The product variant's price, using the store's default currency.

* `product`

  [Product](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product.md)

  The product to which this product variant belongs.

* `productId`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The product ID that the variant belongs to.

* `selectedOptions`

  [[SelectedOption!]](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/selected-option.md)

  A list of options configured for the variant.

* `sku`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The SKU of the product variant, a case-sensitive string.

* `taxable`

  [Boolean!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  Whether the variant is taxed when sold.

* `title`

  [String!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The product variant's title

* `updatedAt`

  [Date!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/date.md)

  The last modified date and time of the product variant.

* `weight`

  [Float](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/float.md)

  The product variant's weight in the unit defined by weight_unit.

* `weightUnit`

  [WeightUnit](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/enums/weight-unit.md)

  The measurement unit for the weight of the variant. If weight_unit is not specified, the store's default measurement unit will be applied.

## Code Example

```graphql
 {
	productVariant(id ) 
		 {
			# ProductVariant fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

