logoSellhub
Products
background
Sellhub Docs
Sellhub Docs
Create New Product
POST
/products

Authorization

Authorization<token>

In: header

Request Body

application/jsonRequired

Request body for creating/updating a product

nameRequiredstring

Product name

Minimum length: 1Maximum length: 255
hiddenboolean
Default: false
isFeaturedboolean
Default: false
capStockboolean
Default: false
payWhatYouWantEnabledboolean
Default: false
liveStatsboolean
Default: false
liveStatsDurationRequiredobject
variantsRequiredobject

A record where each key is a UUID (string) and each value is a Variant object.

descriptionRequiredstring

Full product description

shortDescriptionRequiredstring

Short product description

Maximum length: 255
displayedStatusRequiredstring

Displayed status (e.g., "In Stock")

Maximum length: 255
imagesRequiredarray<string>
Default: []
imageAspectRatioRequirednumber

Must be a positive number.

Default: 1Minimum: 0
urlRequiredstring

Product URL slug

Minimum length: 1
metadataRequiredobject
upsoldProductsRequiredarray<string>
Default: []
curl -X POST "https://dash.sellhub.cx/api/sellhub/products" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium Software License",
    "hidden": false,
    "isFeatured": false,
    "capStock": false,
    "payWhatYouWantEnabled": false,
    "liveStats": false,
    "liveStatsDuration": {
      "unit": "days",
      "duration": 7
    },
    "variants": {
      "property1": {
        "hidden": false,
        "enabled": true,
        "disabledMessage": "",
        "name": "Standard Licenses",
        "price": 99.99,
        "disabledPaymentMethods": [],
        "paymentMethodPriceOverrides": {
          "stripe": 1,
          "square": 1,
          "paypal": 1,
          "cardToCrypto": 1,
          "paypalIPN": 1,
          "cashapp": 1,
          "cryptoCurrency": 1,
          "customerBalance": 1,
          "sumup": 1,
          "cryptomus": 1
        },
        "priceSlash": 79.99,
        "description": "This is a standard license for premium software.",
        "shortDescription": "Standard License",
        "stockVisible": false,
        "baseWarranty": false,
        "baseWarrantyDuration": {
          "unit": "days",
          "duration": 30
        },
        "delivery": {
          "method": "automatic",
          "allowDuplicatedKeys": true,
          "note": "Delivered automatically via email.",
          "serialKeys": [
            {
              "key": "string"
            }
          ],
          "files": [
            {
              "name": "installer.exe",
              "id": "fbed2096-f4f4-4073-aec1-fe6cc965be44",
              "size": 2048,
              "type": "application/exe",
              "url": "https://example.com/installer.exe"
            }
          ],
          "serviceType": "activationKey",
          "deliveryTime": "instant",
          "unlimitedStock": false
        },
        "currency": "usd",
        "itemCost": 99.99,
        "minOrderQuantity": 1,
        "maxOrderQuantity": 10,
        "minOrderTotal": 0,
        "maxOrderTotal": 999,
        "bulkDiscounts": [
          {
            "order": 1,
            "minQuantity": 5,
            "discountPercent": 10
          }
        ],
        "allowBulkDiscountsWithCoupons": false,
        "discordIntegration": "optional",
        "tabs": {
          "property1": {
            "name": "Overview",
            "content": "This is the overview of the standard license.",
            "order": 0
          },
          "property2": {
            "name": "Overview",
            "content": "This is the overview of the standard license.",
            "order": 0
          }
        },
        "customFields": [
          {
            "name": "License Key",
            "defaultValue": "N/A",
            "type": "text",
            "mandatory": true
          }
        ],
        "discordServers": [
          {
            "serverId": "876543210987654321",
            "rolesToAddOnPurchase": [
              "role1",
              "role2"
            ]
          }
        ],
        "redirectToUrl": "https://example.com/thank-you"
      },
      "property2": {
        "hidden": false,
        "enabled": true,
        "disabledMessage": "",
        "name": "Standard Licenses",
        "price": 99.99,
        "disabledPaymentMethods": [],
        "paymentMethodPriceOverrides": {
          "stripe": 1,
          "square": 1,
          "paypal": 1,
          "cardToCrypto": 1,
          "paypalIPN": 1,
          "cashapp": 1,
          "cryptoCurrency": 1,
          "customerBalance": 1,
          "sumup": 1,
          "cryptomus": 1
        },
        "priceSlash": 79.99,
        "description": "This is a standard license for premium software.",
        "shortDescription": "Standard License",
        "stockVisible": false,
        "baseWarranty": false,
        "baseWarrantyDuration": {
          "unit": "days",
          "duration": 30
        },
        "delivery": {
          "method": "automatic",
          "allowDuplicatedKeys": true,
          "note": "Delivered automatically via email.",
          "serialKeys": [
            {
              "key": "string"
            }
          ],
          "files": [
            {
              "name": "installer.exe",
              "id": "fbed2096-f4f4-4073-aec1-fe6cc965be44",
              "size": 2048,
              "type": "application/exe",
              "url": "https://example.com/installer.exe"
            }
          ],
          "serviceType": "activationKey",
          "deliveryTime": "instant",
          "unlimitedStock": false
        },
        "currency": "usd",
        "itemCost": 99.99,
        "minOrderQuantity": 1,
        "maxOrderQuantity": 10,
        "minOrderTotal": 0,
        "maxOrderTotal": 999,
        "bulkDiscounts": [
          {
            "order": 1,
            "minQuantity": 5,
            "discountPercent": 10
          }
        ],
        "allowBulkDiscountsWithCoupons": false,
        "discordIntegration": "optional",
        "tabs": {
          "property1": {
            "name": "Overview",
            "content": "This is the overview of the standard license.",
            "order": 0
          },
          "property2": {
            "name": "Overview",
            "content": "This is the overview of the standard license.",
            "order": 0
          }
        },
        "customFields": [
          {
            "name": "License Key",
            "defaultValue": "N/A",
            "type": "text",
            "mandatory": true
          }
        ],
        "discordServers": [
          {
            "serverId": "876543210987654321",
            "rolesToAddOnPurchase": [
              "role1",
              "role2"
            ]
          }
        ],
        "redirectToUrl": "https://example.com/thank-you"
      }
    },
    "description": "Full product description for Premium Software License.",
    "shortDescription": "Short description of the product.",
    "displayedStatus": "In Stock",
    "images": [
      "https://example.com/image1.jpg",
      "https://example.com/image2.jpg"
    ],
    "imageAspectRatio": 1,
    "url": "premium-product",
    "metadata": {
      "title": "Premium Software License",
      "description": "Buy the premium software license and enjoy advanced features.",
      "image": "https://example.com/meta-image.jpg"
    },
    "upsoldProducts": []
  }'

Product creation success

{
  "message": "Product saved successfully",
  "productId": "prod_123xyz"
}