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

# Create product

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

Reference: https://docs.venda.rw/venda-api-production/products/create-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.

- `name` (string, required)
- `type` (string, required)
- `unit` (string, required)
- `status` (string, required)
- `categoryId` (string, required)
- `supplierIds` (list of string, required)
- `discountType` (string, required)
- `discountValue` (string, required)
- `productVariants` (list of ProductsPostRequestBodyContentApplicationJsonSchemaProductVariantsItems, required)

## Response

### 200

Successful response

## Types

### ProductsPostRequestBodyContentApplicationJsonSchemaProductVariantsItems

- `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
{
  "name": "Pampers Baby Diapers",
  "type": "product",
  "unit": "pack",
  "status": "active",
  "categoryId": "{{categoryId}}",
  "supplierIds": [
    "{{supplierId}}"
  ],
  "discountType": "none",
  "discountValue": "0",
  "productVariants": [
    {
      "sku": "PAMP-S4",
      "name": "Size 4",
      "price": "12500",
      "quantity": "20",
      "costPrice": "8000",
      "imageUrls": [],
      "reorderLevel": "5"
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python Products_Create product_example
import requests

url = "https://auth/products"

payload = {
    "name": "Pampers Baby Diapers",
    "type": "product",
    "unit": "pack",
    "status": "active",
    "categoryId": "{{categoryId}}",
    "supplierIds": ["{{supplierId}}"],
    "discountType": "none",
    "discountValue": "0",
    "productVariants": [
        {
            "sku": "PAMP-S4",
            "name": "Size 4",
            "price": "12500",
            "quantity": "20",
            "costPrice": "8000",
            "imageUrls": [],
            "reorderLevel": "5"
        }
    ]
}
headers = {
    "X-Organization-Id": "{{orgId}}",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Products_Create product_example
const url = 'https://auth/products';
const options = {
  method: 'POST',
  headers: {'X-Organization-Id': '{{orgId}}', 'Content-Type': 'application/json'},
  body: '{"name":"Pampers Baby Diapers","type":"product","unit":"pack","status":"active","categoryId":"{{categoryId}}","supplierIds":["{{supplierId}}"],"discountType":"none","discountValue":"0","productVariants":[{"sku":"PAMP-S4","name":"Size 4","price":"12500","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_Create product_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"Pampers Baby Diapers\",\n  \"type\": \"product\",\n  \"unit\": \"pack\",\n  \"status\": \"active\",\n  \"categoryId\": \"{{categoryId}}\",\n  \"supplierIds\": [\n    \"{{supplierId}}\"\n  ],\n  \"discountType\": \"none\",\n  \"discountValue\": \"0\",\n  \"productVariants\": [\n    {\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"12500\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", 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_Create 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::Post.new(url)
request["X-Organization-Id"] = '{{orgId}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Pampers Baby Diapers\",\n  \"type\": \"product\",\n  \"unit\": \"pack\",\n  \"status\": \"active\",\n  \"categoryId\": \"{{categoryId}}\",\n  \"supplierIds\": [\n    \"{{supplierId}}\"\n  ],\n  \"discountType\": \"none\",\n  \"discountValue\": \"0\",\n  \"productVariants\": [\n    {\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"12500\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://auth/products")
  .header("X-Organization-Id", "{{orgId}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Pampers Baby Diapers\",\n  \"type\": \"product\",\n  \"unit\": \"pack\",\n  \"status\": \"active\",\n  \"categoryId\": \"{{categoryId}}\",\n  \"supplierIds\": [\n    \"{{supplierId}}\"\n  ],\n  \"discountType\": \"none\",\n  \"discountValue\": \"0\",\n  \"productVariants\": [\n    {\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"12500\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://auth/products', [
  'body' => '{
  "name": "Pampers Baby Diapers",
  "type": "product",
  "unit": "pack",
  "status": "active",
  "categoryId": "{{categoryId}}",
  "supplierIds": [
    "{{supplierId}}"
  ],
  "discountType": "none",
  "discountValue": "0",
  "productVariants": [
    {
      "sku": "PAMP-S4",
      "name": "Size 4",
      "price": "12500",
      "quantity": "20",
      "costPrice": "8000",
      "imageUrls": [],
      "reorderLevel": "5"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Organization-Id' => '{{orgId}}',
  ],
]);

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

```csharp Products_Create product_example
using RestSharp;

var client = new RestClient("https://auth/products");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Organization-Id", "{{orgId}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Pampers Baby Diapers\",\n  \"type\": \"product\",\n  \"unit\": \"pack\",\n  \"status\": \"active\",\n  \"categoryId\": \"{{categoryId}}\",\n  \"supplierIds\": [\n    \"{{supplierId}}\"\n  ],\n  \"discountType\": \"none\",\n  \"discountValue\": \"0\",\n  \"productVariants\": [\n    {\n      \"sku\": \"PAMP-S4\",\n      \"name\": \"Size 4\",\n      \"price\": \"12500\",\n      \"quantity\": \"20\",\n      \"costPrice\": \"8000\",\n      \"imageUrls\": [],\n      \"reorderLevel\": \"5\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Products_Create product_example
import Foundation

let headers = [
  "X-Organization-Id": "{{orgId}}",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Pampers Baby Diapers",
  "type": "product",
  "unit": "pack",
  "status": "active",
  "categoryId": "{{categoryId}}",
  "supplierIds": ["{{supplierId}}"],
  "discountType": "none",
  "discountValue": "0",
  "productVariants": [
    [
      "sku": "PAMP-S4",
      "name": "Size 4",
      "price": "12500",
      "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 = "POST"
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()
```