Get Product By ID
curl --request GET \
--url https://api.wizcommerce.com/v2/products/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.wizcommerce.com/v2/products/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizcommerce.com/v2/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/v2/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/products/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wizcommerce.com/v2/products/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v2/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
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,
"order": 1,
"type": "image",
"url": "https://example.com/image1.jpg"
}
],
"is_primary": true,
"priority": 1,
"status": "active",
"attributes": [
{
"id": "1234567890",
"name": "color",
"value": "red"
}
],
"categories": [
"Electronics",
"Smartphones"
],
"created_at": "<string>",
"updated_at": "<string>",
"price_lists": [
{
"created_at": "<string>",
"default_order_quantity": 123,
"id": "<string>",
"max_order_quantity": 123,
"min_order_quantity": 123,
"price": 123,
"sale_price": 123,
"step_increment": 123,
"updated_at": "<string>",
"volume_tiers": [
{
"price": 20,
"start_quantity": 1,
"step_increment": 1
}
]
}
],
"url_slug": "blue-t-shirt-xl",
"seo_info": {
"description": "<string>",
"keywords": [
"<string>"
],
"primary_title": "<string>",
"title": "<string>"
},
"channel_visibility": {
"website": "DontShow"
},
"volume": {
"cbm": 0.042475,
"cft": 1.5
},
"tags": [
"tag1",
"tag2"
],
"brand": "BrandName"
}
}{
"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
Get Product By ID
Get Product By ID
GET
/
v2
/
products
/
{id}
Get Product By ID
curl --request GET \
--url https://api.wizcommerce.com/v2/products/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.wizcommerce.com/v2/products/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizcommerce.com/v2/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/v2/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.wizcommerce.com/v2/products/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wizcommerce.com/v2/products/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wizcommerce.com/v2/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
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,
"order": 1,
"type": "image",
"url": "https://example.com/image1.jpg"
}
],
"is_primary": true,
"priority": 1,
"status": "active",
"attributes": [
{
"id": "1234567890",
"name": "color",
"value": "red"
}
],
"categories": [
"Electronics",
"Smartphones"
],
"created_at": "<string>",
"updated_at": "<string>",
"price_lists": [
{
"created_at": "<string>",
"default_order_quantity": 123,
"id": "<string>",
"max_order_quantity": 123,
"min_order_quantity": 123,
"price": 123,
"sale_price": 123,
"step_increment": 123,
"updated_at": "<string>",
"volume_tiers": [
{
"price": 20,
"start_quantity": 1,
"step_increment": 1
}
]
}
],
"url_slug": "blue-t-shirt-xl",
"seo_info": {
"description": "<string>",
"keywords": [
"<string>"
],
"primary_title": "<string>",
"title": "<string>"
},
"channel_visibility": {
"website": "DontShow"
},
"volume": {
"cbm": 0.042475,
"cft": 1.5
},
"tags": [
"tag1",
"tag2"
],
"brand": "BrandName"
}
}{
"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>"
}
]
}Was this page helpful?
⌘I
