# 获取用于目录的游戏

获取用于目录的游戏。

Endpoint: GET /v2/project/{project_id}/items/game/sku/{item_sku}
Version: 1.0.0
Security: AuthForClient

## Path parameters:

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

  - `item_sku` (string, required)
    商品SKU。
    Example: "booster_mega_1"

## Query parameters:

  - `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):

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

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

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

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

  - `attributes.values` (array)

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

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

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

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

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

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

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

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

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

  - `type` (string)
    商品类型：virtual_good/virtual_currency/bundle/physical_good/unit。
    Example: "unit"

  - `unit_items` (array)
    Example: [{"drm_name":"Steam","drm_sku":"steam","has_keys":true,"is_free":false,"is_pre_order":true,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"release_date":"2020-08-11T10:00:00+03:00","sku":"game_key_01","type":"game_key","virtual_prices":[]},{"drm_name":"Origin","drm_sku":"origin","has_keys":false,"is_free":false,"is_pre_order":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"sku":"game_key_02","type":"game_key","virtual_prices":[]}]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  - `unit_type` (string)
    单位类型：game。
    Example: "game"

## Response 404 fields (application/json):

  - `errorCode` (integer)
    Example: 4001

  - `errorMessage` (string)
    Example: "[0401-4001]: Item with sku = 'game_1' not found"

  - `statusCode` (integer)
    Example: 404


