Xsolla-logo

Consume item

post/v2/project/{project_id}/user/inventory/item/consume

Client endpoint. Consumes an item from the current user’s inventory.

SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer
Default: 44056

Project ID.

query Parameters
platform
string
Default: "playstation_network"

Publishing platform the user plays on.

Enum: "playstation_network" "xbox_live" "xsolla" "pc_standalone" "nintendo_shop" "google_play" "app_store_ios" "android_standalone" "ios_standalone" "android_other" "ios_other" "pc_other"
Request Body schema: application/json
sku
required
string
Default: "booster_mega_1"

Unique item ID. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.

quantity
required
number
Default: 1

Item quantity.

Responses
200

Item from the user’s inventory was consumed.

404

The item was not found at all, the item was not found in the inventory, or it is not enough (attempt to consume more than the initial number).

422

Make sure quantity and sku parameters are passed.

Request samples
application/json
{
  • "sku": "booster_mega_1",
  • "quantity": 1
}
Response samples
{
  • "statusCode": 404,
  • "errorCode": 4001,
  • "errorMessage": "[0401-4001]: Item with Project Id = 44056 and Sku = gun_5 not found"
}