Deleting items #

It may occasionally be necessary to remove items from a player’s inventory. Pragma currently exposes two methods for removing instanced items from a player inventory: DestroyItemsOperatorV1 and DestroyItemsPartnerV1.

The Operator route is for tooling such as the Pragma Portal, while the Partner route is for entities external to Pragma, such as a game server.


Purchase and remove instanced items #

Currently, Pragma has supported routes for removing instanced items only. Support for stackable items will be added in a future release.

  1. If necessary, ensure that Pragma is running, then open Postman and send PragmaDev ➨ Public ➨ GetInQueuev1 to enter the login queue.
  2. Authenticate as both a Player and Operator by sending PragmaDev ➨ Public ➨ Player - AuthenticateOrCreateV2 and PragmaDev ➨ Public ➨ Operator - AuthenticateOrCreateV2 service calls.
  3. In order to remove an instanced item, you must first buy one. Use the following request body in PragmaDev ➨ Game ➨ RPC - Player ➨ Inventory ➨ storePurchaseV4 to purchase the starter bundle from the freeVendor:
{
  "requestId": 1,
  "type": "InventoryRpc.StorePurchaseV4Request",
  "payload": {
    "data" : {
      "ext": {},
      "storeId": "freeVendor",
      "storeEntryId": "starterBundle",
      "amount": 1
    }
  }
}
  1. Send storePurchaseV4 again to purchase a laser sword by changing the storeId to shopkeeper and the storeEntryId to laserSword. Confirm the cost was subtracted from the currency amounts, and that the inventory contains a laserSword that deals between 21 and 42 damage.
{
  "requestId": 1,
  "type": "InventoryRpc.StorePurchaseV4Request",
  "payload": {
    "data" : {
      "ext": {},
      "storeId": "shopkeeper",
      "storeEntryId": "laserSword",
      "amount": 1
    }
  }
}

Take note of the instanceId of the laserSword as you will need it in the next step. 4. To delete the laserSword you just acquired using the DestroyItemsOperatorV1