sell
Sell items to a merchant.
Every uid is checked against the buy-back table before anything is sent, so a batch containing one unsellable item is refused whole rather than half-completed. The proceeds may land as spectral coins rather than gold — that is the game's choice, not this API's — so if every container is full the sale is refused with a retryable error.
In Merchants.
Request
POST /api/v1/sessions/{accountKey}/actions/sell
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
itemUids (item_uids, uid) | string[] | yes | Items to sell, from `sellable`. A single uid may be passed as `uid` instead of a list. |
merchant_id | string | yes | Which merchant. |
Example request
{
"merchant_id": "DesignDataMerchant:Id_Merchant_Weaponsmith",
"itemUids": ["630211546215118851", "630211546215118858"]
}
Response
`{ ok: true, sold, givenItemIds }`.
| Field | Type | Meaning |
|---|---|---|
sold | integer | How many items the merchant took. |
givenItemIds | array | What was received in exchange — gold, spectral coins, or both. |
retryable | boolean | On failure only. True when the sale failed because storage was full rather than because the sale was invalid. |
Example response
{
"ok": true,
"result": 1,
"sold": 2,
"givenItemIds": ["DesignDataItem:Id_Item_GoldCoins"]
}
Errors
| Code | When |
|---|---|
action_failed | An item has no buy-back slot, a uid is not yours, or every gold container is full (`retryable: true`). |
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.