merchantBuy

Buy from a merchant.

Gold is composed from your stash containers automatically and the item is delivered into a free backpack slot — both are found for you, so a full backpack or scattered gold is not something to prepare for.

In Merchants.

Request

POST /api/v1/sessions/{accountKey}/actions/merchantBuy

Parameters

NameTypeRequiredDescription
stockUid (stock_uid)stringyesThe stock entry to buy, from `merchantStock`.
merchant_idstringyesWhich merchant.
countintegernoHow many; defaults to one.

Example request

{ "merchant_id": "DesignDataMerchant:Id_Merchant_Weaponsmith", "stockUid": "551", "count": 5 }

Response

`{ ok: true, shortName, spent, count, remainingGold }`.

FieldTypeMeaning
spentintegerGold actually paid, for `count` of them.
remainingGoldintegerWhat is left across your containers afterwards.

Example response

{
  "ok": true,
  "shortName": "Bandage",
  "spent": 65,
  "count": 5,
  "remainingGold": 181255
}

Errors

CodeWhen
action_failedNot enough gold, no free backpack slot, the stock entry is gone, or the merchant refused it.
plan_limitNot on the free plan.

See also

DarkerAPI is an independent project. It is not affiliated with, endorsed by or associated with IRONMACE Co., Ltd. or Valve Corporation. “Dark and Darker” and related marks belong to their respective owners.