Skip to main content
POST
/
shop
/
buy
buy an item (or combine via recipe) for an entity
curl --request POST \
  --url http://localhost:3917/shop/buy \
  --header 'Content-Type: application/json' \
  --data '
{
  "entity_id": 1,
  "item_id": 1
}
'
{
  "ok": true,
  "message": "<string>"
}

Body

application/json
entity_id
integer<int32>
required

Entity performing the transaction (must have Gold and an Inventory).

Required range: x >= 0
item_id
integer<int32>
required

Item definition id to buy or sell.

Required range: x >= 0

Response

200 - application/json

Item bought (or combined via recipe); ok is false with a message on insufficient gold, missing entity, or unknown item.

ok
boolean
required
message
string | null