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
| Name | Type | Required | Description |
|---|---|---|---|
stockUid (stock_uid) | string | yes | The stock entry to buy, from `merchantStock`. |
merchant_id | string | yes | Which merchant. |
count | integer | no | How many; defaults to one. |
Example request
{ "merchant_id": "DesignDataMerchant:Id_Merchant_Weaponsmith", "stockUid": "551", "count": 5 }
Response
`{ ok: true, shortName, spent, count, remainingGold }`.
| Field | Type | Meaning |
|---|---|---|
spent | integer | Gold actually paid, for `count` of them. |
remainingGold | integer | What is left across your containers afterwards. |
Example response
{
"ok": true,
"shortName": "Bandage",
"spent": 65,
"count": 5,
"remainingGold": 181255
}
Errors
| Code | When |
|---|---|
action_failed | Not enough gold, no free backpack slot, the stock entry is gone, or the merchant refused it. |
plan_limit | Not 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.