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.
- If necessary, ensure that Pragma is running, then open Postman and send
PragmaDev ➨ Public ➨ GetInQueuev1
to enter the login queue. - Authenticate as both a Player and Operator by sending
PragmaDev ➨ Public ➨ Player - AuthenticateOrCreateV2
andPragmaDev ➨ Public ➨ Operator - AuthenticateOrCreateV2
service calls. - 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 thefreeVendor
:
{
"requestId": 1,
"type": "InventoryRpc.StorePurchaseV4Request",
"payload": {
"data" : {
"ext": {},
"storeId": "freeVendor",
"storeEntryId": "starterBundle",
"amount": 1
}
}
}
- Send
storePurchaseV4
again to purchase a laser sword by changing thestoreId
toshopkeeper
and thestoreEntryId
tolaserSword
. Confirm the cost was subtracted from the currency amounts, and that the inventory contains alaserSword
that deals between 21 and 42damage
.
{
"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