Bond Store
EN · USD
Theme
Sign in

API

Overview

Base URL
https://dasqin.bond/api/v1

Responses are JSON, except the file download GET /orders/ID/file (it returns the file itself; its errors are JSON). Prices are USD strings (e.g. "1.50"). Create your key in Account or in the Telegram bot (Profile → API). The key is shown only once.

Authentication: send the key in a header (never in the URL):

Authorization: Bearer dsk_xxxxxxxx
# or
X-API-Key: dsk_xxxxxxxx

Timestamps (created_at, last_used) are Unix time in seconds (UTC). Money values are USD strings. Endpoints that support pagination accept page and limit (max 200). Response fields and default behavior are described in the section of each endpoint.

Sandbox (test mode)

Test your integration without spending real money or creating real orders. The sandbox has the same endpoints, request and response formats, error codes and rate limits as the real API. Use the same API key and only change the base URL.

Sandbox base URL
https://dasqin.bond/api/sandbox/v1

Nothing real happens here: your real balance is not touched, no real orders are created, stock is not used up, and no real products are delivered. Delivered items are fake, for example sandbox-user-1:sandbox-pass-1.

How it works

  • Your sandbox account starts with a virtual balance of $100.00. Purchases lower it and POST /reset restores it.
  • Products, prices, tiers, limits and stock come from the real catalog, so real product_id values work. Stock is checked but never used up.
  • Orders, request_id protection and replays behave like the real API (Idempotent-Replay: true, idempotency_mismatch).
  • Sandbox data is temporary: only the latest 200 orders are kept, and everything is deleted after 24 hours without requests or when the server restarts.
  • Sandbox requests have their own rate-limit counters and never count against your real limits. One purchase is limited to 1000 items.
  • Every sandbox response has the header X-Sandbox: true and the field "sandbox": true, so test data is never mistaken for real data.

Simulating results

Add the header X-Sandbox-Scenario: name to POST /buy to force a result. Without it the purchase succeeds, or fails naturally (for example when the virtual balance is too low).

curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -H "X-Sandbox-Scenario: pending" \
  -d '{"product_id": 7, "qty": 1, "request_id": "test-1"}' \
  https://dasqin.bond/api/sandbox/v1/buy
pending409 → 200
First response is 409 in_progress. The same request_id returns 200 after about 6 seconds. Tests your retry loop.
review202
202 review. The order stays in review and its amount stays on hold.
partial200
200 with only half of the items delivered (rounded down); you pay only for those. Needs qty of 2 or more.
balance402
402 balance with need and have.
stock409
409 stock with left: 0.
limit409
409 limit: per-user limit reached.
provider502
502 provider. The order is refunded; the same request_id then returns 409 refunded.
maintenance503
503 maintenance.
busy503
503 busy with Retry-After.
unavailable503
503 unavailable with Retry-After.
internal500
500 internal. Retry with the same request_id; you are never charged twice.
gate_fsub403
403 gate_fsub: subscription required in the Telegram bot.
gate_verify403
403 gate_verify: verification required in the Telegram bot.

POST /reset deletes all your sandbox orders and restores the virtual balance. The response contains the new balance and orders_deleted.

curl -X POST -H "Authorization: Bearer $KEY" https://dasqin.bond/api/sandbox/v1/reset

When your tests pass, switch the base URL from /api/sandbox/v1 to /api/v1. Nothing else changes.

Try it

Sandbox · no real money

Send requests to the sandbox right from this page. Your key is sent only to the sandbox URL and is kept only in this browser tab.

Request
cURL

  
Response
The response will appear here

OpenAPI Specification

A machine-readable description of the whole API (OpenAPI 3.0): every endpoint, parameter, response field and error code. Import it into Postman, Insomnia or Swagger UI, or give it to a code generator, instead of typing requests by hand.

Specification link
https://dasqin.bond/api/v1/openapi.jsonOpen
Sandbox specification link (sandbox server only)
https://dasqin.bond/api/sandbox/v1/openapi.jsonOpen

How to use it

  • Postman: Import → Link → paste the link above → Continue.
  • Insomnia: Create → Import → From URL, then paste the link.
  • Swagger UI / Swagger Editor: paste the link into the “Explore” field (in the Editor: File → Import URL).
  • Code generators (openapi-generator, swagger-codegen and others): pass the link as the input specification. Example for a Python client:
npx @openapitools/openapi-generator-cli generate \
  -i https://dasqin.bond/api/v1/openapi.json \
  -g python -o ./client

The specification itself is public and needs no key. To send real requests from these tools, enter your API key once: as a Bearer token or in the X-API-Key header (the tools show an “Authorize” or “Auth” field for it).

The lang parameter (optional)

?lang= is not required, nobody has to add it. It only picks the language of the explanations inside the specification: summaries, descriptions of parameters and fields, error texts. Without it, the language of the site is used (your account or cookie), otherwise the shop default.

Paths, operationId, field names, enum values and status codes are never translated, so generated client code is identical in every language. Just pick the language you read most comfortably.

Use the language list next to the link: the link updates by itself. Leave “Auto” if you do not care about the language.

Do not confuse it with ?lang= on API requests (/products, /orders, /stats, /buy): there it is a separate, equally optional parameter that selects the language of product and category names in the response.

Good to know

  • No key needed, and CORS is open, so browser tools can load the link directly. Limit: 30 requests per minute per IP address.
  • The server address inside the specification is already the base URL above, so “Try it out” sends requests to this shop.
  • The answer is cached for up to 60 seconds, so changes appear within a minute. The shorter address /openapi.json returns the same specification.
  • When the API changes, import the link again to refresh the collection in your tool.

Limits

  • 60 requests per minute per key; 60 purchases per minute per key. Purchases also count toward the general per-minute limit.
  • Exceeding a limit returns 429 with a Retry-After header (in seconds).
  • Every response carries X-RateLimit-Limit and X-RateLimit-Remaining headers.
  • Repeated invalid keys from one IP are blocked for a while.
  • The catalog is cached for about 10 seconds, so polling it more often is pointless.
  • These are the default limits. A higher limit for your account is available on request: contact support. The limits that apply to your account are returned by GET /me (limits) and in the X-RateLimit-Limit header.

GET /products

Active products visible in the shop. Optional ?lang=en selects the language of names, ?category_id= filters by category, ?page= and ?limit= paginate (without them everything is returned). stock: null means unlimited. Order a product only when orderable is true: it is active, in stock (at least min_qty) and the shop is not in maintenance.

Without page/limit all matching products are returned. total is always the number of all matching products (after the category_id filter), not the number on the current page. When pagination is used, the response also contains page, limit and total_pages. Without page/limit there is no default page size or maximum: the whole matching catalog is returned. For large catalogs use page and limit (limit max 200).

curl -H "Authorization: Bearer $KEY" "https://dasqin.bond/api/v1/products"
curl -H "Authorization: Bearer %KEY%" "https://dasqin.bond/api/v1/products"
import requests

r = requests.get(
    "https://dasqin.bond/api/v1/products",
    headers={"Authorization": "Bearer " + KEY},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/products", {
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
{"ok": true, "currency": "USD", "total": 1,
 "categories": [{"id": 1, "parent_id": null, "name": "Accounts"}],
 "products": [{"id": 7, "category_id": 1, "type": "stock", "name": "Example",
   "description": "", "price": "1.50",
   "tiers": [{"min_qty": 10, "unit_price": "1.20"},
             {"min_qty": 50, "unit_price": "1.00"}],
   "stock": 42, "min_qty": 1, "max_qty": 100, "orderable": true}]}

Volume discounts: tiers lists the quantity from which a lower unit price applies. The price applies to the whole order, not only to the extra items: the tier with the largest min_qty that does not exceed the ordered quantity is used, and below the first tier the base price is used. Example: 1–9 items cost 1.50 each, 10–49 cost 1.20 each, 50 or more cost 1.00 each (so 10 items = 12.00). tiers is an empty array [] when the product has no volume discounts.

price 1.50  +  tiers [10 → 1.20, 50 → 1.00]

 1 –  9 items  →  1.50 each
10 – 49 items  →  1.20 each
50 +    items  →  1.00 each

Fields

idint
Product ID
category_idint | null
Category ID, null if none
typestring
How it is delivered: stock, text, file or api
namestring
Name in the requested lang
descriptionstring
Plain-text description, may be empty
pricestring
Unit price in USD (string)
tiersarray
Volume discounts: from min_qty items the unit price is unit_price
stockint | null
Available quantity; null = unlimited
min_qty, max_qtyint
Smallest and largest quantity per order
orderablebool
true when the product can be ordered right now. Check this instead of guessing from stock

GET /balance

curl -H "Authorization: Bearer $KEY" "https://dasqin.bond/api/v1/balance"
curl -H "Authorization: Bearer %KEY%" "https://dasqin.bond/api/v1/balance"
import requests

r = requests.get(
    "https://dasqin.bond/api/v1/balance",
    headers={"Authorization": "Bearer " + KEY},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/balance", {
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
{"ok": true, "balance": "12.34", "currency": "USD"}

GET /me

Account info for the key: balance, key details and your current limits. Handy as a quick connection check.

curl -H "Authorization: Bearer $KEY" "https://dasqin.bond/api/v1/me"
curl -H "Authorization: Bearer %KEY%" "https://dasqin.bond/api/v1/me"
import requests

r = requests.get(
    "https://dasqin.bond/api/v1/me",
    headers={"Authorization": "Bearer " + KEY},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/me", {
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
{"ok": true, "user_id": 123456789, "balance": "12.34", "currency": "USD",
 "key": {"prefix": "dsk_Ab12Cd", "created_at": 1767225600, "last_used": 1767229200, "requests": 318},
 "limits": {"requests_per_minute": 60, "purchases_per_minute": 60}}
user_idint
Your account ID
balancestring
Current balance (USD string)
keyobject
Key info: prefix, created_at, last_used, requests (approximate)
limitsobject
Your limits: requests_per_minute, purchases_per_minute. These are the limits that apply to your account: a custom limit if one was set for you, otherwise the default.

GET /stats

Totals for your account. total_spent counts completed orders only; on_hold is money reserved by orders that are pending or under review. The result is cached for about 30 seconds. by_status lists every status your account has (done, pending, review, failed, refunded) with order count and amount, while total_spent, orders and items count only done orders: failed and refunded orders are not included in them.

curl -H "Authorization: Bearer $KEY" "https://dasqin.bond/api/v1/stats"
curl -H "Authorization: Bearer %KEY%" "https://dasqin.bond/api/v1/stats"
import requests

r = requests.get(
    "https://dasqin.bond/api/v1/stats",
    headers={"Authorization": "Bearer " + KEY},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/stats", {
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
{"ok": true, "currency": "USD", "total_spent": "48.50", "on_hold": "5.00",
 "orders": 31, "items": 64,
 "by_status": {
   "done": {"orders": 31, "total": "48.50"},
   "pending": {"orders": 1, "total": "2.00"},
   "review": {"orders": 1, "total": "3.00"},
   "failed": {"orders": 2, "total": "4.00"},
   "refunded": {"orders": 1, "total": "4.50"}},
 "by_product": [{"product_id": 7, "name": "Example", "type": "stock",
   "orders": 12, "qty": 40, "spent": "30.00"}]}
total_spentstring
Total spent on completed orders (USD string)
on_holdstring
Amount reserved by pending / review orders
orders, itemsint
orders: completed orders; items: total quantity bought
by_statusobject
Per status: number of orders and amount
by_productarray
Sales per service (top 100 by spend): product_id, name, type, orders, qty, spent

POST /buy

Body is JSON. request_id is required (1-64 chars: letters, digits, . _ : -): use a new unique value for every purchase. It is saved together with the order, so repeating the same request, even much later or after a timeout or server restart, returns the response matching the current status of the existing order (header Idempotent-Replay: true; details below) and never charges twice. The same request_id with a different product_id or qty is rejected with 422. If you get no answer or a 500, simply repeat the request with the same request_id. The 422 applies only while an existing order holds this request_id; after failed the id is free for any product and quantity. Allowed characters are ASCII only: A-Z a-z 0-9 . _ : -.

curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"product_id": 7, "qty": 2, "request_id": "my-unique-id-1"}' \
  https://dasqin.bond/api/v1/buy
curl -X POST -H "Authorization: Bearer %KEY%" -H "Content-Type: application/json" ^
  -d "{\"product_id\": 7, \"qty\": 2, \"request_id\": \"my-unique-id-1\"}" ^
  "https://dasqin.bond/api/v1/buy"
import requests

r = requests.post(
    "https://dasqin.bond/api/v1/buy",
    headers={"Authorization": "Bearer " + KEY},
    json={"product_id": 7, "qty": 2, "request_id": "my-unique-id-1"},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/buy", {
  method: "POST",
  headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({"product_id": 7, "qty": 2, "request_id": "my-unique-id-1"}),
});
console.log(r.status, await r.json());
{"ok": true, "order": {"id": 551, "product_id": 7, "name": "Example", "type": "stock",
  "qty": 2, "unit_price": "1.50", "total": "3.00", "status": "done",
  "created_at": 1767225600, "request_id": "my-unique-id-1",
  "items": ["login:pass", "login2:pass2"], "has_file": false}}

Status 202 with "error": "review" means the order was accepted but needs manual review; check it with GET /orders/ID. For file products download the file with GET /orders/ID/file (same Authorization header). The ok field is true only when the order is done and delivered. ok: false does not always mean the purchase was rejected: 202 means the order was accepted but is NOT delivered yet. Decide by the HTTP status, the error code and the order status, not by ok alone.

Example of partial delivery (supplier products): 4 were requested, 3 arrived. The order is done with the actual qty and total, and the price of the missing item is returned to your balance automatically. Retrying with the same request_id and the original qty (4) returns this same order:

{"ok": true, "order": {"id": 552, "product_id": 9, "name": "Example API", "type": "api",
  "qty": 3, "unit_price": "1.50", "total": "4.50", "status": "done",
  "created_at": 1767225900, "request_id": "my-unique-id-2",
  "items": ["a:1", "b:2", "c:3"], "has_file": false}}

Example 202 response (the order is NOT delivered yet; track it with GET /orders/551):

{"ok": false, "error": "review", "message": "Order needs manual review", "order_id": 551}

request_id is unique per account (not per API key and not system-wide): regenerating your key does not reset it, and other users may use the same value. Repeating a request returns the current state of the existing order: done → the original order (200, header Idempotent-Replay: true); review → 202; pending → 409 in_progress (wait and retry with the same request_id); failed (rejected, money returned automatically) → the request_id is released and may be used for a new attempt; refunded (refunded manually) → 409 refunded: this request_id stays used, so use a new one for a new purchase. Never treat 202 as a delivery: there are no items yet. Statuses done, failed and refunded are final; pending and review are not. Poll GET /orders/ID until the order reaches a final status. A 422 idempotency_mismatch is returned only while an existing order still holds the request_id (done, pending, review, refunded) and you send a different product_id or qty. After failed the request_id is free: it starts a new purchase, with any product and quantity. Idempotent-Replay: true is sent on every response that restates an existing order (200, 202, 409 in_progress and 409 refunded). It is not sent on 422 idempotency_mismatch or on a 409 in_progress without order_id, because there is no existing order to restate yet.

409 in_progress includes order_id when the order has already been created. If order_id is missing, the order is not created yet or is still being processed: wait Retry-After seconds (always present on this response, currently 2) and repeat the same request with the same request_id; the answer returns the current state of the order (it can also end as failed or refunded: delivery is not guaranteed). Never start a new purchase with a new request_id for the same order: you may be charged twice. Every order object also returns its request_id (null for orders not placed through the API), so you can match a purchase in GET /orders by its request_id; do not guess the order from the newest entries, parallel purchases make that unreliable.

Atomic purchase. For products with local stock, the stock reservation and the balance debit run in a single database transaction with row locking. If stock or balance is insufficient (409 stock / 402 balance), nothing is written and nothing is charged. Under concurrent requests the same item is never delivered twice, stock is never oversold, and the balance is never charged twice. Sandbox: it does not reserve real stock or touch real balances, so this guarantee applies to the real API only.

Example 409 in_progress responses: with order_id (order exists) and without it (repeat with the same request_id):

HTTP 409, header Retry-After: 2
{"ok": false, "error": "in_progress", "message": "Order is still being processed, retry shortly with the same request_id", "order_id": 551}

HTTP 409, header Retry-After: 2
{"ok": false, "error": "in_progress", "message": "Retry shortly with the same request_id"}

Guarantees

Money is taken together with the order, and a rejected or failed order (including 503 and supplier errors) costs nothing: it is refunded in full. One exception: for products delivered by a supplier API the delivery can be partial. Then the order is done with the actual qty and total (you pay only for delivered items) and the difference is refunded automatically. Orders under manual review (202) keep their amount reserved until they are completed or refunded. If a response is lost, repeat the request with the same request_id: you cannot be charged twice. Do not repeat it with a new request_id.

GET /orders, GET /orders/ID

/orders?limit=20&page=2 lists your orders, newest first (default limit is 20, max 200 per page). List entries do not contain items and has_file: they are returned only by /orders/ID. before_id works as a cursor. total and total_pages always describe all your orders, also when before_id is used (they do not shrink as the cursor moves).

Do not combine page and before_id: if before_id is given, page is ignored (the response reports page 1). To read the next page with the cursor, pass the returned next_before_id as before_id. It is null on the last page, and an empty orders list also means the end. page is offset based: if new orders arrive between requests, an order can move to the next page and appear twice or be skipped. For a walk without repeats or gaps use only before_id with next_before_id.

curl -H "Authorization: Bearer $KEY" "https://dasqin.bond/api/v1/orders?limit=2&page=1"
curl -H "Authorization: Bearer %KEY%" "https://dasqin.bond/api/v1/orders?limit=2&page=1"
import requests

r = requests.get(
    "https://dasqin.bond/api/v1/orders?limit=2&page=1",
    headers={"Authorization": "Bearer " + KEY},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/orders?limit=2&page=1", {
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
{"ok": true, "total": 45, "page": 1, "limit": 2, "total_pages": 23, "next_before_id": 550,
 "orders": [
  {"id": 551, "product_id": 7, "name": "Example", "type": "stock", "qty": 2,
   "unit_price": "1.50", "total": "3.00", "status": "done", "created_at": 1767225600,
   "request_id": "my-unique-id-1"},
  {"id": 550, "product_id": 7, "name": "Example", "type": "stock", "qty": 1,
   "unit_price": "1.50", "total": "1.50", "status": "done", "created_at": 1767225300,
   "request_id": null}]}
curl -H "Authorization: Bearer $KEY" "https://dasqin.bond/api/v1/orders?limit=2&before_id=550"
curl -H "Authorization: Bearer %KEY%" "https://dasqin.bond/api/v1/orders?limit=2&before_id=550"
import requests

r = requests.get(
    "https://dasqin.bond/api/v1/orders?limit=2&before_id=550",
    headers={"Authorization": "Bearer " + KEY},
    timeout=30,
)
print(r.status_code, r.json())
const r = await fetch("https://dasqin.bond/api/v1/orders?limit=2&before_id=550", {
  headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());
{"ok": true, "total": 45, "page": 1, "limit": 2, "total_pages": 23, "next_before_id": 548,
 "orders": [
  {"id": 549, "product_id": 3, "name": "Example 2", "type": "file", "qty": 1,
   "unit_price": "2.00", "total": "2.00", "status": "done", "created_at": 1767225000,
   "request_id": null},
  {"id": 548, "product_id": 7, "name": "Example", "type": "stock", "qty": 3,
   "unit_price": "1.50", "total": "4.50", "status": "refunded", "created_at": 1767224700,
   "request_id": "my-unique-id-0"}]}
statusstring
done, failed, refunded (final) or pending, review (manual review; not final). Only done means delivered
qtyint
Number of items (integer). For partial delivery it is the actually delivered number
unit_price, totalstring
Unit price and total (USD strings, for example "1.50")
created_atint
Creation time, Unix seconds (UTC)
request_idstring | null
The request_id sent with POST /buy; null for orders not placed through the API
itemsarray
Delivered items; only in /orders/ID and in the /buy response
has_filebool
true for file products: download via /orders/ID/file

GET /orders/ID/file downloads the file only for orders with status done and type file (same Authorization header). On success the response is the file itself (Content-Disposition: attachment), not JSON. In every other case (other status, not a file product, someone else's order, file missing) it returns the JSON error 404 not_found.

Errors

All errors share one format (see the example below).

{"ok": false, "error": "balance", "message": "...", "need": "5.00", "have": "1.00"}
202
reviewAccepted but under manual review, NOT delivered yet: check GET /orders/ID
400
bad_request, qtyInvalid body or quantity (min/max are included)
401
unauthorizedMissing or invalid key
402
balanceNot enough balance (need/have are included)
403
banned, gate_fsub, gate_verifyAccount blocked, or required subscription/verification not completed in the bot
404
not_foundUnknown endpoint, product or order. Code not_found in every case: unknown or unavailable product in POST /buy, missing order, missing file
409
stock, limit, in_progress, refundedOut of stock (left is included), per-user limit reached, the same request_id is still running (in_progress), or the order was refunded (refunded: use a new request_id)
413
bad_requestRequest body is larger than 2 KB
422
idempotency_mismatchAn existing order (not failed) still holds this request_id, and it was used with a different product_id/qty
429
rate_limited, too_many_failuresSlow down, see Retry-After
500
internalServer error. Repeat the request with the same request_id: it is safe, you cannot be charged twice
502 / 503
provider, busy, unavailable, maintenanceSupplier problem, server busy, or shop in maintenance. Safe to retry later

Retries

For 429 wait Retry-After seconds. For 500, 502, 503 and 409 in_progress retry with the same request_id: wait Retry-After seconds (409 in_progress always has it, currently 2); if the response has no Retry-After (for example 500, 502), wait 1, 2, 4, 8 seconds (exponential backoff). At most 5 attempts. If it still fails, stop and check the order with GET /orders/ID (if you have order_id). Never retry the same purchase with a new request_id: it can be charged twice. Do not retry 400, 401, 402, 403, 404, 422 or 409 (stock, limit, refunded) without changing something: the result will not change.