Store API

JSON API v1 — catalog and wallet orders. API keys · Sign in

Base URL

https://trenddeep.com/api/v1

Example: https://trenddeep.com/api/v1/products

Authentication

Protected routes need Authorization: Bearer <key> or X-API-Key: <key>. Use Content-Type: application/json on POST /orders.

Endpoints

Method Path Auth Notes
GET / or /health {"ok":true,"version":1}
GET /products Catalog (active categories only). Each row is one sellable package.
GET /me Key Wallet summary: currency, balance_display, api_key_id, user (balance in USD string).
GET /orders/{id} Key Your order only. Includes delivery fields when present (voucher_code, downloads, etc.).
POST /orders Key Debit wallet (except API-reseller catalog lines, billed upstream). Optional X-Reseller-Forwarded: 1 counts as storefront traffic.

Unknown path → 404 · {"ok":false,"error":"not_found"}

GET /products

Response: {"ok":true,"products":[…]}. Use item_id (same as id) in orders. price / price_usd are USD strings; price_display + currency (USD) are for display. Respect in_stock, is_active, and order_checkout_hints for required checkout keys.

POST /orders

Body (object): item_id (required, positive int). checkout object and/or top-level cf_* / smm_* keys must satisfy hints. Legacy player_id only when the package has no structured checkout fields.

curl -sS -X POST "https://trenddeep.com/api/v1/orders" \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":123,"checkout":{"cf_0":"buyer@example.com"}}'

Success 200: ok, order_id, status, amount, currency, plus voucher_code / downloads when ready. Errors: ok:false, error, message — e.g. unauthorized (401), invalid_json / missing_item_id / checkout_fields_required / checkout_incomplete (400), item_not_found (404), out_of_stock (409), insufficient_balance (402), wallet_disabled (503), payment_failed (500).