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

NameTypeRequiredDescription
itemUids (item_uids, uid)string[]yesItems to sell, from `sellable`. A single uid may be passed as `uid` instead of a list.
merchant_idstringyesWhich merchant.

Example request

{
  "merchant_id": "DesignDataMerchant:Id_Merchant_Weaponsmith",
  "itemUids": ["630211546215118851", "630211546215118858"]
}

Response

`{ ok: true, sold, givenItemIds }`.

FieldTypeMeaning
soldintegerHow many items the merchant took.
givenItemIdsarrayWhat was received in exchange — gold, spectral coins, or both.
retryablebooleanOn 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

CodeWhen
action_failedAn item has no buy-back slot, a uid is not yours, or every gold container is full (`retryable: true`).
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.