RESELLIO Reseller API
Sell our catalogue from your own website or Telegram bot.
One simple API: read products and your prices, place an order, and deliver the returned items to your buyer. Every example on this page matches the live API exactly.
Prepaid
Every order is paid from your reseller balance. No balance, no charge.
Safe
If a product cannot be delivered, the full amount returns to your balance automatically.
No duplicates
Send the same external_ref again and you get the same order back — never a second charge.
Quick start
Get an approved reseller account and API key from the reseller portal. Then follow these four steps. Every request is authenticated.
- 1
Authenticate
Authorization: Bearer … - 2
Read products
GET /products - 3
Create order
POST /orders - 4
Deliver
senditemsto your buyer
external_ref, or check GET /orders.Test your setup (no charge)
Run these in order. None of them spends balance.
| Request | Expected result |
|---|---|
GET /me | 200 with your name and balance — your key works |
GET /me without a key | 401 Missing API key |
GET /products | 200 with count and products |
POST /orders with body {} | 400 product_id is required |
GET /orders/test-123 | 404 Order not found |
If all five match, your integration is wired correctly. Your first real order will spend balance.
Setting up with an AI assistant
Paste this into ChatGPT, Claude, Cursor or any AI coding tool to build your integration:
Build a reseller integration for the RESELLIO Reseller API.
Docs: https://resellio.store/reseller/docs
Base URL: https://resellio.store/api/public/reseller/v1
Auth header: Authorization: Bearer <API_KEY> (keep the key on the server only)
Endpoints: GET /me, GET /products, GET /products/{id}, POST /orders, GET /orders/{id}, GET /orders, GET /transactions
Rules:
- Every response has "ok": true/false; on false show "error".
- POST /orders body: product_id (string), qty (1-50), customer_inputs (object with the exact keys from the product's customer_input_fields, when not empty). Send a unique Idempotency-Key header.
- On timeout retry with the SAME Idempotency-Key, or check GET /orders/by-idempotency/{key}; never use a new key to recover.
- If order.status is "pending", poll GET /orders/{id} every 5-10s until "completed" or "failed".
- Deliver every string in order.items to the buyer.
- On 409 show the buyer "Product temporarily unavailable"; do not retry automatically.
- Do not use redirect: "error" in fetch.Base URL
All endpoints live under this address. Copy it exactly:
https://resellio.store/api/public/reseller/v1| Wrong | Why it fails |
|---|---|
https://www.resellio.store/api/public/reseller/v1 | www causes a redirect |
https://resellio.store/api/public/reseller | missing /v1 → 404 |
https://resellio.store/v1 | wrong path → JSON 404 “Unknown endpoint” |
redirect: "error", which our hosting refuses. Use redirect: "manual" or remove the option.Authentication
Send your key on every request using either header:
Authorization: Bearer YOUR_API_KEY
X-API-Key: YOUR_API_KEY- Your key is linked to your reseller account and balance. The shop can disable it at any time.
- Keep it secret: use it only on your server or bot backend, never in browser JavaScript or a public repo.
- A missing or wrong key returns
401. A disabled account returns403.
Conventions & data types
JSON and money
- Every response is JSON with
"ok": trueon success or"ok": false, "error": "…"on failure. - Money is a number in USD, e.g.
4.25. Unit prices can have up to 4 decimals (e.g.0.025); totals are rounded to cents. - IDs are UUID strings. Timestamps are ISO-8601 in UTC, e.g.
2026-11-27T07:52:10Z.
Quantity and stock
quantityis a whole number from 1 to 50 per order. Anything else (0, 51, 2.5, "abc") is rejected with400and nothing is charged.stockis the sellable count right now;in_stocktells you if the product can be ordered.priceis your price after your reseller discount — that is what your balance pays.
Channels
Add ?channel=website (default) or ?channel=bot to say where you sell. The shop enables each channel per account; a disabled channel returns 403.
All endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /me | Your account and balance |
| GET | /products | Product list with your prices and stock |
| GET | /products/{id} | One product (refresh before checkout) |
| POST | /orders | Place an order and receive items |
| GET | /orders/{id} | One order — poll pending orders here |
| GET | /orders/by-idempotency/{key} | Recover an order by your key |
| GET | /orders | Your order history, newest first |
| GET | / (base URL) | Public health check — no key needed |
| GET | /transactions | Balance history (top-ups, orders, refunds) |
/meAccount and balance
Use this to test your key and show your current balance.
curl https://resellio.store/api/public/reseller/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"{
"ok": true,
"reseller": {
"id": "…",
"name": "My Shop",
"balance": 100.0,
"balance_cents": 10000,
"currency": "USD",
"discount_percent": 5,
"channels": { "website": true, "bot": true }
}
}/productsProduct list
Returns every product you can sell right now, with your price and live stock.
| Query parameter | Required | Meaning |
|---|---|---|
channel | no | website (default) or bot |
search | no | filter by product name |
category_id | no | only one category |
curl "https://resellio.store/api/public/reseller/v1/products?channel=bot" \
-H "Authorization: Bearer YOUR_API_KEY"{
"ok": true,
"channel": "website",
"count": 1,
"categories": [{ "id": "c1a2…", "name": "AI Tools" }],
"products": [{
"id": "8f2c1e4a-…",
"name": "ChatGPT Plus 1 Month",
"description": "…",
"category_id": "c1a2…",
"category_name": "AI Tools",
"price": 4.25,
"retail_price": 6.5,
"currency": "USD",
"delivery_type": "auto",
"instant": true,
"stock": 37,
"in_stock": true
}]
}| Product field | Meaning |
|---|---|
price | your unit price (what your balance pays) |
retail_price | normal shop price — a good reference for your own selling price |
custom_price / custom_min_qty | special price for you that applies when quantity ≥ custom_min_qty (null if none) |
stock / in_stock | sellable count now / can it be ordered |
delivery_type / instant | auto = delivered in the response; manual = delivered later (poll) |
quick_guide / important_note | instructions to show your buyer |
delivery_time, badge, image_url, emoji | display helpers (may be null) |
flash_sale_ends_at / old_price | flash sale end time and crossed-out price (may be null) |
min_qty / max_qty / units_per_item | allowed quantity per order (1–50) and units per item (1) |
stock_known / stock_unlimited | true when the count is exact / when the product has no stock limit |
own | true for products you upload yourself (price 0) |
id (update existing rows, add new ones, hide missing ones). Names and prices can change./products/{id}One product
Same fields as one item from the list, wrapped in product. Call it right before checkout to confirm the price and stock. Returns 404 if the product is unavailable or out of stock.
curl https://resellio.store/api/public/reseller/v1/products/PRODUCT_ID \
-H "Authorization: Bearer YOUR_API_KEY"{ "ok": true, "product": { "id": "8f2c1e4a-…", "name": "…", "price": 4.25, "stock": 37, "in_stock": true, … } }/ordersPlace an order
Charges your balance and returns the delivered items in the same response for instant products.
| Body field | Required | Meaning |
|---|---|---|
product_id | yes | product id from /products |
quantity | no | 1–50, default 1 (qty also accepted) |
external_ref | recommended | your own unique order id (max 120 chars) — prevents duplicates. Same as the Idempotency-Key header or idempotency_key field |
customer_email | only if needed | buyer email for products that need it (see below) |
customer_name | no | buyer name for your records (max 80 chars) |
channel | no | website (default) or bot |
curl -X POST https://resellio.store/api/public/reseller/v1/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: mybot-20261127-0001" \
-H "Content-Type: application/json" \
-d '{"product_id":"PRODUCT_ID","qty":2}'{
"ok": true,
"order": {
"id": "5b0e…",
"order_no": 10432,
"external_ref": "mybot-20261127-0001",
"product_id": "8f2c1e4a-…",
"product_name": "ChatGPT Plus 1 Month",
"quantity": 2,
"unit_price": 4.25,
"total": 8.5,
"status": "completed",
"delivery_type": "auto",
"items": ["email1@x.com:pass1", "email2@x.com:pass2"],
"idempotency_key": "mybot-20261127-0001",
"qty": 2,
"total_cents": 850,
"delivered_item_count": 2,
"created_at_unix": 1795765930,
"customer_name": null,
"customer_email": null,
"created_at": "2026-11-27T07:52:10.123Z"
},
"balance": 91.5
}201 = new order. 200 = the key was already used: you get the existing order back with "duplicate": true and nothing is charged again. A header key that differs from the body key returns 409 idempotency_mismatch. If the order is still being delivered you get "status": "pending" and "submitted": true — poll GET /orders/{id}.
/orders/{id}One order
The id can be the order id, the order_no or your own external_ref — handy to recover a lost response. Returns the same order object. Poll every 5–10 seconds while status is pending.
curl https://resellio.store/api/public/reseller/v1/orders/ORDER_ID \
-H "Authorization: Bearer YOUR_API_KEY"/orders/by-idempotency/{key}Find an order by your key
Read-only recovery when a response was lost. Returns the order created with that Idempotency-Key / external_ref, or 404 if none exists — then it is safe to order again.
curl https://resellio.store/api/public/reseller/v1/orders/by-idempotency/mybot-20261127-0001 \
-H "Authorization: Bearer YOUR_API_KEY"/ordersOrder history
Newest first. ?limit= 1–100 (default 50), ?offset= to page (default 0). Stop when a page is shorter than the limit.
curl "https://resellio.store/api/public/reseller/v1/orders?limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"{ "ok": true, "orders": [ { "id": "…", "status": "completed", … } ] }/transactionsBalance history
Your latest 100 balance movements.
{
"ok": true,
"balance": 91.5,
"transactions": [
{ "id": "…", "type": "order", "amount": -8.5, "balance_after": 91.5,
"reference": "…", "note": "Order #10432", "created_at": "…" }
]
}Order statuses
| status | Meaning | What you do |
|---|---|---|
completed | Delivered. items holds everything. | Send items to your buyer. |
pending | Paid, delivery in progress (manual products or a short delay). | Poll GET /orders/{id}. Do not order again. |
failed | Could not deliver. With refunded: true the full amount is back in your balance. | Refund or offer another product to your buyer. |
items are delivered. Pending means paid but not delivered yet.Products that need buyer info
Some products are delivered to a buyer account — for example an invite sent to an email address. Each product lists exactly what it needs in customer_input_fields. An empty list means nothing is needed.
- 1
Discover
customer_input_fields - 2
Ask your buyer
build your form from the fields - 3
Submit order
customer_inputs - 4
Poll result
GET /orders/{id}
{
"id": "8f2c…",
"name": "Canva Edu Slot",
"delivery_type": "manual",
"min_qty": 1, "max_qty": 50,
"customer_input_configuration_valid": true,
"customer_input_fields": [
{ "key": "canva_email", "label": "Canva account email", "type": "email", "required": true }
]
}curl -X POST https://resellio.store/api/public/reseller/v1/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: invite-0001" \
-H "Content-Type: application/json" \
-d '{"product_id":"PRODUCT_ID","qty":1,"customer_inputs":{"canva_email":"buyer@example.com"}}'| type | Rule |
|---|---|
| valid email, max 254 characters | |
| username | 3–32 letters, digits, _ or . — a leading @ is removed |
| phone | 7–15 digits, optional leading +; spaces are removed |
| text | max 200 characters, no control characters |
- Use the exact
keyvalues. Unknown keys, numbers or arrays are rejected with400 invalid_customer_inputsbefore any charge. - Products with one email field also accept
{"email": "…"}or a top-levelcustomer_email. - If
customer_input_configuration_validis false, the product cannot be ordered right now — contact support. - The order returns
pending, then becomescompletedwith a confirmation initems, orfailedwith an automatic refund.
No duplicate orders
Give every order your own unique external_ref (for example your order number). If you send the same external_ref again, the API returns the existing order and does not charge again.
- Network timeout? Retry with the same
external_ref. - New buyer purchase? Use a new
external_ref. - Never retry in a loop with new references — that creates new paid orders.
Delivering to your buyer
- Refresh the product with
GET /products/{id}and checkin_stock. - Call
POST /orders; storeorder.idand eachitems[]entry. - If
statusispending, poll until it iscompletedorfailed. - Send every entry of
itemsto your buyer. Show them the product's instructions (quick_guide/important_note).
Error reference
Errors always look like {"ok": false, "error": "…"}, sometimes with a code.
| HTTP | error / code | Meaning | Charged? |
|---|---|---|---|
| 400 | product_id is required / Invalid JSON body / quantity … | Request is malformed | No |
| 400 | invalid_customer_inputs | Buyer info missing or invalid | No |
| 409 | idempotency_mismatch | Header and body keys differ | No |
| 401 | Missing API key / Invalid API key | Check your key and header | No |
| 402 | Insufficient balance | Top up; response includes balance and required | No |
| 403 | …access is disabled | Account or channel disabled | No |
| 404 | Product not found | Inactive or unknown product | No |
| 409 | out_of_stock — Product temporarily unavailable | No stock right now | No |
| 409 | delivery_failed — Product temporarily unavailable | Could not deliver | Refunded automatically |
| 503 | … temporarily unavailable | Try again shortly; check /orders before re-ordering | Check order |
Best practices
- Keep the API key on your server only.
- Always send
external_ref. - Cache the product list for 30–60 seconds; refresh one product before checkout.
- Poll pending orders every 5–10 seconds, not faster.
- Show “temporarily unavailable” to buyers when you get 409 — never retry automatically.
- Watch your balance with
GET /meand top up before it runs out.
Code examples
const BASE = "https://resellio.store/api/public/reseller/v1";
const KEY = process.env.RESELLIO_API_KEY;
async function api(path, init = {}) {
const res = await fetch(BASE + path, {
...init,
redirect: "manual",
headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
});
const data = await res.json();
if (!data.ok) throw new Error(data.error);
return data;
}
const { products } = await api("/products");
const { order } = await api("/orders", {
method: "POST",
body: JSON.stringify({ product_id: products[0].id, quantity: 1, external_ref: "my-order-1" }),
});
console.log(order.status, order.items);Instructions & Terms
- All products are sold as RESELLIO products. Resell them under your own brand at your own price.
- Balance is prepaid and used only for orders. Failed deliveries are refunded to balance automatically.
- Pass the product instructions to your buyer; warranty follows the product description.
- Do not share your API key. Abuse or chargebacks can disable the account.
FAQ
Where do I get an API key?
Apply in the reseller portal. After approval the key is in your Reseller Dashboard.
How do I add balance?
Top up from the Reseller Dashboard or with a deposit in the Telegram bot — it is the same balance.
The order said pending. Was I charged?
Yes, the order is paid. Poll GET /orders/{id}; if it fails you are refunded automatically.
I got “Product temporarily unavailable”.
That product cannot be sold right now. You were not charged (or were refunded). Try later or choose another product.
Why do I get 404 on every request?
Check the base URL: no www, keep /v1, no trailing slash.
Changelog
- v1.3 — Per-product buyer fields (
customer_input_fields/customer_inputs), Idempotency-Key header,qtyalias, order lookup by key,offsetpaging,*_centsmoney fields, quantity rules on products and a public health check. Older fields keep working. - v1.2 — Buyer email accepted as
customer_inputs.email; unavailable deliveries now return “Product temporarily unavailable”. New step-by-step docs. - v1.1 — Unit prices with up to 4 decimals.
- v1.0 — Products, orders, balance and transactions.
Support
Questions or a stuck order? Contact RESELLIO support from the Telegram bot and include your order.id or external_ref.
