curl --request PATCH \
--url https://api.wizcommerce.com/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data @- <<EOF
{
"group_code": "PRD1",
"reference_id": "PRD1",
"name": "8'X10'",
"categories": [
"<string>"
],
"collections": [
"<string>"
],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": true
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"status": "inactive",
"priority": 123
}
EOFimport requests
url = "https://api.wizcommerce.com/v1/products/{id}"
payload = {
"group_code": "PRD1",
"reference_id": "PRD1",
"name": "8'X10'",
"categories": ["<string>"],
"collections": ["<string>"],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": True
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"status": "inactive",
"priority": 123
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_code: 'PRD1',
reference_id: 'PRD1',
name: '8\'X10\'',
categories: ['<string>'],
collections: ['<string>'],
medias: [
{
url: 'https://example.com/image1.jpg',
order: 1,
type: 'image',
is_default: true
}
],
attributes: [{name: '1234567890', value: 'red'}],
product_prices: [
{
price_list_id: 'PRC123',
price: 100,
min_order_quantity: 1,
max_order_quantity: 100,
step_increment: 1
}
],
status: 'inactive',
priority: 123
})
};
fetch('https://api.wizcommerce.com/v1/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizcommerce.com/v1/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'group_code' => 'PRD1',
'reference_id' => 'PRD1',
'name' => '8\'X10\'',
'categories' => [
'<string>'
],
'collections' => [
'<string>'
],
'medias' => [
[
'url' => 'https://example.com/image1.jpg',
'order' => 1,
'type' => 'image',
'is_default' => true
]
],
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
],
'product_prices' => [
[
'price_list_id' => 'PRC123',
'price' => 100,
'min_order_quantity' => 1,
'max_order_quantity' => 100,
'step_increment' => 1
]
],
'status' => 'inactive',
'priority' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v1/products/{id}"
payload := strings.NewReader("{\n \"group_code\": \"PRD1\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ],\n \"medias\": [\n {\n \"url\": \"https://example.com/image1.jpg\",\n \"order\": 1,\n \"type\": \"image\",\n \"is_default\": true\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"product_prices\": [\n {\n \"price_list_id\": \"PRC123\",\n \"price\": 100,\n \"min_order_quantity\": 1,\n \"max_order_quantity\": 100,\n \"step_increment\": 1\n }\n ],\n \"status\": \"inactive\",\n \"priority\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.wizcommerce.com/v1/products/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"group_code\": \"PRD1\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ],\n \"medias\": [\n {\n \"url\": \"https://example.com/image1.jpg\",\n \"order\": 1,\n \"type\": \"image\",\n \"is_default\": true\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"product_prices\": [\n {\n \"price_list_id\": \"PRC123\",\n \"price\": 100,\n \"min_order_quantity\": 1,\n \"max_order_quantity\": 100,\n \"step_increment\": 1\n }\n ],\n \"status\": \"inactive\",\n \"priority\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_code\": \"PRD1\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ],\n \"medias\": [\n {\n \"url\": \"https://example.com/image1.jpg\",\n \"order\": 1,\n \"type\": \"image\",\n \"is_default\": true\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"product_prices\": [\n {\n \"price_list_id\": \"PRC123\",\n \"price\": 100,\n \"min_order_quantity\": 1,\n \"max_order_quantity\": 100,\n \"step_increment\": 1\n }\n ],\n \"status\": \"inactive\",\n \"priority\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"reference_id": "SKU123",
"sku": "SKU123",
"name": "Product Name",
"group_code": "PRD1",
"medias": [
{
"is_default": true,
"type": "image",
"url": "https://example.com/image1.jpg"
}
],
"is_primary": true,
"status": "active",
"attributes": [
{
"id": "1234567890",
"name": "color",
"value": "red"
}
],
"created_at": "<string>",
"updated_at": "<string>",
"price_lists": [
{
"created_at": "<string>",
"id": "<string>",
"max_order_quantity": 123,
"min_order_quantity": 123,
"price": 123,
"step_increment": 123,
"updated_at": "<string>"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Update Product
Update Product
curl --request PATCH \
--url https://api.wizcommerce.com/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data @- <<EOF
{
"group_code": "PRD1",
"reference_id": "PRD1",
"name": "8'X10'",
"categories": [
"<string>"
],
"collections": [
"<string>"
],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": true
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"status": "inactive",
"priority": 123
}
EOFimport requests
url = "https://api.wizcommerce.com/v1/products/{id}"
payload = {
"group_code": "PRD1",
"reference_id": "PRD1",
"name": "8'X10'",
"categories": ["<string>"],
"collections": ["<string>"],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": True
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"status": "inactive",
"priority": 123
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_code: 'PRD1',
reference_id: 'PRD1',
name: '8\'X10\'',
categories: ['<string>'],
collections: ['<string>'],
medias: [
{
url: 'https://example.com/image1.jpg',
order: 1,
type: 'image',
is_default: true
}
],
attributes: [{name: '1234567890', value: 'red'}],
product_prices: [
{
price_list_id: 'PRC123',
price: 100,
min_order_quantity: 1,
max_order_quantity: 100,
step_increment: 1
}
],
status: 'inactive',
priority: 123
})
};
fetch('https://api.wizcommerce.com/v1/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizcommerce.com/v1/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'group_code' => 'PRD1',
'reference_id' => 'PRD1',
'name' => '8\'X10\'',
'categories' => [
'<string>'
],
'collections' => [
'<string>'
],
'medias' => [
[
'url' => 'https://example.com/image1.jpg',
'order' => 1,
'type' => 'image',
'is_default' => true
]
],
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
],
'product_prices' => [
[
'price_list_id' => 'PRC123',
'price' => 100,
'min_order_quantity' => 1,
'max_order_quantity' => 100,
'step_increment' => 1
]
],
'status' => 'inactive',
'priority' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v1/products/{id}"
payload := strings.NewReader("{\n \"group_code\": \"PRD1\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ],\n \"medias\": [\n {\n \"url\": \"https://example.com/image1.jpg\",\n \"order\": 1,\n \"type\": \"image\",\n \"is_default\": true\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"product_prices\": [\n {\n \"price_list_id\": \"PRC123\",\n \"price\": 100,\n \"min_order_quantity\": 1,\n \"max_order_quantity\": 100,\n \"step_increment\": 1\n }\n ],\n \"status\": \"inactive\",\n \"priority\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.wizcommerce.com/v1/products/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"group_code\": \"PRD1\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ],\n \"medias\": [\n {\n \"url\": \"https://example.com/image1.jpg\",\n \"order\": 1,\n \"type\": \"image\",\n \"is_default\": true\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"product_prices\": [\n {\n \"price_list_id\": \"PRC123\",\n \"price\": 100,\n \"min_order_quantity\": 1,\n \"max_order_quantity\": 100,\n \"step_increment\": 1\n }\n ],\n \"status\": \"inactive\",\n \"priority\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_code\": \"PRD1\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\n \"categories\": [\n \"<string>\"\n ],\n \"collections\": [\n \"<string>\"\n ],\n \"medias\": [\n {\n \"url\": \"https://example.com/image1.jpg\",\n \"order\": 1,\n \"type\": \"image\",\n \"is_default\": true\n }\n ],\n \"attributes\": [\n {\n \"name\": \"1234567890\",\n \"value\": \"red\"\n }\n ],\n \"product_prices\": [\n {\n \"price_list_id\": \"PRC123\",\n \"price\": 100,\n \"min_order_quantity\": 1,\n \"max_order_quantity\": 100,\n \"step_increment\": 1\n }\n ],\n \"status\": \"inactive\",\n \"priority\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"reference_id": "SKU123",
"sku": "SKU123",
"name": "Product Name",
"group_code": "PRD1",
"medias": [
{
"is_default": true,
"type": "image",
"url": "https://example.com/image1.jpg"
}
],
"is_primary": true,
"status": "active",
"attributes": [
{
"id": "1234567890",
"name": "color",
"value": "red"
}
],
"created_at": "<string>",
"updated_at": "<string>",
"price_lists": [
{
"created_at": "<string>",
"id": "<string>",
"max_order_quantity": 123,
"min_order_quantity": 123,
"price": 123,
"step_increment": 123,
"updated_at": "<string>"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}PATCH request is used to partially update an existing entity by the
given id. This means:- Only the fields provided in the request body will be updated.
- Fields not provided in the request body will remain unchanged.
- The request is idempotent, meaning multiple identical PATCH requests will always result in the same final state.
Authorizations
API Key for authentication
Path Parameters
Product ID
Body
Product Update Request
If the code already exists, this variant joins that group. If the code is new, every variant in this group gets the new code. Omit to leave the group as-is.
"PRD1"
Reference ID for the variant, if no reference id is available, the sku_id should be used
"PRD1"
255"8'X10'"
One or more category names for this variant, in case sub categories are available, the sub categories should be separated by :: eg: "category1::sub_category1::sub_sub_category1" then the category "sub_sub_category1" will be mapped to the product
One or more collection IDs for this variant
Media assets associated with this variant
Show child attributes
Show child attributes
Key-value pair attributes like size, shape, material, etc.
Show child attributes
Show child attributes
Prices mapped to price lists
Show child attributes
Show child attributes
active, inactive "inactive"
Omit = no change; null = clear; value = set.
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
