Documentation

UpdateCharacterStatistics

Updates the values of the specified title-specific statistics for the specific character

Request Details

Character statistics are similar to user statistics in that they are numeric values which may only be updated by a server operation, in order to minimize the opportunity for unauthorized changes. In addition to being available for use by the title, the statistics are used for all leaderboard operations in PlayFab.

UpdateCharacterStatisticsRequest
Request Properties
CharacterId (required) String

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

CharacterStatistics Dict<String, int32>

Statistics to be updated with the provided values.

PlayFabId (required) String

Unique PlayFab assigned ID of the user on whom the operation will be performed.

POST https://{{TitleID}}.playfabapi.com/Server/UpdateCharacterStatistics
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "PlayFabId": "10931252888739651331",
  "CharacterId": "98765432",
  "CharacterStatistics": {
    "Headshots": 18,
    "Kills": 47
  }
}
        

Response Details

UpdateCharacterStatisticsResult
Result Properties

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8


Authentication

SecretKey

Possible Error Codes

Name Code
AccountNotFound 1001
CharacterNotFound 1135
InvalidCharacterStatistics 1138