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
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id | string | yes | From `merchants`. The fully-qualified id. |
Example request
{ "merchant_id": "DesignDataMerchant:Id_Merchant_Weaponsmith" }
Response
`{ merchantId, items }`.
| Field | Type | Meaning |
|---|---|---|
items[].stockUid | string | What `merchantBuy` takes. Exceeds 2^53, so it travels as a string. |
items[].finalPrice | integer | What you pay, after affinity. |
items[].originPrice | integer | The undiscounted price. |
items[].stockCount | integer | How 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
| Code | When |
|---|---|
action_failed | No 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.