---
title: "Variant Schema"
canonical: "https://red-ant-documentation.refined.site/space/RDD/719486985/Variant%20Schema"
format: markdown
---
> Macro (excerpt)
> 
> | **Field (*****Required)** | **Definition** | **Format / Additional Info** |
> | --- | --- | --- |
> | `externalVariantId` | A unique variant ID |  |
> | `name` * | The name of the product variant | Alphanumeric string e.g `12` or `Medium`<br>The values are aggregated to present as “Size” filters on the PLP page. |
> | `productId` * | Associate the variant with a specific product | FK to products table.<br>UUID or `externalProductId` |
> | `ean` | The barcode associated with the specific variant. This is referenced when scanning products | UPC (Universal Product Number) or EAN-13<br>EAN can only contain numbers, and must be between 12 and 13 digits |
> | `onlineStock` | Define whether the variant is available online | Online stock can be set to `available`, `unavailable` or `lowStock` |
> | `variantOrder` * | Defines the order in which the variants display against the product | The order is defined using numerical values, starting with `0` being the highest priority order |
> | `catalogue` * | The name of the catalogue where the product variant resides |  |
> | `regionId` * | Associate the product with a specific region | FK to regions table.<br>UUID or `externalRegionId` |
> | `updateSource` * | The last application to update the record | String. Valid values vary on client. |
> | `price` | This can be used if the retailer requires variant level pricing. | JSON object e.g:<br>`{`  
> ` "value": "10.50",`  
> ` "code": "GBP"`  
> `}` |
> | `price.code` | Discount currency code. | ISO4217 Currency code |
> | `price.value` | Discount value. | Numeric string. Supports floats. |
> | `discount` | Define the discount value currently associated with the variant | JSON object e.g:<br>`{`  
> ` "value": "10.50",`  
> ` "code": "GBP"`  
> `}`<br>The final price of the product is calculated using `price` and `discount` |
> | `discount.code` | Discount currency code. | ISO4217 Currency code |
> | `dicount.value` | Discount value. | Numeric string. Supports floats. |
> | `link` | Ecom product link - this will be included as a hyperlink when the product is sent in any outbound communication to a customer | HTTPS URL String.<br>Links can be provided at both product and variant level |
> | `details` | Used to store custom field against the variant. | JSON Object |