SociumMarket
Socium Market · Buyer API v1

Buyer API

For resellers and automation: the catalogue with stock and terms, purchases from the balance with a key, delivered data, order history and disputes from your own program; the events of your orders to your address (webhooks).

  • REST and JSON
  • Key bk_live_…
  • Idempotent purchases
  • HMAC-signed webhooks

Getting started

  1. Top up the balance and link Telegram in the cabinet — an application needs both.
  2. Apply in Account → Buyer API: the purpose (resale, automating your own purchases or other) and a link to your site, shop or channel. The Socium team reviews it and tells you in Telegram.
  3. Once approved, create a key: read only or read and buy. Creating a key asks your password or 2FA code, and you get an e-mail about it. The key is shown once — keep it like a password.
  4. Add a webhook address (optional) and keep its signing secret — it is shown once too.

Keys, access and limits

API address: https://api.socium.tools/api/v1/buyer. Every answer is JSON, sums are in US cents, times are ISO 8601 with a time zone.

Authorization: Bearer bk_live_…

Or the header X-Api-Key: bk_live_…. A read-only key calls every GET; a purchase and a dispute need a «read and buy» key. An account has up to 10 keys; a revoked key stops at once.

  • 2 requests a second per key (by default). Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining; over the limit — 429 rate_limited with Retry-After: 1.
  • A page holds up to 200 records (limit, offset for the catalogue; before = next_cursor for orders).
  • Purchases, disputes, refusals and key changes are written to the account's log, shown in «Buyer API».

Endpoints

MethodPathWhat it doesAccess
GET/meThe account, the key, its limit, the webhook eventsread
GET/balanceMoney by baskets: topped_up_cents (purchases are paid from it), bonuses, earned moneyread
GET/categoriesCategories and the items in each; ?lang=enread
GET/productsThe catalogue: category, q, seller (a shop's slug or official), delivery_mode, in_stock, min_price_cents, max_price_cents, sort (new | price_asc | price_desc | popular), limit, offset, lang. Items you hid (your blacklist) are left outread
GET/products/{id}An item: price, stock (stock.available), guarantee (guarantee_minutes_effective), video_required, defect rate (defect_rate, from 5 orders), sold, rating, shop, instructionread
POST/ordersBuy from the balance (below)buy
GET/ordersOrder history, newest first: status, source (api | cabinet), limit, beforeread
GET/orders/{order_id}An order by its order_id or short coderead
GET/orders/{order_id}/deliveryThe delivered data (one line a unit) and the seller's instruction. The first read is the «downloaded» moment the seller and an arbitrator seeread
POST/orders/{order_id}/disputeOpen a dispute on a shop's order within its guarantee: {"reason": "…", "evidence_url": "https://…"}. Items marked «video required» need the link to the videobuy

Purchases

A purchase takes the cabinet's own path: the same stock check, payment from the balance, delivery, guarantee and seller's share. An automatic item is delivered at once (status: delivered), a manual one waits for the seller (awaiting_delivery), a service goes to its provider.

curl -X POST https://api.socium.tools/api/v1/buyer/orders \
  -H "Authorization: Bearer $SOCIUM_KEY" -H "Content-Type: application/json" \
  -d '{"product_id": 123, "quantity": 5, "request_id": "8b0f7c1e-3a9d-4f62-9a1e-2d5c7e0b4f11", "expected_amount_cents": 750}'
  • request_id is your UUID of the purchase. A repeat with the same ID and content returns the same order (200) and never pays twice; the same ID with other content is 409 request_id_reused.
  • expected_amount_cents is what you are ready to pay; a changed price is 409 price_changed with the new sum, nothing paid.
  • promo_code and bonus_cents work as in the cabinet when the marketplace allows them for the API. Cashback on API purchases is credited only when the marketplace switches it on.
  • Services take link and, for custom comments, comments; the quantity within the service's limits.
  • Accept the marketplace rules in the cabinet first (otherwise 409 rules_not_accepted).

Webhooks

Addresses are set in «Buyer API» (up to 5, public https:// only). Socium sends a signed JSON POST, as it does to sellers:

POST https://your-server/socium
Content-Type: application/json
X-Socium-Event: order.delivered
X-Socium-Event-Id: 6f1c…
X-Socium-Delivery: 9812
X-Socium-Signature: t=1764500000,v1=5d41402abc4b2a76b9719d911017c592…
EventWhen
order.deliveredThe order's data is ready: take it with GET /orders/{id}/delivery
order.refundedMoney went back to the balance (refund_cents), bonuses to bonuses
dispute.closedAn arbitrator closed the order's dispute (outcome)
webhook.testThe «Test» button in the cabinet

The signature is HMAC-SHA256 of <t>.<the raw body> with your whsec_… secret; check it as in the Seller API. A 2xx answer within 10 seconds delivers it; otherwise retries after 1 min … 24 h; after 50 failures in a row the address is switched off and you are told. Redirects are not followed.

Errors

An error is {"detail": {"code": "insufficient_balance", "error": "Insufficient balance"}}.

HTTPCodes
401api_key_missing, api_key_invalid
403api_key_read_only, api_access_not_approved, account_disabled, email_not_verified
404item_not_found, order_not_found
409insufficient_balance, insufficient_stock, price_changed, request_id_reused, item_hidden, own_goods, rules_not_accepted, order_not_delivered, guarantee_expired, store_order, money_frozen
422invalid fields, quantity_out_of_range, promo_not_allowed, video_required
429rate_limited (Retry-After), too_many_bad_keys

Rules

  • The marketplace rules apply: guarantee, video and disputes are the same as for a purchase in the cabinet.
  • Access may be revoked for breaking the rules — every key stops at once.
  • Keep keys and secrets like passwords. A key leaked — revoke it in the cabinet and make a new one.

Questions about connecting — Socium support.