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

# Update Variant

Modifies pricing, status, or stock settings for an existing product SKU variant.

### Authorizations

<ParamField header="X-Shop-API-Key" type="string" required>
  Your Secret API Key (`sk_live_...` or `sk_test_...`) generated from the Developer dashboard. Must be kept secret.
</ParamField>

### Path Parameters

<ParamField path="shopId" type="string" required>
  The unique UUID of the shop.
</ParamField>

<ParamField path="productId" type="number" required>
  The unique ID of the product.
</ParamField>

<ParamField path="variantId" type="number" required>
  The unique ID of the variant.
</ParamField>

### Request Body (JSON)

<ParamField body="variantPrice" type="number">
  Updated variant price in Kobo.
</ParamField>

<ParamField body="stockQuantity" type="number">
  Updated variant stock count.
</ParamField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "status": "success",
    "message": "Variant updated successfully",
    "data": {
      "variantId": 12,
      "variantPrice": 1300000,
      "stockQuantity": 25
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "message": "FORM_VALIDATION_ERROR",
    "code": 400,
    "validationErrors": [
      {
        "path": [
          "variantPrice"
        ],
        "message": "Variant price must be greater than 0"
      }
    ]
  }
  ```
</ResponseExample>
