Skip to main content

Store

Store goods, item definitions, command definitions, and purchase history.

StoreController​

  • Route prefix: api/store
  • Auth: [Authorize]. Create/update/delete are admin-only; purchase is admin or moderator.

Goods (store listings)​

MethodPathDescriptionRequestResponse
GET/goodsBrowse all goods, paginated?pageIndex&pageSize&searchPaginatedResponse<Goods>
GET/goods/{id}Get goods entry with linked items and commandsGoodsDetailResponse
POST/goodsCreate goods (admin){ name, price, description, itemIds, commandIds }{ id }
PUT/goods/{id}Update goods (admin){ name, price, description, itemIds, commandIds }{ id }
DELETE/goods/{id}Delete goods (admin)string
POST/goods/{id}/buyPurchase on behalf of a player (admin/moderator){ playerId, playerName }{ message, newBalance, deliveryLog }
GET/historyPurchase history (optionally filtered by player)?pageIndex&pageSize&playerIdPaginatedResponse<PurchaseRecord>

Item definitions​

MethodPathDescriptionRequestResponse
GET/item-definitionsAll item definitionsItemDefinition[]
GET/item-definitions/{id}Single item definitionItemDefinition
POST/item-definitionsCreate (admin){ itemName, count, quality, durability, description }{ id }
PUT/item-definitions/{id}Update (admin)same as POST{ id }
DELETE/item-definitions/{id}Delete (admin)string

Command definitions​

MethodPathDescriptionRequestResponse
GET/command-definitionsAll command definitionsCommandDefinition[]
GET/command-definitions/{id}SingleCommandDefinition
POST/command-definitionsCreate (admin){ command, runInMainThread, description }{ id }
PUT/command-definitions/{id}Update (admin)same as POST{ id }
DELETE/command-definitions/{id}Delete (admin)string

StoreSettingsController​

  • Route prefix: api/settings/store
  • Auth: admin role required.
MethodPathDescriptionRequestResponse
GET/Current store settingsStoreSettings
PUT/Update store settings{ purchaseCooldownSeconds, maxDailyPurchases, priceMultiplier }string

Notes​

  • Goods are composed: a goods entry references item definitions and command definitions by ID, so reusable payload pieces can be mixed into multiple listings.
  • priceMultiplier (store settings) scales all displayed prices at runtime without editing each goods row.