# 获取游戏列表 获取用于构建目录的游戏列表。 注意:所有项目对于可以在响应中获得的商品数量均都限制。默认值和最大值是每个响应50项。要逐页获取更多数据,请使用limit和offset字段。 注:使用商品目录API调用无需授权,但若需获取个性化目录,必须在Authorization头中传入用户JWT。 Endpoint: GET /v2/project/{project_id}/items/game Version: 2.0.0 Security: XsollaLoginUserJWT ## Path parameters: - `project_id` (integer, required) 项目ID。您可以在您的发布商帐户项目名称旁边找到。 Example: 44056 ## Query parameters: - `limit` (integer) 页面上元素数量的限制。 Example: 50 - `offset` (integer) 元素编号,从该元素开始生成列表(从0开始数)。 - `locale` (string) 响应语言。按照ISO 639-1规定使用两个小写字母的语言代码。 - `additional_fields[]` (array) 附加字段列表。如果在请求中发送这些字段,则它们将包含在响应中。 Enum: "media_list", "order", "long_description", "custom_attributes", "item_order_in_group" - `country` (string) ISO 3166-1 alpha-2标准下的两个大写字母的国家/地区代码。 请查看文档详细了解艾克索拉支持的国家/地区和国家/地区的判断流程。 Example: "US" - `promo_code` (string) 区分大小写的唯一券码。包含字母和数字。 Example: "WINTER2021" - `show_inactive_time_limited_items` (integer) 显示用户不可用的时效性商品。此类商品的有效期尚未开始或已过期。 Example: 1 ## Response 200 fields (application/json): - `has_more` (boolean) 用作指示还有更多页面。 Example: true - `items` (array) Example: [{"attributes":[{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"description":"Game description","groups":[{"external_id":"all","name":"All games"},{"external_id":"Xsolla","name":"Xsolla games"}],"image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","name":"Game name","promotions":[],"sku":"com.xsolla.game_1","type":"unit","unit_items":[{"can_be_bought":true,"drm_name":"Steam","drm_sku":"steam_key_1","has_keys":true,"is_free":false,"is_pre_order":true,"periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}],"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"promotions":[],"release_date":"2020-08-11T10:00:00+03:00","sku":"com.xsolla.game_key_01","type":"game_key","virtual_prices":[]},{"can_be_bought":true,"drm_name":"Origin","drm_sku":"origin_key_1","has_keys":false,"is_free":false,"is_pre_order":false,"periods":[],"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"promotions":[],"release_date":null,"sku":"com.xsolla.game_key_02","type":"game_key","virtual_prices":[]}],"unit_type":"game"},{"attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]}],"description":"Game description","groups":[{"external_id":"all","name":"All games"}],"image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","name":"Game name","promotions":[],"sku":"com.xsolla.game_2","type":"unit","unit_items":[{"can_be_bought":true,"drm_name":"Steam","drm_sku":"steam_key_2","has_keys":false,"is_free":false,"is_pre_order":false,"periods":[{"date_from":null,"date_until":"2020-08-11T20:00:00+03:00"}],"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"promotions":[],"release_date":null,"sku":"com.xsolla.game_key_01","type":"game_key","virtual_prices":[]}],"unit_type":"game"}] - `items.attributes` (array) 与商品对应的属性及其值的列表。可用于目录筛选。 Example: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}} - `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.groups` (array) 商品所属分组。 Example: [{"external_id":"exclusive","name":"Exclusive"}] - `items.groups.external_id` (string) 组的唯一标识符,通常用于在API请求或外部系统中引用该组。 Example: "exclusive" - `items.groups.item_order_in_group` (integer) 商品在组中的位置,用于确定其显示顺序。 仅当通过additional_fields[]查询参数方式请求时,响应中才包含此字段。 Example: 1 - `items.groups.name` (string) 组名称。 Example: "Exclusive" - `items.image_url` (string) 图像URL。 Example: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png" - `items.name` (string) 商品名称。 Example: "Game name" - `items.promotions` (array) 应用于购物车中指定商品的促销活动。仅在以下情况下返回该数组: * 为某商品配置了折扣促销活动。 * 应用了对所选商品提供折扣设置的促销码。 如果未应用任何商品级促销活动,则返回空数组。 - `items.promotions.bonus` (array) - `items.promotions.bonus.bundle_type` (string) 奖励捆绑包商品类型。仅适用于bundle奖励品类型。 Enum: "standard", "virtual_currency_package" - `items.promotions.bonus.image_url` (string) 奖励商品图片URL。不适用于physical_good奖励品类型。 - `items.promotions.bonus.name` (string) 奖励品名称。不适用于physical_good奖励品类型。 - `items.promotions.bonus.quantity` (integer) - `items.promotions.bonus.sku` (string) - `items.promotions.bonus.type` (string) 奖励品类型。 Enum: "virtual_good", "virtual_currency", "bundle", "physical_good", "game_key", "nft" - `items.promotions.date_end` (string,null) - `items.promotions.date_start` (string,null) - `items.promotions.discount` (object,null) - `items.promotions.discount.percent` (string,null) - `items.promotions.discount.value` (string,null) - `items.promotions.limits` (object) - `items.promotions.limits.per_user` (object) - `items.promotions.limits.per_user.available` (integer) - `items.promotions.limits.per_user.total` (integer) - `items.promotions.name` (string) - `items.sku` (string) 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。 Example: "game_01" - `items.type` (string) 商品类型:virtual_good/virtual_currency/bundle/physical_good/unit。 Example: "unit" - `items.unit_items` (array) - `items.unit_items.can_be_bought` (boolean) 如为true,则用户可以购买商品。 Example: true - `items.unit_items.drm_name` (string) DRM名称。 Example: "Steam" - `items.unit_items.drm_sku` (string) 唯一DRM ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。 Example: "steam" - `items.unit_items.has_keys` (boolean) 如果为true,则游戏密钥有供销售的密钥。 - `items.unit_items.is_free` (boolean) 如果为true,则该商品为免费。 - `items.unit_items.is_pre_order` (boolean) 如果为true,则游戏密钥为预订,并且发布日期尚未到来。 Example: true - `items.unit_items.periods` (array,null) 商品促销时间段。 - `items.unit_items.periods.date_from` (string) 指定商品促销开始的日期。 Example: "2020-08-11T10:00:00+03:00" - `items.unit_items.periods.date_until` (string,null) 指定商品停止促销的日期。可以为null。 Example: "2020-08-11T20:00:00+03:00" - `items.unit_items.price` (object) 商品价格。 - `items.unit_items.price.amount` (string) 折扣后的商品价格。 Example: "2.9900" - `items.unit_items.price.amount_without_discount` (string) 商品价格。 Example: "2.9900" - `items.unit_items.price.currency` (string) 商品价格货币。每[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)。 Example: "USD" - `items.unit_items.release_date` (string,null) 游戏密钥发行日期按照ISO 8601规定的格式。 Example: "2020-08-11T10:00:00+03:00" - `items.unit_items.type` (string) 商品类型:game_key。 Example: "game_key" - `items.unit_items.virtual_prices` (array) 虚拟价格。 - `items.unit_items.virtual_prices.amount` (integer) 折扣后的商品虚拟货币价格。 Example: 100 - `items.unit_items.virtual_prices.description` (string) 虚拟货币说明。 Example: "Big Rocket - description" - `items.unit_items.virtual_prices.image_url` (string) 虚拟货币图像。 Example: "http://image.png" - `items.unit_items.virtual_prices.is_default` (boolean) 商品价格是否为默认。 Example: true - `items.unit_items.virtual_prices.name` (string) 虚拟货币名称。 Example: "SHOTGUN FOR TRUE RAIDERS" - `items.unit_items.virtual_prices.sku` (string) 虚拟货币物品SKU。 Example: "vc_test" - `items.unit_items.virtual_prices.type` (string) 虚拟货币类型。 Example: "virtual_currency" - `items.unit_items.vp_rewards` (array) 奖励积分商品奖励。 - `items.unit_items.vp_rewards.amount` (integer) 奖励积分的数量。 - `items.unit_items.vp_rewards.is_clan` (boolean) 该奖励积分是否用于公会奖励链。 Example: true - `items.unit_items.vp_rewards.item_id` (integer) 内部唯一物品ID。 Example: 1 - `items.unit_items.vp_rewards.name` (string) 奖励积分名称。 - `items.unit_items.vp_rewards.sku` (string) 唯一奖励积分ID。 - `items.unit_type` (string) 单位类型:game。 Example: "game"