# 按指定组获取游戏列表

从指定组中获取游戏密钥列表以构建目录。

注意：所有项目对于可以在响应中获得的商品数量均都限制。默认值和最大值是每个响应50个商品。要逐页获取更多数据，请使用limit和offset字段。

Endpoint: GET /v2/project/{project_id}/items/game/key/group/{external_id}
Version: 1.0.0
Security: AuthForClient

## Path parameters:

  - `project_id` (integer, required)
    项目ID。
    Example: 44056

  - `external_id` (string, required)
    组外部ID。

## Query parameters:

  - `limit` (integer)
    页面上元素数量的限制。
    Example: 50

  - `offset` (integer)
    元素编号，从该元素开始生成列表（从0开始数）。

  - `locale` (string)
    响应语言。符合ISO 639-1标准的两个小写字母的语言代码。

  - `additional_fields[]` (array)
    附加字段列表。如果在请求中发送这些字段，则它们将包含在响应中。可用字段media_list、order、long_description。

  - `country` (string)
    对于该目录要计算区域价格和限制的国家/地区。符合ISO 3166-1 alpha-2的两个大写字母的国家/地区代码。如果未明确指定国家/地区，则将根据用户的IP地址进行计算。

## Response 200 fields (application/json):

  - `items` (array)
    Example: [{"attributes":{"$ref":"#/components/examples/client-attribute-game-horror/Catalog_value"},"description":"Game description","drm_name":"Steam","drm_sku":"steam","groups":[{"external_id":"all","name":"All games"},{"external_id":"Xsolla","name":"Xsolla games"}],"has_keys":true,"image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","is_free":false,"is_pre_order":true,"name":"Game name","price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"release_date":"2020-08-11T10:00:00+03:00","sku":"game_1","type":"game_key","virtual_prices":[]},{"attributes":{"$ref":"#/components/examples/client-attribute-game-horror/Catalog_value"},"description":"Game description","drm_name":"Steam","drm_sku":"steam","groups":[{"external_id":"all","name":"All games"}],"has_keys":true,"image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","is_free":false,"is_pre_order":false,"name":"Game name","price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"sku":"game_2","type":"game_key","virtual_prices":[]}]

  - `items.attributes` (array)
    游戏对应的属性及属性值列表。

注意：这部分响应仅在您发送additional_fields[]=attributes查询参数时可用。

  - `items.attributes.external_id` (string)
    唯一属性ID。 external_id只能包含小写英文字母和数字字符、破折号和下划线。
    Example: "attribute_1"

  - `items.attributes.name` (string)
    属性名称。
    Example: "Genre"

  - `items.attributes.values` (array)

  - `items.attributes.values.external_id` (string)
    属性的唯一值ID。 external_id只能包含小写英文字母和数字字符、破折号和下划线。
    Example: "attribute_value"

  - `items.attributes.values.value` (string)
    属性值。
    Example: "Strategy"

  - `items.description` (string)
    商品描述。
    Example: "Game description"

  - `items.drm_name` (string)
    DRM名称。
    Example: "Steam"

  - `items.drm_sku` (string)
    唯一DRM ID。SKU只可包含小写英文字母、数字字符、句点、破折号和下划线。
    Example: "steam"

  - `items.groups` (array)
    商品所属分组。
    Example: [{"external_id":"all","name":"All games"},{"external_id":"Xsolla","name":"Xsolla game"}]

  - `items.groups.external_id` (string)
    Example: "accessory"

  - `items.groups.name` (string)
    Example: "Accessory"

  - `items.has_keys` (boolean)
    如果为true，则游戏密钥有供销售的密钥。

  - `items.image_url` (string)
    图像URL。
    Example: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png"

  - `items.is_free` (boolean)
    如果为true，则该商品为免费。

  - `items.is_pre_order` (boolean)
    如果为true，则游戏密钥为预订，并且发布日期尚未到来。
    Example: true

  - `items.name` (string)
    商品名称。
    Example: "Game name"

  - `items.price` (object)
    商品价格。

  - `items.price.amount` (string)
    折扣后的商品价格。
    Example: "2.9900"

  - `items.price.amount_without_discount` (string)
    商品价格。
    Example: "2.9900"

  - `items.price.currency` (string)
    默认购买货币。符合[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)的三字母代码。
    Example: "USD"

  - `items.release_date` (string)
    符合ISO 8601规定格式的游戏发行日期。
    Example: "2020-08-11T10:00:00+03:00"

  - `items.sku` (string)
    唯一商品ID。 SKU只能包含小写英文字母和数字字符、句点、破折号和下划线。
    Example: "game_01"

  - `items.type` (string)
    商品类型：game_key。
    Example: "game_key"

  - `items.virtual_prices` (array)
    虚拟价格。

  - `items.virtual_prices.amount` (integer)
    折扣后的商品虚拟货币价格。
    Example: 100

  - `items.virtual_prices.amount_without_discount` (integer)
    商品价格。
    Example: 200

  - `items.virtual_prices.description` (string)
    虚拟货币说明。
    Example: "Big Rocket - description"

  - `items.virtual_prices.image_url` (string)
    虚拟货币图像。
    Example: "http://image.png"

  - `items.virtual_prices.is_default` (boolean)
    商品价格是否为默认。
    Example: true

  - `items.virtual_prices.name` (string)
    虚拟货币名称。
    Example: "SHOTGUN FOR TRUE RAIDERS"

  - `items.virtual_prices.sku` (string)
    虚拟货币商品SKU。
    Example: "vc_test"

  - `items.virtual_prices.type` (string)
    虚拟货币类型。
    Example: "virtual_currency"


