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 |
---|
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/games |
For more information, see the authentication and authorization page.
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:
Acceptable values are:
|
|
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#achievementUpdateMultipleResponse . |
|
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:
Acceptable values are:
|
|
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.