Create product
curl --request POST \
--url https://api.tagada.io/api/public/v1/products/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "store_123",
"name": "Premium Joint Support Supplement",
"description": "Advanced joint support with natural ingredients",
"active": true,
"isShippable": true,
"isTaxable": true,
"variants": [
{
"name": "Regular Bottle - 1 Month Supply",
"description": "Single bottle for one month",
"sku": "JSS-REG-001",
"grams": 100,
"active": true,
"default": true,
"imageUrl": "https://example.com/product-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 2999,
"currency": "USD"
},
"EUR": {
"amount": 2699,
"currency": "EUR"
}
},
"recurring": false,
"billingTiming": "usage",
"interval": null,
"intervalCount": 1,
"default": true
}
]
},
{
"name": "Buy 2 Get 1 Free - 3 Month Supply",
"description": "Special bundle offer",
"sku": "JSS-B2G1-002",
"grams": 300,
"active": true,
"default": false,
"imageUrl": "https://example.com/bundle-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 4999,
"currency": "USD"
},
"EUR": {
"amount": 4499,
"currency": "EUR"
}
},
"recurring": false,
"billingTiming": "usage",
"interval": null,
"intervalCount": 1,
"default": true
}
]
}
]
}
'import requests
url = "https://api.tagada.io/api/public/v1/products/create"
payload = {
"storeId": "store_123",
"name": "Premium Joint Support Supplement",
"description": "Advanced joint support with natural ingredients",
"active": True,
"isShippable": True,
"isTaxable": True,
"variants": [
{
"name": "Regular Bottle - 1 Month Supply",
"description": "Single bottle for one month",
"sku": "JSS-REG-001",
"grams": 100,
"active": True,
"default": True,
"imageUrl": "https://example.com/product-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 2999,
"currency": "USD"
},
"EUR": {
"amount": 2699,
"currency": "EUR"
}
},
"recurring": False,
"billingTiming": "usage",
"interval": None,
"intervalCount": 1,
"default": True
}
]
},
{
"name": "Buy 2 Get 1 Free - 3 Month Supply",
"description": "Special bundle offer",
"sku": "JSS-B2G1-002",
"grams": 300,
"active": True,
"default": False,
"imageUrl": "https://example.com/bundle-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 4999,
"currency": "USD"
},
"EUR": {
"amount": 4499,
"currency": "EUR"
}
},
"recurring": False,
"billingTiming": "usage",
"interval": None,
"intervalCount": 1,
"default": True
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: 'store_123',
name: 'Premium Joint Support Supplement',
description: 'Advanced joint support with natural ingredients',
active: true,
isShippable: true,
isTaxable: true,
variants: [
{
name: 'Regular Bottle - 1 Month Supply',
description: 'Single bottle for one month',
sku: 'JSS-REG-001',
grams: 100,
active: true,
default: true,
imageUrl: 'https://example.com/product-image.jpg',
prices: [
{
currencyOptions: {USD: {amount: 2999, currency: 'USD'}, EUR: {amount: 2699, currency: 'EUR'}},
recurring: false,
billingTiming: 'usage',
interval: null,
intervalCount: 1,
default: true
}
]
},
{
name: 'Buy 2 Get 1 Free - 3 Month Supply',
description: 'Special bundle offer',
sku: 'JSS-B2G1-002',
grams: 300,
active: true,
default: false,
imageUrl: 'https://example.com/bundle-image.jpg',
prices: [
{
currencyOptions: {USD: {amount: 4999, currency: 'USD'}, EUR: {amount: 4499, currency: 'EUR'}},
recurring: false,
billingTiming: 'usage',
interval: null,
intervalCount: 1,
default: true
}
]
}
]
})
};
fetch('https://api.tagada.io/api/public/v1/products/create', 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.tagada.io/api/public/v1/products/create",
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([
'storeId' => 'store_123',
'name' => 'Premium Joint Support Supplement',
'description' => 'Advanced joint support with natural ingredients',
'active' => true,
'isShippable' => true,
'isTaxable' => true,
'variants' => [
[
'name' => 'Regular Bottle - 1 Month Supply',
'description' => 'Single bottle for one month',
'sku' => 'JSS-REG-001',
'grams' => 100,
'active' => true,
'default' => true,
'imageUrl' => 'https://example.com/product-image.jpg',
'prices' => [
[
'currencyOptions' => [
'USD' => [
'amount' => 2999,
'currency' => 'USD'
],
'EUR' => [
'amount' => 2699,
'currency' => 'EUR'
]
],
'recurring' => false,
'billingTiming' => 'usage',
'interval' => null,
'intervalCount' => 1,
'default' => true
]
]
],
[
'name' => 'Buy 2 Get 1 Free - 3 Month Supply',
'description' => 'Special bundle offer',
'sku' => 'JSS-B2G1-002',
'grams' => 300,
'active' => true,
'default' => false,
'imageUrl' => 'https://example.com/bundle-image.jpg',
'prices' => [
[
'currencyOptions' => [
'USD' => [
'amount' => 4999,
'currency' => 'USD'
],
'EUR' => [
'amount' => 4499,
'currency' => 'EUR'
]
],
'recurring' => false,
'billingTiming' => 'usage',
'interval' => null,
'intervalCount' => 1,
'default' => true
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tagada.io/api/public/v1/products/create"
payload := strings.NewReader("{\n \"storeId\": \"store_123\",\n \"name\": \"Premium Joint Support Supplement\",\n \"description\": \"Advanced joint support with natural ingredients\",\n \"active\": true,\n \"isShippable\": true,\n \"isTaxable\": true,\n \"variants\": [\n {\n \"name\": \"Regular Bottle - 1 Month Supply\",\n \"description\": \"Single bottle for one month\",\n \"sku\": \"JSS-REG-001\",\n \"grams\": 100,\n \"active\": true,\n \"default\": true,\n \"imageUrl\": \"https://example.com/product-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 2999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 2699,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n },\n {\n \"name\": \"Buy 2 Get 1 Free - 3 Month Supply\",\n \"description\": \"Special bundle offer\",\n \"sku\": \"JSS-B2G1-002\",\n \"grams\": 300,\n \"active\": true,\n \"default\": false,\n \"imageUrl\": \"https://example.com/bundle-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 4999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 4499,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tagada.io/api/public/v1/products/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"store_123\",\n \"name\": \"Premium Joint Support Supplement\",\n \"description\": \"Advanced joint support with natural ingredients\",\n \"active\": true,\n \"isShippable\": true,\n \"isTaxable\": true,\n \"variants\": [\n {\n \"name\": \"Regular Bottle - 1 Month Supply\",\n \"description\": \"Single bottle for one month\",\n \"sku\": \"JSS-REG-001\",\n \"grams\": 100,\n \"active\": true,\n \"default\": true,\n \"imageUrl\": \"https://example.com/product-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 2999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 2699,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n },\n {\n \"name\": \"Buy 2 Get 1 Free - 3 Month Supply\",\n \"description\": \"Special bundle offer\",\n \"sku\": \"JSS-B2G1-002\",\n \"grams\": 300,\n \"active\": true,\n \"default\": false,\n \"imageUrl\": \"https://example.com/bundle-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 4999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 4499,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/public/v1/products/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"store_123\",\n \"name\": \"Premium Joint Support Supplement\",\n \"description\": \"Advanced joint support with natural ingredients\",\n \"active\": true,\n \"isShippable\": true,\n \"isTaxable\": true,\n \"variants\": [\n {\n \"name\": \"Regular Bottle - 1 Month Supply\",\n \"description\": \"Single bottle for one month\",\n \"sku\": \"JSS-REG-001\",\n \"grams\": 100,\n \"active\": true,\n \"default\": true,\n \"imageUrl\": \"https://example.com/product-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 2999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 2699,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n },\n {\n \"name\": \"Buy 2 Get 1 Free - 3 Month Supply\",\n \"description\": \"Special bundle offer\",\n \"sku\": \"JSS-B2G1-002\",\n \"grams\": 300,\n \"active\": true,\n \"default\": false,\n \"imageUrl\": \"https://example.com/bundle-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 4999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 4499,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "prod_abc123",
"variants": [
{
"id": "var_001",
"name": "Regular Bottle - 1 Month Supply",
"prices": [
{
"id": "price_001"
}
]
},
{
"id": "var_002",
"name": "Buy 2 Get 1 Free - 3 Month Supply",
"prices": [
{
"id": "price_002"
}
]
}
]
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}products
Create product
Create a new product with variants and prices for a specific store
POST
/
api
/
public
/
v1
/
products
/
create
Create product
curl --request POST \
--url https://api.tagada.io/api/public/v1/products/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "store_123",
"name": "Premium Joint Support Supplement",
"description": "Advanced joint support with natural ingredients",
"active": true,
"isShippable": true,
"isTaxable": true,
"variants": [
{
"name": "Regular Bottle - 1 Month Supply",
"description": "Single bottle for one month",
"sku": "JSS-REG-001",
"grams": 100,
"active": true,
"default": true,
"imageUrl": "https://example.com/product-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 2999,
"currency": "USD"
},
"EUR": {
"amount": 2699,
"currency": "EUR"
}
},
"recurring": false,
"billingTiming": "usage",
"interval": null,
"intervalCount": 1,
"default": true
}
]
},
{
"name": "Buy 2 Get 1 Free - 3 Month Supply",
"description": "Special bundle offer",
"sku": "JSS-B2G1-002",
"grams": 300,
"active": true,
"default": false,
"imageUrl": "https://example.com/bundle-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 4999,
"currency": "USD"
},
"EUR": {
"amount": 4499,
"currency": "EUR"
}
},
"recurring": false,
"billingTiming": "usage",
"interval": null,
"intervalCount": 1,
"default": true
}
]
}
]
}
'import requests
url = "https://api.tagada.io/api/public/v1/products/create"
payload = {
"storeId": "store_123",
"name": "Premium Joint Support Supplement",
"description": "Advanced joint support with natural ingredients",
"active": True,
"isShippable": True,
"isTaxable": True,
"variants": [
{
"name": "Regular Bottle - 1 Month Supply",
"description": "Single bottle for one month",
"sku": "JSS-REG-001",
"grams": 100,
"active": True,
"default": True,
"imageUrl": "https://example.com/product-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 2999,
"currency": "USD"
},
"EUR": {
"amount": 2699,
"currency": "EUR"
}
},
"recurring": False,
"billingTiming": "usage",
"interval": None,
"intervalCount": 1,
"default": True
}
]
},
{
"name": "Buy 2 Get 1 Free - 3 Month Supply",
"description": "Special bundle offer",
"sku": "JSS-B2G1-002",
"grams": 300,
"active": True,
"default": False,
"imageUrl": "https://example.com/bundle-image.jpg",
"prices": [
{
"currencyOptions": {
"USD": {
"amount": 4999,
"currency": "USD"
},
"EUR": {
"amount": 4499,
"currency": "EUR"
}
},
"recurring": False,
"billingTiming": "usage",
"interval": None,
"intervalCount": 1,
"default": True
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: 'store_123',
name: 'Premium Joint Support Supplement',
description: 'Advanced joint support with natural ingredients',
active: true,
isShippable: true,
isTaxable: true,
variants: [
{
name: 'Regular Bottle - 1 Month Supply',
description: 'Single bottle for one month',
sku: 'JSS-REG-001',
grams: 100,
active: true,
default: true,
imageUrl: 'https://example.com/product-image.jpg',
prices: [
{
currencyOptions: {USD: {amount: 2999, currency: 'USD'}, EUR: {amount: 2699, currency: 'EUR'}},
recurring: false,
billingTiming: 'usage',
interval: null,
intervalCount: 1,
default: true
}
]
},
{
name: 'Buy 2 Get 1 Free - 3 Month Supply',
description: 'Special bundle offer',
sku: 'JSS-B2G1-002',
grams: 300,
active: true,
default: false,
imageUrl: 'https://example.com/bundle-image.jpg',
prices: [
{
currencyOptions: {USD: {amount: 4999, currency: 'USD'}, EUR: {amount: 4499, currency: 'EUR'}},
recurring: false,
billingTiming: 'usage',
interval: null,
intervalCount: 1,
default: true
}
]
}
]
})
};
fetch('https://api.tagada.io/api/public/v1/products/create', 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.tagada.io/api/public/v1/products/create",
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([
'storeId' => 'store_123',
'name' => 'Premium Joint Support Supplement',
'description' => 'Advanced joint support with natural ingredients',
'active' => true,
'isShippable' => true,
'isTaxable' => true,
'variants' => [
[
'name' => 'Regular Bottle - 1 Month Supply',
'description' => 'Single bottle for one month',
'sku' => 'JSS-REG-001',
'grams' => 100,
'active' => true,
'default' => true,
'imageUrl' => 'https://example.com/product-image.jpg',
'prices' => [
[
'currencyOptions' => [
'USD' => [
'amount' => 2999,
'currency' => 'USD'
],
'EUR' => [
'amount' => 2699,
'currency' => 'EUR'
]
],
'recurring' => false,
'billingTiming' => 'usage',
'interval' => null,
'intervalCount' => 1,
'default' => true
]
]
],
[
'name' => 'Buy 2 Get 1 Free - 3 Month Supply',
'description' => 'Special bundle offer',
'sku' => 'JSS-B2G1-002',
'grams' => 300,
'active' => true,
'default' => false,
'imageUrl' => 'https://example.com/bundle-image.jpg',
'prices' => [
[
'currencyOptions' => [
'USD' => [
'amount' => 4999,
'currency' => 'USD'
],
'EUR' => [
'amount' => 4499,
'currency' => 'EUR'
]
],
'recurring' => false,
'billingTiming' => 'usage',
'interval' => null,
'intervalCount' => 1,
'default' => true
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tagada.io/api/public/v1/products/create"
payload := strings.NewReader("{\n \"storeId\": \"store_123\",\n \"name\": \"Premium Joint Support Supplement\",\n \"description\": \"Advanced joint support with natural ingredients\",\n \"active\": true,\n \"isShippable\": true,\n \"isTaxable\": true,\n \"variants\": [\n {\n \"name\": \"Regular Bottle - 1 Month Supply\",\n \"description\": \"Single bottle for one month\",\n \"sku\": \"JSS-REG-001\",\n \"grams\": 100,\n \"active\": true,\n \"default\": true,\n \"imageUrl\": \"https://example.com/product-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 2999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 2699,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n },\n {\n \"name\": \"Buy 2 Get 1 Free - 3 Month Supply\",\n \"description\": \"Special bundle offer\",\n \"sku\": \"JSS-B2G1-002\",\n \"grams\": 300,\n \"active\": true,\n \"default\": false,\n \"imageUrl\": \"https://example.com/bundle-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 4999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 4499,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tagada.io/api/public/v1/products/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"store_123\",\n \"name\": \"Premium Joint Support Supplement\",\n \"description\": \"Advanced joint support with natural ingredients\",\n \"active\": true,\n \"isShippable\": true,\n \"isTaxable\": true,\n \"variants\": [\n {\n \"name\": \"Regular Bottle - 1 Month Supply\",\n \"description\": \"Single bottle for one month\",\n \"sku\": \"JSS-REG-001\",\n \"grams\": 100,\n \"active\": true,\n \"default\": true,\n \"imageUrl\": \"https://example.com/product-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 2999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 2699,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n },\n {\n \"name\": \"Buy 2 Get 1 Free - 3 Month Supply\",\n \"description\": \"Special bundle offer\",\n \"sku\": \"JSS-B2G1-002\",\n \"grams\": 300,\n \"active\": true,\n \"default\": false,\n \"imageUrl\": \"https://example.com/bundle-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 4999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 4499,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/public/v1/products/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"store_123\",\n \"name\": \"Premium Joint Support Supplement\",\n \"description\": \"Advanced joint support with natural ingredients\",\n \"active\": true,\n \"isShippable\": true,\n \"isTaxable\": true,\n \"variants\": [\n {\n \"name\": \"Regular Bottle - 1 Month Supply\",\n \"description\": \"Single bottle for one month\",\n \"sku\": \"JSS-REG-001\",\n \"grams\": 100,\n \"active\": true,\n \"default\": true,\n \"imageUrl\": \"https://example.com/product-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 2999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 2699,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n },\n {\n \"name\": \"Buy 2 Get 1 Free - 3 Month Supply\",\n \"description\": \"Special bundle offer\",\n \"sku\": \"JSS-B2G1-002\",\n \"grams\": 300,\n \"active\": true,\n \"default\": false,\n \"imageUrl\": \"https://example.com/bundle-image.jpg\",\n \"prices\": [\n {\n \"currencyOptions\": {\n \"USD\": {\n \"amount\": 4999,\n \"currency\": \"USD\"\n },\n \"EUR\": {\n \"amount\": 4499,\n \"currency\": \"EUR\"\n }\n },\n \"recurring\": false,\n \"billingTiming\": \"usage\",\n \"interval\": null,\n \"intervalCount\": 1,\n \"default\": true\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "prod_abc123",
"variants": [
{
"id": "var_001",
"name": "Regular Bottle - 1 Month Supply",
"prices": [
{
"id": "price_001"
}
]
},
{
"id": "var_002",
"name": "Buy 2 Get 1 Free - 3 Month Supply",
"prices": [
{
"id": "price_002"
}
]
}
]
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
Enter your API key as: Bearer your-api-key
Body
application/json
Minimum string length:
1Minimum array length:
1Show child attributes
Show child attributes
Response
Successful response
⌘I
