# Decos Reseller API > Decos sells official Discord Shop items (avatar decorations, nameplates, profile effects, frames and bundles) at reseller prices, delivered as redeemable discord.gift links. This API lets a reseller price items, place orders charged to a prepaid account balance, and poll for the delivered gift links. JSON over HTTPS. Base URL: https://decos.gift ## Overview - Base URL: `https://decos.gift` - All endpoints are under `/api/v1` and return JSON. - Authentication: send the header `X-API-Key: deco_...` on every request. The key comes with a reseller plan or the API-only plan; get and rotate it in the dashboard at `https://decos.gift/account`. - Billing: orders are charged to your prepaid account balance (EUR). There is no per-call crypto invoice. Top up the balance on the website. - Prices move: your rate is set in USD and converted to EUR at the current exchange rate, so a price can change between one day and the next. Read it from `/api/v1/quote`, `/api/v1/catalog` or `/api/v1/product` rather than hardcoding it. An order is charged at the price in force when the order is placed. - Pricing: resellers are charged their reseller rate automatically. - Input format for items: the `links` field is a string of one or more items separated by newlines (`\n`). Each line may be a full Discord shop URL (e.g. `https://discord.com/shop#itemSkuId=1207048049571139584`) or a bare numeric SKU id (e.g. `1207048049571139584`). Both forms work and may be mixed. ## Authentication Every request must include: ``` X-API-Key: deco_xxxxxxxxxxxxxxxxxxxxxxxx ``` - Missing/invalid key -> 401 `{"err": "invalid api key"}`. - Valid key but no active plan (planless or expired) -> 403 `{"err": "API access requires a plan"}`. Treat the key as a secret: it can spend your balance. Keep it server-side. ## Endpoint: Quote (price items, no charge) `POST https://decos.gift/api/v1/quote` Request JSON body: - `links` (string, required): items to price, newline-separated SKU ids or shop URLs. Response 200: - `items` (array): each `{ "sku": string, "name": string, "price": number }` — price is your reseller rate in EUR. - `total` (number): sum of item prices in EUR. - `errors` (array): links that could not be priced (unknown or blacklisted SKU). Example: ``` curl -X POST https://decos.gift/api/v1/quote \ -H "X-API-Key: deco_..." \ -H "Content-Type: application/json" \ -d '{"links": "1207048049571139584"}' ``` ``` { "items": [{ "sku": "1207048049571139584", "name": "Earth", "price": {EXPRICE} }], "total": {EXPRICE}, "errors": [] } ``` ## Endpoint: Create order (charge balance, queue gifts) `POST https://decos.gift/api/v1/order` Charges your balance and queues the gift(s). Returns immediately once the charge clears; fulfillment happens asynchronously in a single queue (~1 minute per item). Poll the status endpoint for the delivered codes. Request JSON body: - `links` (string, required): items to order, newline-separated SKU ids or shop URLs. Mix decorations, nameplates, effects and bundles freely. Response 200: - `order_id` (string): opaque order id (32 hex chars). Pass it to the status endpoint. - `total` (number): amount charged to your balance in EUR. - `status` (string): `paid` (queued). Error responses: - 400 `{"err": "no valid items", "errors": [...]}` — nothing priced; inspect `errors`. - 402 `{"err": "insufficient balance", "needed": }` — top up by at least `needed`. - 503 maintenance — buying paused; retry shortly. Example: ``` curl -X POST https://decos.gift/api/v1/order \ -H "X-API-Key: deco_..." \ -H "Content-Type: application/json" \ -d '{"links": "1207048049571139584\n1341506443693522944"}' ``` ``` { "order_id": "3f2a9c7b4e1d8a06f5b2c9d4e7a1b0c3", "total": 2.36, "status": "paid" } ``` ## Endpoint: Random items (price or order a random pick) `GET https://decos.gift/api/v1/random?n=1&basis=0` Returns `n` random items at your price — decorations, nameplates, profile effects and frames (never bundles), preferring ones already in stock (instant delivery). `basis` (optional) limits the pick to a single Discord price tier, e.g. `basis=4.99`. Response 200: - `items` (array): each `{ "sku", "name", "price", "kind", "image" }`. - `count` (number). To order random items in one call, `POST https://decos.gift/api/v1/order` with `{ "random": 5 }` (optionally `"basis": 4.99`) — charges your balance and queues 5 random items, same response as a normal order. ``` curl "https://decos.gift/api/v1/random?n=3&basis=4.99" -H "X-API-Key: deco_..." ``` ## Endpoint: Order status (poll, read codes) `GET https://decos.gift/api/v1/order/{order_id}` You can only read your own orders. Poll every ~2 seconds until `status` is a terminal value (`delivered`, `partial` or `failed`), then read `codes`. Response 200: - `id` (string): the order id. - `status` (string): see Order statuses. - `codes` (array of string): delivered discord.gift links. Empty until delivered. - `total` (number): amount charged in EUR. 404 `{"err": "not found"}` — unknown order id, or not one of yours. Example: ``` curl https://decos.gift/api/v1/order/3f2a9c7b4e1d8a06f5b2c9d4e7a1b0c3 \ -H "X-API-Key: deco_..." ``` ``` { "id": "3f2a9c7b4e1d8a06f5b2c9d4e7a1b0c3", "status": "delivered", "codes": ["https://discord.gift/xxxxxxxxxxxxxxxx"], "total": 2.36 } ``` ## Order statuses - `paid` — charged, waiting in the queue. - `processing` — being bought now (seconds each). - `delivered` — done; gift links are in `codes`. - `partial` — some items delivered, some failed; failed items are refunded to balance. - `failed` — could not buy; balance auto-refunded. Terminal statuses: `delivered`, `partial`, `failed`. Stop polling at any of these. ## Errors All errors return a non-2xx HTTP status and a JSON body `{"err": "..."}`. - 400 `no valid items` — none of the links priced. - 401 `invalid api key` — missing or wrong X-API-Key. - 403 `API access requires a plan` — key valid but plan inactive/expired. - 402 `insufficient balance` — shortfall in `needed` (EUR); top up. - 404 `not found` — unknown order id or not yours. - 429 `slow down` — rate limited; back off and retry. - 503 maintenance — buying paused; retry shortly. ## Rate limits Keep requests reasonable (a few per second). On 429, wait and retry. Orders fulfil one at a time through a single queue, so polling faster than ~1s per order does not speed up delivery. ## Full worked example (Python) ```python import time, requests API = "https://decos.gift" H = {"X-API-Key": "deco_xxxxxxxxxxxxxxxxxxxxxxxx"} # optional: price first q = requests.post(f"{API}/api/v1/quote", headers=H, json={"links": "1207048049571139584"}).json() # order oid = requests.post(f"{API}/api/v1/order", headers=H, json={"links": "1207048049571139584"}).json()["order_id"] # poll until terminal while True: s = requests.get(f"{API}/api/v1/order/{oid}", headers=H).json() if s["status"] in ("delivered", "partial", "failed"): break time.sleep(2) print(s["codes"]) # list of discord.gift links to redeem ``` ## Notes - Gift links in `codes` are standard discord.gift links; the recipient redeems them on their own Discord account. They expire (claim within ~47 hours) and are single-use. - Decos never needs a Discord password or token; it only issues gift links. - Some bundles that cannot be gifted whole are automatically split into their individual items; ordering the bundle SKU delivers the individuals. - Support: Telegram @chamanog. Plans and pricing: https://decos.gift/reseller. Human docs: https://decos.gift/docs.