Reseller API
Browse products, check stock and balance, and place orders against your own Blaze OTT Shop wallet โ from your own bot, site, or script.
http://api.blazecloud.host
Quick Start
Get your key from Settings โ Reseller API inside the bot, then:
curl http://api.blazecloud.host/api/balance \
-H "Authorization: Bearer blaze_sk_..."
Authentication
Every request needs your key, sent using any ONE of these three methods:
Authorization: Bearer blaze_sk_...x-api-key: blaze_sk_...?api_key=blaze_sk_...Endpoints
/api/productsLists every active product visible to your key (a reseller key with restricted categories only sees those). Includes live stock and your effective price, discount already applied.
Request
curl http://api.blazecloud.host/api/products \
-H "Authorization: Bearer YOUR_KEY"
Response 200
[
{
"id": 12,
"name": "Example Product",
"description": "...",
"category": "General",
"price": 4.99,
"stock": 37,
"min_buy_qty": 1
}
]
/api/product/{id}A single product by id. 404 if it doesn't exist, is inactive, or falls outside your key's allowed categories.
curl http://api.blazecloud.host/api/product/12 \
-H "Authorization: Bearer YOUR_KEY"
/api/categoriesEvery category name with at least one active product, filtered to your key's allowed categories if restricted.
curl http://api.blazecloud.host/api/categories \
-H "Authorization: Bearer YOUR_KEY"
/api/balanceYour current wallet balance โ the same balance orders through this API are deducted from.
Request
curl http://api.blazecloud.host/api/balance \
-H "Authorization: Bearer YOUR_KEY"
Response 200
{
"balance": 42.5,
"currency": "USD"
}
/api/profileBasic account info for the key's owner.
curl http://api.blazecloud.host/api/profile \
-H "Authorization: Bearer YOUR_KEY"
/api/orders?limit=20Your most recent orders (any source โ bot or this API), newest first. limit is optional, 1โ100, default 20.
curl "http://api.blazecloud.host/api/orders?limit=10" \
-H "Authorization: Bearer YOUR_KEY"
/api/orderPlaces and immediately delivers an order, paid from your wallet balance โ the only payment method this endpoint supports. Fails with 402 if your balance is too low, 404/409 if the product/stock can't fulfill it.
Request
curl -X POST http://api.blazecloud.host/api/order \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_id": 12,
"quantity": 1,
"request_id": "my-order-001"
}'
Response 200
{
"order_id": 5821,
"product_id": 12,
"quantity": 1,
"total": 4.99,
"status": "delivered",
"items": [
{ "kind": "text", "content": "..." }
]
}
request_id is optional but recommended โ a safe retry key. Reusing it after a completed order replays the exact same response instead of placing (and charging for) a second one.
Errors & rate limits
Every error is JSON: { "error": "..." }. Non-2xx status always means exactly one of these:
| Status | Meaning |
|---|---|
| 400 | Malformed request โ a required field is missing or the wrong type. |
| 401 | Missing, invalid, revoked, or expired API key. |
| 402 | Insufficient wallet balance for this order. |
| 403 | Your key doesn't have access to that product's category. |
| 404 | Product (or order) not found. |
| 409 | Not enough stock, or a request_id conflict (see above). |
| 429 | Rate limit exceeded for this key. |
| 500 | Something went wrong on our end โ safe to retry. |
Each key has its own configurable requests/minute limit (see it in the bot's Reseller API panel). In addition, all keys belonging to one account share an aggregate ceiling, and authenticated traffic from one IP has a safety ceiling. Exceeding any limit returns 429 until the next window.