> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.venda.rw/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.venda.rw/_mcp/server.

# Update product

PATCH https://auth/products/
Content-Type: application/json

Reference: https://docs.venda.rw/venda-api-production/products/update-product

## Servers

- `https://auth` (https://auth, default)
- `https://profile` (https://profile)
- `https://media` (https://media)
- `https://health` (https://health)
- `https://organizations` (https://organizations)
- `https://products` (https://products)
- `https://categories` (https://categories)
- `https://inventory` (https://inventory)
- `https://inventory-batches` (https://inventory-batches)
- `https://suppliers` (https://suppliers)
- `https://purchase-orders` (https://purchase-orders)
- `https://supplier-payments` (https://supplier-payments)
- `https://goods-received` (https://goods-received)
- `https://supplier-returns` (https://supplier-returns)
- `https://customers` (https://customers)
- `https://customer-payments` (https://customer-payments)
- `https://sales` (https://sales)
- `https://returns` (https://returns)
- `https://orders` (https://orders)
- `https://expenses` (https://expenses)
- `https://recurring-expenses` (https://recurring-expenses)
- `https://cashier-shifts` (https://cashier-shifts)
- `https://cashier-activities` (https://cashier-activities)
- `https://stock-transfers` (https://stock-transfers)
- `https://invitations` (https://invitations)
- `https://permissions` (https://permissions)
- `https://reports` (https://reports)
- `https://api` (https://api)

## Request

### Headers

- `X-Organization-Id` (string, optional)

### Body (application/json)

This endpoint expects an object.

- `productVariants` (list of ProductsPatchRequestBodyContentApplicationJsonSchemaProductVariantsItems, required)

## Response

### 200

Successful response

## Types

### ProductsPatchRequestBodyContentApplicationJsonSchemaProductVariantsItems

- `id` (string, required)
- `sku` (string, required)
- `name` (string, required)
- `price` (string, required)
- `quantity` (string, required)
- `costPrice` (string, required)
- `imageUrls` (list of any, required)
- `reorderLevel` (string, required)

## Examples

**Request**

```json
{
  "productVariants": [
    {
      "id": "{{variantId}}",
      "sku": "PAMP-S4",
      "name": "Size 4",
      "price": "13000",
      "quantity": "20",
      "costPrice": "8000",
      "imageUrls": [],
      "reorderLevel": "5"
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python Products_Update product_example
import requests

url = "https://auth/products/"

payload = { "productVariants": [
        {
            "id": "{{variantId}}",
            "sku": "PAMP-S4",
            "name": "Size 4",
            "price": "13000",
            "quantity": "20",
            "costPrice": "8000",
            "imageUrls": [],
            "reorderLevel": "5"
        }
    ] }
headers = {
    "X-Organization-Id": "{{orgId}}",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Products_Update product_example
const url = 'https://auth/products/';
const options = {
  method: 'PATCH',
  headers: {'X-Organization-Id': '{{orgId}}', 'Content-Type': 'application/json'},
  body: '{"productVariants":[{"id":"{{variantId}}","sku":"PAMP-S4","name":"Size 4","price":"13000","quantity":"20","costPrice":"8000","imageUrls":[],"reorderLevel":"5"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Products_Update product_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://auth/products/"

	payload := strings.NewReader("{\n  \"productVariants\": [\n    {\n      \"id\": \"{{variantId}}\",\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"13000\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Organization-Id", "{{orgId}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Products_Update product_example
require 'uri'
require 'net/http'

url = URI("https://auth/products/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Organization-Id"] = '{{orgId}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"productVariants\": [\n    {\n      \"id\": \"{{variantId}}\",\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"13000\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Products_Update product_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://auth/products/")
  .header("X-Organization-Id", "{{orgId}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"productVariants\": [\n    {\n      \"id\": \"{{variantId}}\",\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"13000\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}")
  .asString();
```

```php Products_Update product_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://auth/products/', [
  'body' => '{
  "productVariants": [
    {
      "id": "{{variantId}}",
      "sku": "PAMP-S4",
      "name": "Size 4",
      "price": "13000",
      "quantity": "20",
      "costPrice": "8000",
      "imageUrls": [],
      "reorderLevel": "5"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Organization-Id' => '{{orgId}}',
  ],
]);

echo $response->getBody();
```

```csharp Products_Update product_example
using RestSharp;

var client = new RestClient("https://auth/products/");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-Organization-Id", "{{orgId}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"productVariants\": [\n    {\n      \"id\": \"{{variantId}}\",\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"13000\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Products_Update product_example
import Foundation

let headers = [
  "X-Organization-Id": "{{orgId}}",
  "Content-Type": "application/json"
]
let parameters = ["productVariants": [
    [
      "id": "{{variantId}}",
      "sku": "PAMP-S4",
      "name": "Size 4",
      "price": "13000",
      "quantity": "20",
      "costPrice": "8000",
      "imageUrls": [],
      "reorderLevel": "5"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://auth/products/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```