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

# Update Product

> Full product update via Shopify productSet mutation

<Note>
  **V2 Preview** — This endpoint is part of the V2 API preview. Breaking changes may occur.
</Note>

## Overview

Full update via Shopify's `productSet` mutation. Accepts a Shopify numeric ID, Shopify GID, or MongoDB ObjectId for `productId`. Vendor tokens can only update their own products.

<Warning>
  `variants`, `options`, and `metafields` arrays **replace** existing values. Partial updates on these arrays are not supported — send the full desired state.
</Warning>

## Path Parameters

<ParamField path="productId" type="string" required>
  Product ID (Shopify numeric, GID, or MongoDB ObjectId).
</ParamField>

## Request Body

Full product replacement payload. See the `ProductUpdateRequest` schema in the OpenAPI spec for the full field list (title, descriptionHtml, productType, vendor, status, variants\[], options\[], media\[], metafields\[], etc.).

## Response

```json 200 theme={null}
{
  "success": true,
  "data": {
    "_id": "507f1f77bcf86cd799439013",
    "shopifyId": "gid://shopify/Product/7890123456789",
    "title": "Updated Product",
    "status": "active",
    "variants": [ /* ... */ ]
  }
}
```

## Example

```bash theme={null}
curl -X PUT "https://staging-api.puppetvendors.com/products/507f1f77bcf86cd799439013" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Product",
    "status": "active",
    "variants": [
      { "price": "29.99", "sku": "ACME-001", "inventoryQuantity": 50 }
    ]
  }'
```

### More Examples

**Update title and tags**

```bash theme={null}
curl -X PUT "https://staging-api.puppetvendors.com/products/507f1f77bcf86cd799439013" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Product Name",
    "tags": ["new-tag", "sale"]
  }'
```

**Add a new variant**

```bash theme={null}
curl -X PUT "https://staging-api.puppetvendors.com/products/507f1f77bcf86cd799439013" \
  -H "x-access-token: YOUR_VENDOR_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "variants": [
      {
        "title": "XL / Red",
        "price": "34.99",
        "sku": "TEE-RED-XL",
        "inventoryQuantity": 25
      }
    ]
  }'
```
