Skip to main content
Version: 6.1.0

SysDropMyUserItems

Client Cloud Code only. Drops the specified items from the session user's inventory, without any recovery of the currency paid for them.

If dropMax is true, the full quantity of each item is dropped. If false, a quantity of 1 of each item is dropped.

Items that cannot be dropped are skipped rather than failing the whole call — for example, an item that is not found in the user's inventory, an item published to the blockchain (has a blockItemId), or an item that has been given away and is awaiting pickup (has giftedTo). Their IDs are returned in skippedItemIds.

note

By default, at most 10 item IDs can be passed per call. The limit is set by the app property userItemsDropItemsMaxItemIds — contact support if you need it adjusted.

Each item ID passed counts as one bulk API call, whether or not the item was actually dropped.

ServiceOperation
userItemsSYS_DROP_MY_USER_ITEMS

Method Parameters​

ParameterDescription
itemIdsArray of user item IDs to drop from the session user's inventory.
dropMaxIf true, the full quantity of each item is dropped. If false, a quantity of 1 of each item is dropped.

Usage​

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"items": [
{
"itemId": "aaa-bbb-ccc-ddd",
"defId": "potion001",
"type": "ITEM",
"quantity": 4,
"itemData": {},
"giftedTo": null,
"giftedFrom": null,
"createdAt": 1764001974250,
"updatedAt": 1791360000000,
"version": 3,
"usesLeft": null,
"coolDownStart": -1,
"recoveryStart": -1,
"maxUses": null,
"coolDownUntil": -1,
"recoveryUntil": -1
}
],
"skippedItemIds": [
"eee-fff-ggg-hhh"
]
},
"status": 200
}

items lists the dropped items that still have some quantity remaining. Items that were dropped completely are not included. skippedItemIds is only present when one or more items could not be dropped.

Common Error Codes

Status Codes​

CodeNameDescription
40358MISSING_REQUIRED_PARAMETERitemIds or dropMax was not specified.
40660INVALID_PARAMETER_VALUEMore item IDs were passed than the app allows (10 by default).
40616CLOUD_CODE_ONLY_METHODThe method was called directly from a client. It can only be called from client-session Cloud Code.