Achievements: updateMultiple

Requires authorization

Updates multiple achievements for the currently authenticated player. Try it now.

Request

HTTP request

POST https://www.googleapis.com/games/v1/achievements/updateMultiple

Parameters

Parameter name Value Description
Optional query parameters
consistencyToken long The last-seen mutation timestamp.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/games

Request body

In the request body, supply data with the following structure:

{
  "kind": "games#achievementUpdateMultipleRequest",
  "updates": [
    {
      "kind": "games#achievementUpdateRequest",
      "achievementId": string,
      "updateType": string,
      "incrementPayload": {
        "kind": "games#GamesAchievementIncrement",
        "steps": integer,
        "requestId": long
      },
      "setStepsAtLeastPayload": {
        "kind": "games#GamesAchievementSetStepsAtLeast",
        "steps": integer
      }
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateMultipleRequest.
updates[] list The individual achievement update requests.
updates[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateRequest.
updates[].achievementId string The achievement this update is being applied to.
updates[].updateType string The type of update being applied.
Possible values are:
  • "REVEAL" - Achievement is revealed.
  • "UNLOCK" - Achievement is unlocked.
  • "INCREMENT" - Achievement is incremented.
  • "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the passed value.


Acceptable values are:
  • "INCREMENT"
  • "REVEAL"
  • "SET_STEPS_AT_LEAST"
  • "UNLOCK"
updates[].incrementPayload nested object The payload if an update of type INCREMENT was requested for the achievement.
updates[].incrementPayload.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#GamesAchievementIncrement.
updates[].incrementPayload.steps integer The number of steps to be incremented.
updates[].incrementPayload.requestId long The requestId associated with an increment to an achievement.
updates[].setStepsAtLeastPayload nested object The payload if an update of type SET_STEPS_AT_LEAST was requested for the achievement.
updates[].setStepsAtLeastPayload.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#GamesAchievementSetStepsAtLeast.
updates[].setStepsAtLeastPayload.steps integer The minimum number of steps for the achievement to be set to.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "games#achievementUpdateMultipleResponse",
  "updatedAchievements": [
    {
      "kind": "games#achievementUpdateResponse",
      "achievementId": string,
      "updateOccurred": boolean,
      "currentState": string,
      "currentSteps": integer,
      "newlyUnlocked": boolean
    }
  ]
}
Property name Value Description Notes
kind string Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateListResponse.
updatedAchievements[] list The updated state of the achievements.
updatedAchievements[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateResponse.
updatedAchievements[].achievementId string The achievement this update is was applied to.
updatedAchievements[].updateOccurred boolean Whether the requested updates actually affected the achievement.
updatedAchievements[].currentState string The current state of the achievement.
Possible values are:
  • "HIDDEN" - Achievement is hidden.
  • "REVEALED" - Achievement is revealed.
  • "UNLOCKED" - Achievement is unlocked.


Acceptable values are:
  • "HIDDEN"
  • "REVEALED"
  • "UNLOCKED"
updatedAchievements[].currentSteps integer The current steps recorded for this achievement if it is incremental.
updatedAchievements[].newlyUnlocked boolean Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player).

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Play Games Services for Web
Play Games Services for Web