# Variants

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


A product variant is a specific product version with a unique combination of product option values.

## Sample Variant

```json
{
  "created_at": 1678887632,
  "deleted": false,
  "description": "Red Medium T-shirt for men",
  "external_name": "Red Medium T-shirt1678887631188",
  "id": "01GVJR0EHF9X3RM1JHQYQBKYG7",
  "name": "Red M T-shirt1678887631188",
  "object": "variant",
  "option_values": [
    {
      "name": "size",
      "value": "m"
    },
    {..}
  ],
  "product_id": "01GVJR0DS3VCGE3FMEH8WD5A42",
  "resource_version": 1678887632000,
  "sku": "sku-12346781",
  "status": "active",
  "updated_at": 1678887632
}
```

## Variants attributes

## Input Parameters

- `id` (optional, string, max chars=100)
  The immutable unique identifier of a product variant.

- `name` (required, string, max chars=100)
  This is a unique name that appears for each product variant to the end user.

- `external_name` (optional, string, max chars=100)
  This is a unique name appears for each product variant to the end user.

- `description` (optional, string, max chars=500)
  Description of the product variant.

- `sku` (optional, string, max chars=100)
  A unique identifier code a seller assigns to each product or item. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs.

- `deleted` (required, boolean, default=false)
  Product variant is deleted or not. If the value is `true` then the product variant has been deleted else it exists. Once the product variant is deleted, you can reuse the product variant `id` and `name` .

- `product_id` (required, string, max chars=100)
  The unique identifier of the product that is associated with this variant.

- `status` (optional, enumerated string)
  Status of the product variant.
  Possible enum values:
    - `active`
      The active product variants are visible on the storefront, subscription, or checkout.
    - `inactive`
      The inactive product variants are not visible on the storefront, subscription, or checkout.

- `created_at` (required, timestamp(UTC) in seconds)
  Timestamp when the product variant was created.

- `resource_version` (optional, long)
  Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.

- `updated_at` (optional, timestamp(UTC) in seconds)
  Timestamp indicating when this product variant was last updated.

- `metadata` (optional, jsonobject)
  A collection of key-value pairs that provides extra information about the product.
  
  **Note:** There's a character limit of 65,535.
  
  [Learn more](/docs/api/advanced-features#metadata) .

- `option_values` (optional, list of option_value)
  List of product variants option values.
  - `name` (optional, string, max chars=100)
    Name of the option values.
  - `value` (optional, string, max chars=100)
    Pass values of the `option_values` .

