# ProductVariant

> ProductVariant entity - components, queries, links, and related actions

Your storefront encounters the **ProductVariant** entity when displaying a specific purchasable SKU within a [Product](/frontend/api-reference/entities/product). Each variant represents a distinct combination of option selections (such as size or color) with its own SKU, pricing, availability, and shipping details. A Product links to its variants through the ProductVariants link; a ProductVariant does not exist independently of its parent Product.

**Entity: ProductVariant**

Components: base, availability, energyLabel, prices, info, shipping, quantityPrices, quantityRule, options, customerReference

## Components

### Base

Variant SKU, name, and optional GTIN identifier.

### ProductVariantBase `base`

```ts
import { ProductVariantBase } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"sku":{"description":"The merchants internal stock keeping unit (SKU) of the product variant.","type":"string"},"name":{"description":"The variant-specific name. Complements the product name.","type":"string"},"gtin":{"description":"The external product identifier (GTIN, EAN, etc.) of the product variant.","type":"string"},"customFields":{"allOf":[{"$ref":"#/definitions/CustomFields"}]}},"required":["sku","name"],"additionalProperties":false,"id":"entity:ProductVariant:base","definitions":{"CustomFields":{"description":"Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.","title":"CustomFields","id":"CustomFields","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}
```

### Availability

Stock status, inventory quantity, and optional restock date.

### ProductVariantAvailability `availability`

```ts
import { ProductVariantAvailability } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"status":{"description":"","type":"string","enum":["inStock","outOfStock","backorder","preorder"]},"quantity":{"description":"The current approximate inventory level for the variant.","type":"number"},"availabilityDate":{"description":"Date when the product is available again.","type":"string","format":"date-time"}},"required":["status","quantity"],"additionalProperties":false,"id":"entity:ProductVariant:availability"}
```

### Prices

Selling price, strikethrough price, sale indicators, unit pricing, and lowest prior price for regulatory compliance.

### ProductVariantPrices `prices`

```ts
import { ProductVariantPrices } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"price":{"$ref":"#/definitions/Money"},"strikethroughPrice":{"allOf":[{"$ref":"#/definitions/Money"}]},"isOnSale":{"description":"If true, indicates that the product variant is discounted from its original price. See `strikethroughPrice` for the original price and `savingsPercent` for the percentage of discount.","type":"boolean"},"savingsPercent":{"description":"Percentage of discount from the `strikethroughPrice`.","type":"number"},"unitPrice":{"allOf":[{"$ref":"#/definitions/UnitPrice"}]},"lowestPriorPrice":{"allOf":[{"$ref":"#/definitions/Money"}]}},"required":["price","isOnSale"],"additionalProperties":false,"id":"entity:ProductVariant:prices","definitions":{"Money":{"description":"A Money object describes a monetary value. You can use e.g. `@screeny05/ts-money` to create and manipulate Money objects more elegantly.","title":"Money","id":"Money","type":"object","properties":{"amount":{"description":"Amount in smallest unit of currency. E.g. cents, pence, etc.","type":"number"},"currency":{"description":"ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.","type":"string"}},"required":["amount","currency"],"additionalProperties":false},"UnitPrice":{"description":"This object descibes a unit-price, e.g. 13.99 EUR / 100g","title":"UnitPrice","id":"UnitPrice","type":"object","properties":{"price":{"$ref":"#/definitions/Money"},"quantity":{"$ref":"#/definitions/Measurement"},"reference":{"$ref":"#/definitions/Measurement"}},"required":["price","quantity","reference"],"additionalProperties":false},"Measurement":{"description":"A value-object representing a measurement of a physical quantity. E.g. length, weight, etc.","title":"Measurement","id":"Measurement","type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"],"additionalProperties":false}}}
```

### Info

Variant-specific image.

### ProductVariantInfo `info`

```ts
import { ProductVariantInfo } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"image":{"allOf":[{"$ref":"#/definitions/MediaImage"}]}},"additionalProperties":false,"id":"entity:ProductVariant:info","definitions":{"MediaImage":{"description":"A MediaImage describes an image to be displayed in the browser. An image consists of one or more MediaSourceImage and additional metadata.","title":"MediaImage","id":"MediaImage","type":"object","properties":{"type":{"type":"string","const":"image"},"sources":{"type":"array","items":{"$ref":"#/definitions/MediaSourceImage"}},"alt":{"type":"string"},"meta":{},"aiDisclosure":{"type":"string","enum":["generated","modified"]},"placeholder":{"type":"array","items":[{"type":"string","enum":["solid","thumbhash"]},{"type":"string"}]}},"required":["type","sources"],"additionalProperties":false},"MediaSourceImage":{"description":"A MediaSourceImage is a single source for an image.","title":"MediaSourceImage","id":"MediaSourceImage","type":"object","properties":{"provider":{"type":"string"},"src":{"type":"string"},"origin":{"type":"object","properties":{"libraryId":{"type":"string"},"externalId":{"type":"string"}},"required":["libraryId"],"additionalProperties":false},"width":{"type":"number"},"height":{"type":"number"},"responsive":{"type":"string","enum":["static","mobile","desktop"]},"focalPoint":{"type":"array","items":[{"type":"number"},{"type":"number"}]}},"required":["provider","src"],"additionalProperties":false}}}
```

### Customer Reference

The logged-in B2B customer's own product number and optional name for this variant. Resolve this customer-scoped component only for an authenticated B2B session.

### ProductVariantCustomerReference `customerReference`

```ts
import { ProductVariantCustomerReference } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"number":{"description":"The customer's own product number for this variant. SAP `KDMAT`; B2B Sellers customer product number.","type":"string"},"name":{"description":"The customer's own name for this product, when the source provides one. SAP `POSTX`; absent in B2B Sellers (number-only).","type":"string"}},"required":["number"],"additionalProperties":false,"id":"entity:ProductVariant:customerReference"}
```

### Energy Label

EU energy-efficiency badge, full label, class scale, EPREL registration number, and optional product data-sheet link.

### ProductVariantEnergyLabel `energyLabel`

```ts
import { ProductVariantEnergyLabel } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"badge":{"$ref":"#/definitions/Media"},"label":{"$ref":"#/definitions/Media"},"title":{"description":"Human-readable title (e.g. \"Energy class A++\"), used as the alt text on the badge image. Optional — when omitted, consumers fall back to a generated name (e.g. from `energyClass`) or a translated default.","type":"string"},"energyClass":{"description":"Energy efficiency class (e.g. \"A\", \"A++\", \"G\"). Free-form string by design: the EU periodically rescales its class vocabulary (directive 2017/1369), so this is deliberately not an enum to avoid breaking the type on every change.","type":"string"},"energyClassScaleMax":{"description":"Most energy-efficient class on this product category's regulated scale (e.g. \"A\").","type":"string"},"energyClassScaleMin":{"description":"Least energy-efficient class on this product category's regulated scale (e.g. \"G\").","type":"string"},"eprelRegistrationNumber":{"description":"EPREL registration / model identifier, referencing the variant's entry in the official EU energy-labelling registry (https://eprel.ec.europa.eu).","type":"string"},"dataSheetLink":{"description":"Optional URL of the product information sheet / data sheet PDF (EU energy regulation requirement).","type":"string"}},"required":["badge","label"],"additionalProperties":false,"id":"entity:ProductVariant:energyLabel","definitions":{"Media":{"description":"A Media object describes a media asset to be displayed or played in the browser. Currently supported are images, videos, and audio. Future support for 3D, 360° images, and other media types is planned. You can use `type` for type-narrowing.","title":"Media","id":"Media","anyOf":[{"$ref":"#/definitions/MediaImage"},{"$ref":"#/definitions/MediaVideo"},{"$ref":"#/definitions/MediaAudio"}]},"MediaImage":{"description":"A MediaImage describes an image to be displayed in the browser. An image consists of one or more MediaSourceImage and additional metadata.","title":"MediaImage","id":"MediaImage","type":"object","properties":{"type":{"type":"string","const":"image"},"sources":{"type":"array","items":{"$ref":"#/definitions/MediaSourceImage"}},"alt":{"$ref":"#/definitions/__schema3"},"meta":{"$ref":"#/definitions/__schema4"},"aiDisclosure":{"$ref":"#/definitions/__schema5"},"placeholder":{"type":"array","items":[{"type":"string","enum":["solid","thumbhash"]},{"type":"string"}]}},"required":["type","sources"],"additionalProperties":false},"MediaSourceImage":{"description":"A MediaSourceImage is a single source for an image.","title":"MediaSourceImage","id":"MediaSourceImage","type":"object","properties":{"provider":{"$ref":"#/definitions/__schema0"},"src":{"$ref":"#/definitions/__schema1"},"origin":{"$ref":"#/definitions/__schema2"},"width":{"type":"number"},"height":{"type":"number"},"responsive":{"type":"string","enum":["static","mobile","desktop"]},"focalPoint":{"type":"array","items":[{"type":"number"},{"type":"number"}]}},"required":["provider","src"],"additionalProperties":false},"__schema0":{"type":"string"},"__schema1":{"type":"string"},"__schema2":{"type":"object","properties":{"libraryId":{"type":"string"},"externalId":{"type":"string"}},"required":["libraryId"],"additionalProperties":false},"__schema3":{"type":"string"},"__schema4":{},"__schema5":{"type":"string","enum":["generated","modified"]},"MediaVideo":{"description":"A MediaVideo describes a video to be displayed in the browser. A video consists of one or more MediaSourceVideo and additional metadata.","title":"MediaVideo","id":"MediaVideo","type":"object","properties":{"type":{"type":"string","const":"video"},"sources":{"type":"array","items":{"$ref":"#/definitions/MediaSourceVideo"}},"alt":{"$ref":"#/definitions/__schema3"},"meta":{"$ref":"#/definitions/__schema4"},"aiDisclosure":{"$ref":"#/definitions/__schema5"},"poster":{"allOf":[{"$ref":"#/definitions/MediaImage"}]},"tracks":{"type":"array","items":{"$ref":"#/definitions/MediaTextTrack"}}},"required":["type","sources"],"additionalProperties":false},"MediaSourceVideo":{"description":"A MediaSourceVideo is a single source for a video.","title":"MediaSourceVideo","id":"MediaSourceVideo","type":"object","properties":{"provider":{"$ref":"#/definitions/__schema0"},"src":{"$ref":"#/definitions/__schema1"},"origin":{"$ref":"#/definitions/__schema2"},"width":{"type":"number"},"height":{"type":"number"},"length":{"allOf":[{"$ref":"#/definitions/Duration"}]},"format":{"type":"string"},"responsive":{"type":"string","enum":["static","mobile","desktop"]},"focalPoint":{"type":"array","items":[{"type":"number"},{"type":"number"}]},"streaming":{"type":"string","enum":["progressive","hls","dash"]}},"required":["provider","src","width","height"],"additionalProperties":false},"Duration":{"description":"ISO 8601 duration string. Can be used with Temporal.Duration once browser-support is available. Maybe use https://react-spectrum.adobe.com/internationalized/date/Time.html","title":"Duration","id":"Duration","type":"object","properties":{"duration":{"type":"string"}},"required":["duration"],"additionalProperties":false},"MediaTextTrack":{"description":"A MediaTextTrack describes a timed text track for a video or audio asset, such as subtitles, captions, or chapters.","title":"MediaTextTrack","id":"MediaTextTrack","type":"object","properties":{"src":{"type":"string"},"kind":{"type":"string","enum":["subtitles","captions","descriptions","chapters","metadata"]},"srclang":{"type":"string"},"label":{"type":"string"},"default":{"type":"boolean"}},"required":["src","kind"],"additionalProperties":false},"MediaAudio":{"description":"A MediaAudio describes an audio asset to be played in the browser. An audio asset consists of one or more MediaSourceAudio and additional metadata.","title":"MediaAudio","id":"MediaAudio","type":"object","properties":{"type":{"type":"string","const":"audio"},"sources":{"type":"array","items":{"$ref":"#/definitions/MediaSourceAudio"}},"alt":{"$ref":"#/definitions/__schema3"},"meta":{"$ref":"#/definitions/__schema4"},"aiDisclosure":{"$ref":"#/definitions/__schema5"},"cover":{"allOf":[{"$ref":"#/definitions/MediaImage"}]},"tracks":{"type":"array","items":{"$ref":"#/definitions/MediaTextTrack"}}},"required":["type","sources"],"additionalProperties":false},"MediaSourceAudio":{"description":"A MediaSourceAudio is a single source for an audio asset.","title":"MediaSourceAudio","id":"MediaSourceAudio","type":"object","properties":{"provider":{"$ref":"#/definitions/__schema0"},"src":{"$ref":"#/definitions/__schema1"},"origin":{"$ref":"#/definitions/__schema2"},"format":{"type":"string"},"length":{"allOf":[{"$ref":"#/definitions/Duration"}]},"streaming":{"type":"string","enum":["progressive","hls","dash"]}},"required":["provider","src"],"additionalProperties":false}}}
```

### Shipping

Shipping cost, whether shipping is required, and delivery time forecast with optional cutoff time.

### ProductVariantShipping `shipping`

```ts
import { ProductVariantShipping } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"rate":{"allOf":[{"$ref":"#/definitions/Money"}]},"required":{"description":"If true, the product variant requires shipping. E.g. it is a physical good.","type":"boolean"},"forecast":{"description":"Forecasted shipping time. Handling time + transit time.","type":"object","properties":{"minDays":{"type":"number"},"maxDays":{"type":"number"},"cutoffTime":{"allOf":[{"$ref":"#/definitions/Time"}]}},"additionalProperties":false}},"required":["required"],"additionalProperties":false,"id":"entity:ProductVariant:shipping","definitions":{"Money":{"description":"A Money object describes a monetary value. You can use e.g. `@screeny05/ts-money` to create and manipulate Money objects more elegantly.","title":"Money","id":"Money","type":"object","properties":{"amount":{"description":"Amount in smallest unit of currency. E.g. cents, pence, etc.","type":"number"},"currency":{"description":"ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.","type":"string"}},"required":["amount","currency"],"additionalProperties":false},"Time":{"description":"ISO 8601 time string. Must include a time-zone offset. E.g. \"23:30:00-05:00\" would represent 6:30 pm Eastern Standard Time (EST) which is 5 hours behind Coordinated Universal Time (UTC).","title":"Time","id":"Time","type":"object","properties":{"time":{"type":"string","format":"time","pattern":"^([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d+)?$"}},"required":["time"],"additionalProperties":false}}}
```

### Quantity Prices

Tiered pricing tiers based on purchase quantity; each tier specifies a minimum quantity, the applicable price, and the savings percentage.

### ProductVariantQuantityPrices `quantityPrices`

```ts
import { ProductVariantQuantityPrices } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"array","items":{"type":"object","properties":{"quantity":{"description":"The quantity above which the price is applicable.","type":"number"},"price":{"$ref":"#/definitions/Money"},"savingsPercent":{"description":"The amount of savings compared to the price without quantity discount. In percent.","type":"number"}},"required":["quantity","price","savingsPercent"],"additionalProperties":false},"id":"entity:ProductVariant:quantityPrices","definitions":{"Money":{"description":"A Money object describes a monetary value. You can use e.g. `@screeny05/ts-money` to create and manipulate Money objects more elegantly.","title":"Money","id":"Money","type":"object","properties":{"amount":{"description":"Amount in smallest unit of currency. E.g. cents, pence, etc.","type":"number"},"currency":{"description":"ISO 4217 currency code. E.g. 'USD', 'EUR', 'GBP', etc.","type":"string"}},"required":["amount","currency"],"additionalProperties":false}}}
```

### Quantity Rule

Minimum and maximum order quantities along with a quantity increment constraint.

### ProductVariantQuantityRule `quantityRule`

```ts
import { ProductVariantQuantityRule } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"increment":{"description":"The quantity increment between min and max. All valid quantities must be divisible by this value. Must be less than or equal to min and max.","type":"number"},"max":{"description":"If set, must be lower than or equal to the minimum. Must be a multiple of the increment.","type":"number"},"min":{"description":"Minimum quantity a user has to purchase. Must be a multiple of the increment.","type":"number"}},"required":["increment","min"],"additionalProperties":false,"id":"entity:ProductVariant:quantityRule"}
```

### Options

Selected option values (e.g. color, size) for this variant, with optional swatch and preview image.

### ProductVariantOptions `options`

```ts
import { ProductVariantOptions } from '@laioutr-core/canonical-types/entity/product-variant';
```

#### Schema

```json
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"selected":{"description":"List of product options applied to the variant.","type":"array","items":{"type":"object","properties":{"wellKnownName":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"swatch":{"allOf":[{"$ref":"#/definitions/Swatch"}]},"image":{"allOf":[{"$ref":"#/definitions/MediaImage"}]}},"required":["selected"],"additionalProperties":false,"id":"entity:ProductVariant:options","definitions":{"Swatch":{"description":"A swatch is a visual representation of a product option. E.g. a single color, multiple colors, a gradient or a thumbnail image.","id":"Swatch","anyOf":[{"$ref":"#/definitions/SwatchColor"},{"$ref":"#/definitions/SwatchColors"},{"$ref":"#/definitions/SwatchGradient"},{"$ref":"#/definitions/SwatchImage"}]},"SwatchColor":{"description":"","id":"SwatchColor","type":"array","items":[{"type":"string","const":"color"},{"type":"string"}]},"SwatchColors":{"description":"","id":"SwatchColors","type":"array","items":[{"type":"string","const":"colors"},{"type":"array","items":{"type":"string"}}]},"SwatchGradient":{"description":"","id":"SwatchGradient","type":"array","items":[{"type":"string","const":"gradient"},{"type":"array","items":{"type":"string"}}]},"SwatchImage":{"description":"","id":"SwatchImage","type":"array","items":[{"type":"string","const":"image"},{"$ref":"#/definitions/MediaImage"}]},"MediaImage":{"description":"A MediaImage describes an image to be displayed in the browser. An image consists of one or more MediaSourceImage and additional metadata.","title":"MediaImage","id":"MediaImage","type":"object","properties":{"type":{"type":"string","const":"image"},"sources":{"type":"array","items":{"$ref":"#/definitions/MediaSourceImage"}},"alt":{"type":"string"},"meta":{},"aiDisclosure":{"type":"string","enum":["generated","modified"]},"placeholder":{"type":"array","items":[{"type":"string","enum":["solid","thumbhash"]},{"type":"string"}]}},"required":["type","sources"],"additionalProperties":false},"MediaSourceImage":{"description":"A MediaSourceImage is a single source for an image.","title":"MediaSourceImage","id":"MediaSourceImage","type":"object","properties":{"provider":{"type":"string"},"src":{"type":"string"},"origin":{"type":"object","properties":{"libraryId":{"type":"string"},"externalId":{"type":"string"}},"required":["libraryId"],"additionalProperties":false},"width":{"type":"number"},"height":{"type":"number"},"responsive":{"type":"string","enum":["static","mobile","desktop"]},"focalPoint":{"type":"array","items":[{"type":"number"},{"type":"number"}]}},"required":["provider","src"],"additionalProperties":false}}}
```

## Related Entities

- [Product](/frontend/api-reference/entities/product) - The parent product this variant belongs to.
- [CartItem](/frontend/api-reference/entities/cart-item) - A line item in the cart that references this variant.
