> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Product Variant

> Retrieve a single variant of a product.

Returns one variant scoped to the given product.

## Path parameters

**id** `string` *required*

The product's ID.

**variant\_id** `string` *required*

The variant's ID.

## Query parameters

**fields** `string`

Comma-separated list of fields to include, prefix with `+`/`-` to add or remove from defaults.

## Response

**variant** `object`

**properties**

**id** `string`

The variant's ID.

**title** `string`

Variant title.

**sku** `string`

Variant SKU.

**ean** `string`

Variant EAN.

**upc** `string`

Variant UPC.

**barcode** `string`

Variant barcode.

**variant\_rank** `number`

Sort rank of the variant.

**weight** `number`

Variant weight.

**length** `number`

Variant length.

**height** `number`

Variant height.

**width** `number`

Variant width.

**origin\_country** `string`

Country of origin.

**material** `string`

Variant material.

**product\_id** `string`

ID of the parent product.

**manage\_inventory** `boolean`

Whether inventory is tracked for the variant.

**allow\_backorder** `boolean`

Whether the variant can be ordered when out of stock.

**options** `object[]`

The variant's option values.

**metadata** `object`

Custom key-value data.

**created\_at** `string`

Creation timestamp.

**updated\_at** `string`

Last update timestamp.

```bash cURL theme={null}
curl 'http://localhost:9000/admin/products/prod_01HXYZABCDEF/variants/variant_01HXYZABCDEF' \
  -H 'Authorization: Bearer <token>'
```

```ts JS Client theme={null}
const { variant } = await client.admin.products.$id.variants.$variant_id.query({
  $id: "prod_01HXYZABCDEF",
  $variant_id: "variant_01HXYZABCDEF",
})
```

```json 200 theme={null}
{
  "variant": {
    "id": "variant_01HXYZABCDEF",
    "title": "M",
    "sku": "LS-M",
    "product_id": "prod_01HXYZABCDEF",
    "manage_inventory": false,
    "allow_backorder": false,
    "variant_rank": 0
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.