Products API
Create, retrieve, update, and delete products in your store
Products API
Manage your product catalog with the Products API. Create new products, update existing ones, and manage stock.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/products | List all products |
POST | /v1/products | Create a new product |
GET | /v1/products/:id | Get a single product |
PATCH | /v1/products/:id | Update a product |
DELETE | /v1/products/:id | Delete a product |
GET | /v1/products/:id/stock | List stock items |
POST | /v1/products/:id/stock | Add stock items |
DELETE | /v1/products/:id/stock | Remove stock items |
GET | /v1/products/:id/stock/:stockId | Get a stock item |
PATCH | /v1/products/:id/stock/:stockId | Update a stock item |
DELETE | /v1/products/:id/stock/:stockId | Delete a stock item |
GET | /v1/products/:id/variants | List product variants |
POST | /v1/products/:id/variants | Create a variant |
GET | /v1/products/:id/variants/:variantId | Get a variant |
PATCH | /v1/products/:id/variants/:variantId | Update a variant |
DELETE | /v1/products/:id/variants/:variantId | Delete a variant |
List Products
Retrieve a paginated list of all products in your store.
GET /v1/productsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 25, max: 100) |
group_id | string | Filter by product group ID |
Example Request
curl -X GET "https://api.sellgate.cc/v1/products?limit=10" \
-H "Authorization: Bearer sg_live_your_api_key"const response = await fetch('https://api.sellgate.cc/v1/products?limit=10', {
headers: { 'Authorization': 'Bearer sg_live_your_api_key' }
});
const data = await response.json();import requests
response = requests.get(
'https://api.sellgate.cc/v1/products',
params={'limit': 10},
headers={'Authorization': 'Bearer sg_live_your_api_key'}
)
data = response.json()Response
{
"data": [
{
"id": "prod_abc123",
"name": "Premium License",
"description": "Lifetime access to premium features",
"price": 29.99,
"currency": "USD",
"delivery_type": "serials",
"is_on_hold": false,
"payment_methods": ["crypto_btc", "crypto_ltc", "crypto_eth", "crypto_sol"],
"images": [],
"stock": 150,
"views_count": 1234,
"sales_count": 89,
"stripe_enabled": false,
"paypal_enabled": false,
"bulk_discounts_enabled": false,
"created_at": "2025-12-29T10:30:00Z",
"updated_at": "2025-12-29T10:30:00Z"
}
],
"meta": {
"total": 45,
"limit": 25,
"offset": 0
}
}Create Product
Create a new product in your store.
POST /v1/productsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Product name |
description | string | No | Product description |
price | number | Yes | Product price (must be >= 0) |
currency | string | No | Currency code (default: "USD") |
delivery_type | string | No | serials, file, dynamic, service (default: "serials") |
delivery_note | string | No | Note shown after purchase |
delivery_content | string | No | Static delivery content |
webhook_url | string | No | URL for order webhooks |
manual_stock | integer | No | Manual stock count (-1 for unlimited) |
images | array | No | Array of image URLs |
payment_methods | array | No | Payment methods (default: crypto_btc, crypto_ltc, crypto_eth, crypto_sol) |
is_on_hold | boolean | No | Whether product is on hold |
stripe_enabled | boolean | No | Enable Stripe payments |
paypal_enabled | boolean | No | Enable PayPal payments |
Example Request
curl -X POST "https://api.sellgate.cc/v1/products" \
-H "Authorization: Bearer sg_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium License",
"description": "Lifetime access to premium features",
"price": 29.99,
"delivery_type": "serials"
}'const response = await fetch('https://api.sellgate.cc/v1/products', {
method: 'POST',
headers: {
'Authorization': 'Bearer sg_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Premium License',
description: 'Lifetime access to premium features',
price: 29.99,
delivery_type: 'serials'
})
});
const data = await response.json();Response (201 Created)
{
"data": {
"id": "prod_abc123",
"name": "Premium License",
"description": "Lifetime access to premium features",
"price": 29.99,
"currency": "USD",
"delivery_type": "serials",
"is_on_hold": false,
"payment_methods": ["crypto_btc", "crypto_ltc", "crypto_eth", "crypto_sol"],
"images": [],
"created_at": "2025-12-29T10:30:00Z",
"updated_at": "2025-12-29T10:30:00Z"
}
}Get Product
Retrieve a single product by ID.
GET /v1/products/:idUpdate Product
Update an existing product. All fields are optional.
PATCH /v1/products/:idExample
curl -X PATCH "https://api.sellgate.cc/v1/products/prod_abc123" \
-H "Authorization: Bearer sg_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "price": 39.99 }'Delete Product
Permanently delete a product.
DELETE /v1/products/:idThis action cannot be undone. All associated stock items will also be deleted.
Product Stock
Product Variants
Manage product variants (e.g., different tiers, sizes, or options).
Delivery Types
| Type | Description |
|---|---|
serials | Stock-based delivery (license keys, codes, etc.) |
file | File download |
dynamic | Webhook-based delivery |
service | Manual service delivery |