Create Product
curl --request POST \
--url https://api.wizcommerce.com/v1/products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data @- <<EOF
{
"group_code": "PRD1",
"variants": [
{
"sku_id": "66112458-fda7-4a96-8121-9c1d57a8651d",
"reference_id": "PRD1",
"name": "8'X10'",
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"categories": [
"<string>"
],
"collections": [
"<string>"
],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": true
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"is_primary": true,
"priority": 123
}
],
"grouping_attributes": [
"<string>"
]
}
EOFimport requests
url = "https://api.wizcommerce.com/v1/products"
payload = {
"group_code": "PRD1",
"variants": [
{
"sku_id": "66112458-fda7-4a96-8121-9c1d57a8651d",
"reference_id": "PRD1",
"name": "8'X10'",
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"categories": ["<string>"],
"collections": ["<string>"],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": True
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"is_primary": True,
"priority": 123
}
],
"grouping_attributes": ["<string>"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_code: 'PRD1',
variants: [
{
sku_id: '66112458-fda7-4a96-8121-9c1d57a8651d',
reference_id: 'PRD1',
name: '8\'X10\'',
product_prices: [
{
price_list_id: 'PRC123',
price: 100,
min_order_quantity: 1,
max_order_quantity: 100,
step_increment: 1
}
],
categories: ['<string>'],
collections: ['<string>'],
medias: [
{
url: 'https://example.com/image1.jpg',
order: 1,
type: 'image',
is_default: true
}
],
attributes: [{name: '1234567890', value: 'red'}],
is_primary: true,
priority: 123
}
],
grouping_attributes: ['<string>']
})
};
fetch('https://api.wizcommerce.com/v1/products', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'group_code' => 'PRD1',
'variants' => [
[
'sku_id' => '66112458-fda7-4a96-8121-9c1d57a8651d',
'reference_id' => 'PRD1',
'name' => '8\'X10\'',
'product_prices' => [
[
'price_list_id' => 'PRC123',
'price' => 100,
'min_order_quantity' => 1,
'max_order_quantity' => 100,
'step_increment' => 1
]
],
'categories' => [
'<string>'
],
'collections' => [
'<string>'
],
'medias' => [
[
'url' => 'https://example.com/image1.jpg',
'order' => 1,
'type' => 'image',
'is_default' => true
]
],
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
],
'is_primary' => true,
'priority' => 123
]
],
'grouping_attributes' => [
'<string>'
]
]),
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"
payload := strings.NewReader("{\n \"group_code\": \"PRD1\",\n \"variants\": [\n {\n \"sku_id\": \"66112458-fda7-4a96-8121-9c1d57a8651d\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\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 \"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 \"is_primary\": true,\n \"priority\": 123\n }\n ],\n \"grouping_attributes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.wizcommerce.com/v1/products")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"group_code\": \"PRD1\",\n \"variants\": [\n {\n \"sku_id\": \"66112458-fda7-4a96-8121-9c1d57a8651d\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\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 \"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 \"is_primary\": true,\n \"priority\": 123\n }\n ],\n \"grouping_attributes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_code\": \"PRD1\",\n \"variants\": [\n {\n \"sku_id\": \"66112458-fda7-4a96-8121-9c1d57a8651d\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\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 \"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 \"is_primary\": true,\n \"priority\": 123\n }\n ],\n \"grouping_attributes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"parent_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>"
}
}{
"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>"
}
]
}Product
Create Product
Create Product
POST
/
v1
/
products
Create Product
curl --request POST \
--url https://api.wizcommerce.com/v1/products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data @- <<EOF
{
"group_code": "PRD1",
"variants": [
{
"sku_id": "66112458-fda7-4a96-8121-9c1d57a8651d",
"reference_id": "PRD1",
"name": "8'X10'",
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"categories": [
"<string>"
],
"collections": [
"<string>"
],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": true
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"is_primary": true,
"priority": 123
}
],
"grouping_attributes": [
"<string>"
]
}
EOFimport requests
url = "https://api.wizcommerce.com/v1/products"
payload = {
"group_code": "PRD1",
"variants": [
{
"sku_id": "66112458-fda7-4a96-8121-9c1d57a8651d",
"reference_id": "PRD1",
"name": "8'X10'",
"product_prices": [
{
"price_list_id": "PRC123",
"price": 100,
"min_order_quantity": 1,
"max_order_quantity": 100,
"step_increment": 1
}
],
"categories": ["<string>"],
"collections": ["<string>"],
"medias": [
{
"url": "https://example.com/image1.jpg",
"order": 1,
"type": "image",
"is_default": True
}
],
"attributes": [
{
"name": "1234567890",
"value": "red"
}
],
"is_primary": True,
"priority": 123
}
],
"grouping_attributes": ["<string>"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_code: 'PRD1',
variants: [
{
sku_id: '66112458-fda7-4a96-8121-9c1d57a8651d',
reference_id: 'PRD1',
name: '8\'X10\'',
product_prices: [
{
price_list_id: 'PRC123',
price: 100,
min_order_quantity: 1,
max_order_quantity: 100,
step_increment: 1
}
],
categories: ['<string>'],
collections: ['<string>'],
medias: [
{
url: 'https://example.com/image1.jpg',
order: 1,
type: 'image',
is_default: true
}
],
attributes: [{name: '1234567890', value: 'red'}],
is_primary: true,
priority: 123
}
],
grouping_attributes: ['<string>']
})
};
fetch('https://api.wizcommerce.com/v1/products', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'group_code' => 'PRD1',
'variants' => [
[
'sku_id' => '66112458-fda7-4a96-8121-9c1d57a8651d',
'reference_id' => 'PRD1',
'name' => '8\'X10\'',
'product_prices' => [
[
'price_list_id' => 'PRC123',
'price' => 100,
'min_order_quantity' => 1,
'max_order_quantity' => 100,
'step_increment' => 1
]
],
'categories' => [
'<string>'
],
'collections' => [
'<string>'
],
'medias' => [
[
'url' => 'https://example.com/image1.jpg',
'order' => 1,
'type' => 'image',
'is_default' => true
]
],
'attributes' => [
[
'name' => '1234567890',
'value' => 'red'
]
],
'is_primary' => true,
'priority' => 123
]
],
'grouping_attributes' => [
'<string>'
]
]),
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"
payload := strings.NewReader("{\n \"group_code\": \"PRD1\",\n \"variants\": [\n {\n \"sku_id\": \"66112458-fda7-4a96-8121-9c1d57a8651d\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\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 \"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 \"is_primary\": true,\n \"priority\": 123\n }\n ],\n \"grouping_attributes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.wizcommerce.com/v1/products")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"group_code\": \"PRD1\",\n \"variants\": [\n {\n \"sku_id\": \"66112458-fda7-4a96-8121-9c1d57a8651d\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\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 \"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 \"is_primary\": true,\n \"priority\": 123\n }\n ],\n \"grouping_attributes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_code\": \"PRD1\",\n \"variants\": [\n {\n \"sku_id\": \"66112458-fda7-4a96-8121-9c1d57a8651d\",\n \"reference_id\": \"PRD1\",\n \"name\": \"8'X10'\",\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 \"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 \"is_primary\": true,\n \"priority\": 123\n }\n ],\n \"grouping_attributes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "01f5d171-d3e3-4b2b-bd57-0727194b5bed",
"parent_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>"
}
}{
"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>"
}
]
}Authorizations
API Key for authentication
Body
application/json
Product Create Request
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
⌘I
