Documentation

ConsumeItem

Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory.

Request Details

ConsumeItemRequest
Request Properties
CharacterId String

Unique PlayFab assigned ID for a specific character owned by a user

ConsumeCount (required) int32

Number of uses to consume from the item.

ItemInstanceId (required) String

Unique instance identifier of the item to be consumed.

POST https://{{TitleID}}.playfabapi.com/Client/ConsumeItem
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "ItemInstanceId": "94585729",
  "ConsumeCount": 1
}
        

Response Details

ConsumeItemResult
Result Properties
ItemInstanceId String

Unique instance identifier of the item with uses consumed.

RemainingUses (required) int32

Number of uses remaining on the item.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "ItemInstanceId": "a1de52",
    "RemainingUses": 4
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
InvalidItemProperties 1091
ItemNotFound 1047
NoRemainingUses 1062