API reference · v1
Reseller API
Place orders from your own bot or website. Each order is paid from your balance at your reseller price
and delivered on its own. Check the order until it carries a gift_link, then pass that link to your customer.
- Base URL
https://decorly.lol/api/v1- Format
- JSON over HTTPS
- Authentication
- Bearer key, one per reseller account
- Retries
- Safe when you send a
reference
Authentication
Generate a key on your account page. Only reseller accounts can make one. The key is shown once, and generating a new key switches the old one off straight away.
Send the key in the Authorization header of every request. Treat it like a password:
anyone who has it can spend your balance.
Rate limits
Requests are limited per key. If you go over, the API answers 429 with retry_after,
the number of seconds to wait before trying again.
Authorization: Bearer dsr_your_key
Errors
Failed requests use normal HTTP status codes and always return the same JSON shape, with a short machine-readable
error code and a human-readable detail.
| HTTP | error | When |
|---|---|---|
| 400 | bad_sku, bad_reference | The input is in the wrong format |
| 401 | unauthorized | The key is missing or wrong, or the account is no longer a reseller |
| 402 | insufficient_balance | Not enough balance. The answer also includes balance_usd and price_usd |
| 404 | not_for_sale, not_found | Unknown SKU, or the order isn't yours |
| 429 | rate_limited | Too many requests. Wait retry_after seconds |
| 503 | closed | The shop is paused. Try again later |
{
"error": "<code>",
"detail": "<text>"
}
GET/api/v1/me
Your account
Returns your account, your current balance and your pricing plan. A good first call to check that your key works.
curl https://decorly.lol/api/v1/me \ -H "Authorization: Bearer dsr_your_key"
GET/api/v1/catalog
Catalogue
Every SKU in the shop, priced at your rate. Colour variants of the same item have their own SKU, so use the SKU of the exact variant you want to sell.
curl https://decorly.lol/api/v1/catalog \ -H "Authorization: Bearer dsr_your_key"
POST/api/v1/orders
Create an order
Buys one SKU and pays for it from your balance. The order starts as queued and is delivered on its own.
Body parameters
skustringRequired- The SKU to buy, from the catalogue. Colour variants have their own SKU.
referencestringRecommended- Your own ID for the order, 1–64 characters from
A-Z a-z 0-9 _ . - :. Sending the same reference again returns the first order with"duplicate": true, so you are never charged twice and retrying after a timeout is safe.
Returns
201 Created with the order object and a duplicate flag.
Errors you are most likely to meet here are 402 insufficient_balance and 404 not_for_sale.
curl -X POST https://decorly.lol/api/v1/orders \ -H "Authorization: Bearer dsr_your_key" \ -H "Content-Type: application/json" \ -d '{"sku": "1212569433839636530", "reference": "order-1001"}'
import requests
r = requests.post(
"https://decorly.lol/api/v1/orders",
headers={"Authorization": "Bearer dsr_your_key"},
json={"sku": "1212569433839636530", "reference": "order-1001"},
timeout=30,
)
order = r.json()["order"]
{
"order": {
"order_id": "ds_1793520000_1a2b3c4d",
"reference": "order-1001",
"sku": "1212569433839636530",
"name": "Cat Ears",
"color": "Yellow",
"price_usd": 1.95,
"status": "queued",
"queue_position": 2,
"eta_seconds": 140,
"gift_link": null,
"created_at": 1793520000000,
"delivered_at": null
},
"duplicate": false
}
GET/api/v1/orders/{order_id}
Retrieve an order
Returns one of your orders as an order object. Check it every 10–20 seconds until its
status is final. When it reaches delivered, gift_link is filled in.
Path parameters
order_idstringRequired- The
order_idyou got back when you created the order.
curl https://decorly.lol/api/v1/orders/ds_1793520000_1a2b3c4d \ -H "Authorization: Bearer dsr_your_key"
GET/api/v1/orders
List orders
Your orders, newest first, 50 to a page.
Query parameters
pageintegerOptional- Which page to return, starting at 1.
curl "https://decorly.lol/api/v1/orders?page=2" \ -H "Authorization: Bearer dsr_your_key"
The order object
Returned when you create, retrieve or list orders.
order_idstring- Our ID for the order. Quote it when you contact support.
referencestring- The reference you sent, if any.
skustring- The SKU that was bought.
name,colorstring- The item's name and, for a colour variant, its colour.
price_usdnumber- What the order cost you, in US dollars.
statusstring- Where the order is. See order status.
queue_position,eta_secondsnumber- While the order is queued: its place in line and roughly how many seconds are left.
gift_linkstring or null- The Discord gift link, once the order is delivered.
created_at,delivered_atnumber or null- Times in milliseconds since 1970 (UTC).
{
"order_id": "ds_1793520000_1a2b3c4d",
"reference": "order-1001",
"sku": "1212569433839636530",
"name": "Cat Ears",
"color": "Yellow",
"price_usd": 1.95,
"status": "delivered",
"queue_position": null,
"eta_seconds": null,
"gift_link": "https://discord.gift/AbCd1234EfGh5678",
"created_at": 1793520000000,
"delivered_at": 1793520168000
}
Order status
Keep checking an order while its status is queued or processing. Every other status is final.
| status | Meaning |
|---|---|
| queued | Paid and waiting its turn. See queue_position and eta_seconds. |
| processing | Being bought right now. |
| delivered | Done. gift_link is set. |
| delivered_test | The shop is in test mode, so nothing was bought. |
| refunded | It couldn't be bought. The price went back to your balance. |
| failed needs_review | Stuck. Contact support with the order_id. |
Full example
Create an order, then check it until it's done. Uses Python and requests.
Questions about the API? Contact support.
import time, requests BASE = "https://decorly.lol" H = {"Authorization": "Bearer dsr_your_key"} r = requests.post(f"{BASE}/api/v1/orders", headers=H, json={"sku": "1212569433839636530", "reference": "order-1001"}, timeout=30) r.raise_for_status() order = r.json()["order"] while order["status"] in ("queued", "processing"): time.sleep(15) order = requests.get(f"{BASE}/api/v1/orders/{order['order_id']}", headers=H, timeout=30).json()["order"] print(order["status"], order["gift_link"])