> ## 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.

# Update Product Variant

> Stage an update to a product variant as a change request.

Stages a `VARIANT_UPDATE` operation as a pending change request instead of updating the variant directly.

> [!NOTE]
>
> The endpoint responds with `202 Accepted` and a `product_change` record, not the updated variant.

## Path parameters

**id** `string` *required*

The product's ID.

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

The variant's ID.

## Body parameters

**title** `string`

The variant's title.

**sku** `string`

The variant's SKU.

**ean** `string`

EAN barcode.

**upc** `string`

UPC barcode.

**isbn** `string`

ISBN code.

**asin** `string`

Amazon ASIN.

**gtin** `string`

GTIN code.

**barcode** `string`

Generic barcode.

**hs\_code** `string`

Harmonized System code.

**mid\_code** `string`

Manufacturer ID code.

**thumbnail** `string`

Variant thumbnail URL.

**variant\_rank** `number`

Sort rank of the variant.

**weight** `number`

Weight of the variant.

**length** `number`

Length of the variant.

**height** `number`

Height of the variant.

**width** `number`

Width of the variant.

**origin\_country** `string`

Country of origin.

**material** `string`

Material of the variant.

**allow\_backorder** `boolean`

Whether backorders are allowed.

**manage\_inventory** `boolean`

Whether inventory is managed for the variant.

**metadata** `object`

Custom key-value pairs.

**options** `object`

Option title to value mapping, e.g. `{"Size": "M"}`.

**images** `object`

**properties**

**add** `string[]`

Image URLs to attach to the variant.

**remove** `string[]`

Image IDs to detach from the variant.

## Response

**product\_change** `object`

**properties**

**id** `string`

The change request's ID.

**product\_id** `string`

ID of the product the change targets.

**status** `string`

One of `pending`, `confirmed`, `declined`, `canceled`.

**actions** `object[]`

Staged operations, each with `id`, `action` (`VARIANT_UPDATE`), `details`, `ordering`, and `applied`.

```bash cURL theme={null}
curl -X POST 'http://localhost:9000/vendor/products/prod_01HXYZ/variants/variant_01HXYZ' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>' \
  -H 'Content-Type: application/json' \
  -d '{"sku": "ACME-SHIRT-M-V2", "weight": 200}'
```

```ts JS Client theme={null}
const { product_change } =
  await client.vendor.products.$id.variants.$variant_id.mutate({
    $id: "prod_01HXYZ",
    $variant_id: "variant_01HXYZ",
    sku: "ACME-SHIRT-M-V2",
    weight: 200,
  })
```

```json 202 theme={null}
{
  "product_change": {
    "id": "prodch_01HXYZ",
    "product_id": "prod_01HXYZ",
    "status": "pending",
    "actions": [
      {
        "id": "prodchact_01HXYZ",
        "action": "VARIANT_UPDATE",
        "details": { "variant_id": "variant_01HXYZ", "fields": { "sku": "ACME-SHIRT-M-V2" } },
        "applied": false
      }
    ]
  }
}
```


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