> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Achievement (JSON)

> Achievement (JSON)

# Achievement (JSON)

Achievement 对象(版本 2)。

## Achievement

Achievement 对象具有以下规范。所有成员均为必填项。

| 成员 | 类型 | 说明 |
| - | - | - |
| id | string | 资源标识符。 |
| serviceConfigId | string | 此资源的 SCID。标识与此成就相关的游戏。 |
| name | string | 本地化的成就名称。 |
| titleAssociations | [TitleAssociation](https://devdocs.xbox.com/zh-CN/reference/live/rest/json/json-titleassociation) 数组 | TitleAssociation 数组。 |
| progressState | **ProgressState** 枚举 | 进度状态: <ul><li>invalid (0):成就进度处于未知状态。</li><li>achieved (1):成就已解锁。</li><li>inProgress (2):成就已锁定,但用户已取得解锁进度。</li><li>notStarted (3):成就已锁定,且用户尚未取得任何解锁进度。</li></ul> |
| progression | [Progression](https://devdocs.xbox.com/zh-CN/reference/live/rest/json/json-progression) | 用户在此成就中的进度。 |
| mediaAssets | [MediaAsset](https://devdocs.xbox.com/zh-CN/reference/live/rest/json/json-mediaasset) 数组 | 与该成就关联的媒体资产,例如图像 ID。 |
| platform | string | 获得此成就时所在的平台。 |
| isSecret | 布尔值 | 该成就是否为秘密成就。 |
| description | string | 成就解锁后的描述。 |
| lockedDescription | string | 成就解锁前的描述。 |
| productId | string | 成就发布时使用的 ProductId。 |
| achievementType | **AchievementType** 枚举 | 成就类型(与旧版成就上先前的类型不同): <ul><li>invalid (0):未知且不受支持的成就类型。</li><li>persistent (1):没有结束日期、可随时解锁的成就。</li><li>challenge (2):有特定时间窗口可以在其中解锁的成就。</li></ul> |
| participationType | **ParticipationType** 枚举 | 成就的参与类型。有效值为 Individual 或 Group。 |
| timeWindow | TimeWindow | 成就可解锁的时间窗口。仅 Challenges 支持。 |
| rewards | [Reward](https://devdocs.xbox.com/zh-CN/reference/live/rest/json/json-reward) 数组 | 解锁时获得的奖励集合。 |
| estimatedTime | TimeSpan | 获取该成就的预计所需时间。 |
| deeplink | string | 进入游戏的深度链接。 |
| isRevoked | 布尔值 | 该成就是否已被执行系统撤销。 |

## JSON 语法示例

```json theme={null}
{
        "id":"3",
        "serviceConfigId":"b5dd9daf-0000-0000-0000-000000000000",
        "name":"Default NameString for Microsoft Achievements Sample Achievement 3",
        "titleAssociations":
        [{
                "name":"Microsoft Achievements Sample",
                "id":3051199919,
                "version":"abc"
        }],
        "progressState":"Achieved",
        "progression":
        {
          "requirements":
          [{
            "id":"12345678-1234-1234-1234-123456789012",
            "current":null,
            "target":"100"
          }],
          "timeUnlocked":"2013-01-17T03:19:00.3087016Z",
        },
        "mediaAssets":
        [{
                "name":"Icon Name",
                "type":"Icon",
                "url":"http://www.xbox.com"
        }],
        "platform":"D",
        "isSecret":true,
        "description":"Default DescriptionString for Microsoft Achievements Sample Achievement 3",
        "lockedDescription":"Default UnachievedString for Microsoft Achievements Sample Achievement 3",
        "productId":"12345678-1234-1234-1234-123456789012",
        "achievementType":"Challenge",
        "participationType":"Individual",
        "timeWindow":
        {
                "startDate":"2013-02-01T00:00:00Z",
                "endDate":"2100-07-01T00:00:00Z"
        },
        "rewards":
        [{
                "name":null,
                "description":null,
                "value":"10",
                "type":"Gamerscore",
                "valueType":"Int"
        },
        {
                "name":"Default Name for InAppReward for Microsoft Achievements Sample Achievement 3",
                "description":"Default Description for InAppReward for Microsoft Achievements Sample Achievement 3",
                "value":"1",
                "type":"InApp",
                "valueType":"String"
        }],
        "estimatedTime":"06:12:14",
        "deeplink":"aWFtYWRlZXBsaW5r",
        "isRevoked":false
    }

```

## 另请参阅

##### 父主题

[JavaScript 对象表示法 (JSON) 对象参考](https://devdocs.xbox.com/zh-CN/reference/live/rest/json/atoc-xboxlivews-reference-json)


## Related topics

- [Award Steam Achievement](https://devdocs.xbox.com/services/playfab/api-references/rest/server/platform-specific-methods/award-steam-achievement.md)
- [Get started with Unreal Engine for PC development](https://devdocs.xbox.com/build/gdk-and-engines/unreal/unreal.md)
- [Attribuer un succès Steam](https://devdocs.xbox.com/fr-CA/services/playfab/api-references/rest/server/platform-specific-methods/award-steam-achievement.md)
- [Steam 実績の付与](https://devdocs.xbox.com/ja-jp/services/playfab/api-references/rest/server/platform-specific-methods/award-steam-achievement.md)
- [Otorgar logro de Steam](https://devdocs.xbox.com/es/services/playfab/api-references/rest/server/platform-specific-methods/award-steam-achievement.md)
