curl --request POST \
--url https://api.shoppex.io/dev/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Created Product",
"price": 19.99,
"type": "DYNAMIC",
"dynamic_webhook": "https://example.com/hook",
"delivery_instructions": {
"required": true,
"label": "Discord username"
},
"custom_fields": [
{
"name": "Invite",
"type": "text",
"required": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Created Product',
price: 19.99,
type: 'DYNAMIC',
dynamic_webhook: 'https://example.com/hook',
delivery_instructions: {required: true, label: 'Discord username'},
custom_fields: [{name: 'Invite', type: 'text', required: true}]
})
};
fetch('https://api.shoppex.io/dev/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products"
payload = {
"title": "Created Product",
"price": 19.99,
"type": "DYNAMIC",
"dynamic_webhook": "https://example.com/hook",
"delivery_instructions": {
"required": True,
"label": "Discord username"
},
"custom_fields": [
{
"name": "Invite",
"type": "text",
"required": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/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([
'title' => 'Created Product',
'price' => 19.99,
'type' => 'DYNAMIC',
'dynamic_webhook' => 'https://example.com/hook',
'delivery_instructions' => [
'required' => true,
'label' => 'Discord username'
],
'custom_fields' => [
[
'name' => 'Invite',
'type' => 'text',
'required' => 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.shoppex.io/dev/v1/products"
payload := strings.NewReader("{\n \"title\": \"Created Product\",\n \"price\": 19.99,\n \"type\": \"DYNAMIC\",\n \"dynamic_webhook\": \"https://example.com/hook\",\n \"delivery_instructions\": {\n \"required\": true,\n \"label\": \"Discord username\"\n },\n \"custom_fields\": [\n {\n \"name\": \"Invite\",\n \"type\": \"text\",\n \"required\": true\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))
}{
"data": {
"id": "prod_db_1",
"uniqid": "prod_created",
"shop_id": "shop_1",
"slug": null,
"type": "DYNAMIC",
"subtype": null,
"title": "Created Product",
"currency": "USD",
"price": 19.99,
"price_display": 19.99,
"cost": null,
"cost_display": null,
"discount_percent": 0,
"pay_what_you_want": false,
"description": "Product description",
"description_tabs": [
{
"title": "Features",
"content": "<p>Instant delivery, 24/7 support.</p>"
}
],
"gateways": [
"PAYPAL"
],
"custom_fields": [
{
"name": "Invite",
"type": "text",
"required": true
}
],
"delivery_instructions": {
"enabled": true,
"required": true,
"label": "Discord username"
},
"volume_discounts": [],
"quantity_min": 1,
"quantity_max": -1,
"quantity_warning": 0,
"stock": 0,
"available_stock": 0,
"stock_delimiter": "\n",
"unlisted": false,
"private": false,
"on_hold": false,
"sort_priority": 0,
"crypto_confirmations": 1,
"max_risk_level": 100,
"block_vpn_proxies": false,
"delivery_text": "",
"delivery_time": null,
"service_text": "",
"dynamic_webhook": "https://example.com/hook",
"terms_of_service": null,
"warranty_days": 0,
"warranty_text": null,
"watermark_enabled": true,
"watermark_text": null,
"redirect_link": null,
"video_link": null,
"image_id": null,
"image_url": null,
"file_id": null,
"recurring_interval": null,
"recurring_interval_count": null,
"trial_period": null,
"licensing_enabled": false,
"license_period": null,
"affiliate_revenue_percent": 0,
"affiliate_customer_discount_mode": "USE_STORE_DEFAULT",
"affiliate_customer_discount_percent": null,
"category_id": null,
"variants": [],
"created_at": 1711965600,
"updated_at": 1711965600
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}Create product
Developer API operation for POST /dev/v1/products.
curl --request POST \
--url https://api.shoppex.io/dev/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Created Product",
"price": 19.99,
"type": "DYNAMIC",
"dynamic_webhook": "https://example.com/hook",
"delivery_instructions": {
"required": true,
"label": "Discord username"
},
"custom_fields": [
{
"name": "Invite",
"type": "text",
"required": true
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Created Product',
price: 19.99,
type: 'DYNAMIC',
dynamic_webhook: 'https://example.com/hook',
delivery_instructions: {required: true, label: 'Discord username'},
custom_fields: [{name: 'Invite', type: 'text', required: true}]
})
};
fetch('https://api.shoppex.io/dev/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products"
payload = {
"title": "Created Product",
"price": 19.99,
"type": "DYNAMIC",
"dynamic_webhook": "https://example.com/hook",
"delivery_instructions": {
"required": True,
"label": "Discord username"
},
"custom_fields": [
{
"name": "Invite",
"type": "text",
"required": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/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([
'title' => 'Created Product',
'price' => 19.99,
'type' => 'DYNAMIC',
'dynamic_webhook' => 'https://example.com/hook',
'delivery_instructions' => [
'required' => true,
'label' => 'Discord username'
],
'custom_fields' => [
[
'name' => 'Invite',
'type' => 'text',
'required' => 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.shoppex.io/dev/v1/products"
payload := strings.NewReader("{\n \"title\": \"Created Product\",\n \"price\": 19.99,\n \"type\": \"DYNAMIC\",\n \"dynamic_webhook\": \"https://example.com/hook\",\n \"delivery_instructions\": {\n \"required\": true,\n \"label\": \"Discord username\"\n },\n \"custom_fields\": [\n {\n \"name\": \"Invite\",\n \"type\": \"text\",\n \"required\": true\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))
}{
"data": {
"id": "prod_db_1",
"uniqid": "prod_created",
"shop_id": "shop_1",
"slug": null,
"type": "DYNAMIC",
"subtype": null,
"title": "Created Product",
"currency": "USD",
"price": 19.99,
"price_display": 19.99,
"cost": null,
"cost_display": null,
"discount_percent": 0,
"pay_what_you_want": false,
"description": "Product description",
"description_tabs": [
{
"title": "Features",
"content": "<p>Instant delivery, 24/7 support.</p>"
}
],
"gateways": [
"PAYPAL"
],
"custom_fields": [
{
"name": "Invite",
"type": "text",
"required": true
}
],
"delivery_instructions": {
"enabled": true,
"required": true,
"label": "Discord username"
},
"volume_discounts": [],
"quantity_min": 1,
"quantity_max": -1,
"quantity_warning": 0,
"stock": 0,
"available_stock": 0,
"stock_delimiter": "\n",
"unlisted": false,
"private": false,
"on_hold": false,
"sort_priority": 0,
"crypto_confirmations": 1,
"max_risk_level": 100,
"block_vpn_proxies": false,
"delivery_text": "",
"delivery_time": null,
"service_text": "",
"dynamic_webhook": "https://example.com/hook",
"terms_of_service": null,
"warranty_days": 0,
"warranty_text": null,
"watermark_enabled": true,
"watermark_text": null,
"redirect_link": null,
"video_link": null,
"image_id": null,
"image_url": null,
"file_id": null,
"recurring_interval": null,
"recurring_interval_count": null,
"trial_period": null,
"licensing_enabled": false,
"license_period": null,
"affiliate_revenue_percent": 0,
"affiliate_customer_discount_mode": "USE_STORE_DEFAULT",
"affiliate_customer_discount_percent": null,
"category_id": null,
"variants": [],
"created_at": 1711965600,
"updated_at": 1711965600
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"subcode": "<string>"
}
}Authorizations
Use your Shoppex API key in the Authorization header.
Body
SERIALS, FILE, SERVICE, DYNAMIC, INFO_CARD, SUBSCRIPTION, GAMING_RCON, SUBSCRIPTION_V2 Show child attributes
Show child attributes
Merchant-defined public key/value pairs surfaced on the storefront product wire. Flat strings only; at most 50 keys. Send {} to clear.
Show child attributes
Show child attributes
SINGLE, MULTIPLE, RANDOM, REPLACEMENT, SERIALS, FILE, SERVICE, DYNAMIC comma, newline, , comma, newline, , Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Risk score ceiling, 0-100. 100 lets every buyer through.
Risk score ceiling, 0-100. 100 lets every buyer through.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
DAY, WEEK, MONTH, YEAR DAY, WEEK, MONTH, YEAR minutes, hours, days minutes, hours, days Show child attributes
Show child attributes
Discord server (guild) id. On PATCH, changing this value clears stored primary, required and additional role IDs unless replacements are supplied in the same request.
Discord server (guild) id. On PATCH, changing this value clears stored primary, required and additional role IDs unless replacements are supplied in the same request.
^(?:[1-9][0-9]*|)$Existing Discord role required before purchase, independent of delivery. A numeric unsigned 64-bit Discord snowflake (maximum 18446744073709551615). Requires discord_server_id. Clear with null or an empty string. Buyers must sign in to the hosted shop and connect Discord in their account.
^(?:[1-9][0-9]*|)$Additional Discord role ids (max 20).
Additional Discord role ids (max 20).
USE_STORE_DEFAULT, CUSTOM, DISABLED USE_STORE_DEFAULT, CUSTOM, DISABLED Response
Response for status 201
Show child attributes
Show child attributes