# Method: achievements.updateMultiple

- [HTTP request](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#body.HTTP_TEMPLATE)
- [Request body](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#body.request_body)
- [Response body](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#body.response_body)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#body.UpdateMultipleAchievementsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#body.aspect)
- [UpdateMultipleAchievements](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateMultipleAchievements)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateMultipleAchievements.SCHEMA_REPRESENTATION)
- [UpdateAchievement](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateAchievement)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateAchievement.SCHEMA_REPRESENTATION)
- [AchievementUpdateType](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementUpdateType)
- [AchievementIncrement](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementIncrement)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementIncrement.SCHEMA_REPRESENTATION)
- [SetAchievementSteps](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#SetAchievementSteps)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#SetAchievementSteps.SCHEMA_REPRESENTATION)
- [UpdatedAchievement](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievement)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievement.SCHEMA_REPRESENTATION)
- [UpdatedAchievementState](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievementState)
- [Try it!](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#try-it)

Updates multiple achievements for the currently authenticated player.

### HTTP request

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

### Request body

The request body contains an instance of[UpdateMultipleAchievements](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateMultipleAchievements).

### Response body

Response message for achievements.updateMultiple rpc.

If successful, the response body contains data with the following structure:

|                                                                               JSON representation                                                                               |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "updatedAchievements": [ { object (https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievement) } ] } ``` |

|                                                                                                     Fields                                                                                                     ||
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`                  | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#achievementUpdateMultipleResponse`.                                                    |
| `updatedAchievements[]` | `object (`[UpdatedAchievement](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievement)`)` The updated state of the achievements. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/games`
- `
  https://www.googleapis.com/auth/games_lite`

For more information, see the[OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## UpdateMultipleAchievements

A list of achievement update requests.

|                                                                        JSON representation                                                                         |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "updates": [ { object (https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateAchievement) } ] } ``` |

|                                                                                                Fields                                                                                                 ||
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`      | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#achievementUpdateMultipleRequest`.                                                        |
| `updates[]` | `object (`[UpdateAchievement](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdateAchievement)`)` The individual achievement update requests. |

## UpdateAchievement

A request to update an achievement.

|                                                                                                                                                                                                                                      JSON representation                                                                                                                                                                                                                                      |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "achievementId": string, "updateType": enum (https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementUpdateType), "incrementPayload": { object (https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementIncrement) }, "setStepsAtLeastPayload": { object (https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#SetAchievementSteps) } } ``` |

|                                                                                                                              Fields                                                                                                                               ||
|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`                   | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#achievementUpdateRequest`.                                                                                                               |
| `achievementId`          | `string` The achievement this update is being applied to.                                                                                                                                                                               |
| `updateType`             | `enum (`[AchievementUpdateType](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementUpdateType)`)` The type of update being applied.                                                    |
| `incrementPayload`       | `object (`[AchievementIncrement](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#AchievementIncrement)`)` The payload if an update of type`INCREMENT`was requested for the achievement.        |
| `setStepsAtLeastPayload` | `object (`[SetAchievementSteps](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#SetAchievementSteps)`)` The payload if an update of type`SET_STEPS_AT_LEAST`was requested for the achievement. |

## AchievementUpdateType

Possible achievement update types.

|                                      Enums                                      ||
|----------------------|-----------------------------------------------------------|
| `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. |

## AchievementIncrement

The payload to request to increment an achievement.

|                        JSON representation                        |
|-------------------------------------------------------------------|
| ``` { "kind": string, "steps": integer, "requestId": string } ``` |

|                                                                             Fields                                                                             ||
|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`      | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#GamesAchievementIncrement`.                        |
| `steps`     | `integer` The number of steps to be incremented.                                                                                                  |
| `requestId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The requestId associated with an increment to an achievement. |

## SetAchievementSteps

The payload to request to increment an achievement.

|             JSON representation              |
|----------------------------------------------|
| ``` { "kind": string, "steps": integer } ``` |

|                                                                  Fields                                                                   ||
|---------|----------------------------------------------------------------------------------------------------------------------------------|
| `kind`  | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#GamesAchievementSetStepsAtLeast`. |
| `steps` | `integer` The minimum number of steps for the achievement to be set to.                                                          |

## UpdatedAchievement

An updated achievement.

|                                                                                                                            JSON representation                                                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "achievementId": string, "updateOccurred": boolean, "currentState": enum (https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievementState), "currentSteps": integer, "newlyUnlocked": boolean } ``` |

|                                                                                                     Fields                                                                                                     ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`           | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#achievementUpdateResponse`.                                                                   |
| `achievementId`  | `string` The achievement this update is was applied to.                                                                                                                                      |
| `updateOccurred` | `boolean` Whether the requested updates actually affected the achievement.                                                                                                                   |
| `currentState`   | `enum (`[UpdatedAchievementState](https://developer.android.com/games/services/web/api/rest/v1/achievements/updateMultiple#UpdatedAchievementState)`)` The current state of the achievement. |
| `currentSteps`   | `integer` The current steps recorded for this achievement if it is incremental.                                                                                                              |
| `newlyUnlocked`  | `boolean` Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player).                                                |

## UpdatedAchievementState

Possible updated achievement states.

|                Enums                 ||
|------------|--------------------------|
| `HIDDEN`   | Achievement is hidden.   |
| `REVEALED` | Achievement is revealed. |
| `UNLOCKED` | Achievement is unlocked. |