merchantStock

What one merchant currently sells.

Stock rotates — `merchants` reports how long is left on the current rotation. `finalPrice` is what you actually pay; `originPrice` is before your affinity discount.

In Merchants.

Request

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

Parameters

NameTypeRequiredDescription
merchant_idstringyesFrom `merchants`. The fully-qualified id.

Example request

{ "merchant_id": "DesignDataMerchant:Id_Merchant_Weaponsmith" }

Response

`{ merchantId, items }`.

FieldTypeMeaning
items[].stockUidstringWhat `merchantBuy` takes. Exceeds 2^53, so it travels as a string.
items[].finalPriceintegerWhat you pay, after affinity.
items[].originPriceintegerThe undiscounted price.
items[].stockCountintegerHow many are left in this rotation.

Example response

{
  "merchantId": "DesignDataMerchant:Id_Merchant_Weaponsmith",
  "items": [
    { "shortName": "Longsword", "itemId": "DesignDataItem:Id_Item_Longsword_3001",
      "stockUid": "547", "stockBuyId": "Id_StockBuy_Weaponsmith",
      "originPrice": 240, "finalPrice": 216, "stockCount": 2 },
    { "shortName": "Bandage", "itemId": "DesignDataItem:Id_Item_Bandage_1001",
      "stockUid": "551", "stockBuyId": "Id_StockBuy_Weaponsmith",
      "originPrice": 15, "finalPrice": 13, "stockCount": 20 }
  ]
}

Errors

CodeWhen
action_failedNo character is in the lobby, or the read timed out.

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.