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

> Update a master catalog product.

Updates the product's details; only the provided fields are changed.

## Path parameters

<ParamField path="id" type="string" required>The product's ID.</ParamField>

## Body parameters

<ParamField body="title" type="string">Product title.</ParamField>
<ParamField body="subtitle" type="string">Product subtitle.</ParamField>
<ParamField body="description" type="string">Product description.</ParamField>
<ParamField body="handle" type="string">Unique URL-safe handle.</ParamField>
<ParamField body="status" type="string">One of `draft`, `proposed`, `published`, `rejected`.</ParamField>
<ParamField body="is_giftcard" type="boolean">Whether the product is a gift card.</ParamField>
<ParamField body="discountable" type="boolean">Whether discounts can apply to the product.</ParamField>
<ParamField body="thumbnail" type="string">URL of the product thumbnail.</ParamField>

<ParamField body="images" type="object[]">
  Product images; replaces the existing set.

  <Expandable title="properties">
    <ParamField body="id" type="string">Existing image ID to keep.</ParamField>
    <ParamField body="url" type="string" required>Image URL.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="external_id" type="string">ID of the product in an external system.</ParamField>
<ParamField body="type_id" type="string">ID of the product type.</ParamField>
<ParamField body="collection_id" type="string">ID of the collection to assign the product to.</ParamField>

<ParamField body="categories" type="object[]">
  Categories to assign; replaces the existing set.

  <Expandable title="properties">
    <ParamField body="id" type="string" required>Category ID.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="tags" type="object[]">
  Tags to assign; replaces the existing set.

  <Expandable title="properties">
    <ParamField body="id" type="string" required>Tag ID.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="options" type="object[]">
  Product options; replaces the existing set.

  <Expandable title="properties">
    <ParamField body="title" type="string" required>Option title.</ParamField>
    <ParamField body="values" type="string[]" required>Possible option values.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="variants" type="object[]">
  Variants to upsert; include `id` to update an existing variant.

  <Expandable title="properties">
    <ParamField body="id" type="string">Existing variant ID.</ParamField>
    <ParamField body="title" type="string">Variant title.</ParamField>
    <ParamField body="sku" type="string">Variant SKU.</ParamField>
    <ParamField body="ean" type="string">Variant EAN.</ParamField>
    <ParamField body="upc" type="string">Variant UPC.</ParamField>
    <ParamField body="isbn" type="string">Variant ISBN.</ParamField>
    <ParamField body="asin" type="string">Variant ASIN.</ParamField>
    <ParamField body="gtin" type="string">Variant GTIN.</ParamField>
    <ParamField body="barcode" type="string">Variant barcode.</ParamField>
    <ParamField body="hs_code" type="string">Harmonized System code.</ParamField>
    <ParamField body="mid_code" type="string">Manufacturer identification code.</ParamField>
    <ParamField body="thumbnail" type="string">URL of the variant thumbnail.</ParamField>
    <ParamField body="variant_rank" type="number">Sort rank of the variant.</ParamField>
    <ParamField body="weight" type="number">Variant weight.</ParamField>
    <ParamField body="length" type="number">Variant length.</ParamField>
    <ParamField body="height" type="number">Variant height.</ParamField>
    <ParamField body="width" type="number">Variant width.</ParamField>
    <ParamField body="origin_country" type="string">Country of origin.</ParamField>
    <ParamField body="material" type="string">Variant material.</ParamField>
    <ParamField body="prices" type="object[]">Prices with `id`, `currency_code`, `amount`, `min_quantity`, `max_quantity`, and `rules`.</ParamField>
    <ParamField body="options" type="object">Map of option title to option value.</ParamField>
    <ParamField body="metadata" type="object">Custom key-value data.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="weight" type="number">Product weight.</ParamField>
<ParamField body="length" type="number">Product length.</ParamField>
<ParamField body="height" type="number">Product height.</ParamField>
<ParamField body="width" type="number">Product width.</ParamField>
<ParamField body="hs_code" type="string">Harmonized System code.</ParamField>
<ParamField body="mid_code" type="string">Manufacturer identification code.</ParamField>
<ParamField body="origin_country" type="string">Country of origin.</ParamField>
<ParamField body="material" type="string">Product material.</ParamField>
<ParamField body="metadata" type="object">Custom key-value data.</ParamField>
<ParamField body="additional_data" type="object">Custom data passed to workflow hooks.</ParamField>

## Response

<ResponseField name="product" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">The product's ID.</ResponseField>
    <ResponseField name="title" type="string">Product title.</ResponseField>
    <ResponseField name="status" type="string">One of `draft`, `proposed`, `published`, `rejected`.</ResponseField>
    <ResponseField name="variants" type="object[]">Product variants.</ResponseField>
    <ResponseField name="product_attribute_values" type="object[]">Attribute values selected on the product.</ResponseField>
    <ResponseField name="scoped_attributes" type="object[]">Product-scoped (inline) attributes.</ResponseField>
    <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'http://localhost:9000/admin/products/prod_01HXYZABCDEF' \
    -H 'Authorization: Bearer <token>' \
    -H 'Content-Type: application/json' \
    -d '{"title": "Linen Shirt v2", "status": "published"}'
  ```

  ```ts JS Client theme={null}
  const { product } = await client.admin.products.$id.mutate({
    $id: "prod_01HXYZABCDEF",
    title: "Linen Shirt v2",
    status: "published",
  })
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "product": {
      "id": "prod_01HXYZABCDEF",
      "title": "Linen Shirt v2",
      "handle": "linen-shirt",
      "status": "published",
      "updated_at": "2026-06-02T09:00:00.000Z"
    }
  }
  ```
</ResponseExample>
