# 按指定组获取可售商品列表 从指定组获取用于构建目录的可售商品列表。 注意:所有项目对于可以在响应中获得的商品数量均都限制。默认值和最大值是每个响应50项。要逐页获取更多数据,请使用limit和offset字段。 注:使用商品目录API调用无需授权,但若需获取个性化目录,必须在Authorization头中传入用户JWT。 Endpoint: GET /v2/project/{project_id}/items/group/{external_id} Version: 2.0.0 Security: XsollaLoginUserJWT ## Path parameters: - `project_id` (integer, required) 项目ID。您可以在您的发布商帐户项目名称旁边找到。 Example: 59080 - `external_id` (string, required) 组外部ID。 ## 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":[],"can_be_bought":true,"description":"Electric shield","groups":[{"external_id":"armour","name":"Armour"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png","is_free":false,"item_id":259774,"limits":{"per_user":{"available":3,"limit_exceeded_visibility":"show","recurrent_schedule":{"interval_type":"weekly","reset_next_date":1746057600},"total":5}},"name":"Electric shield","price":{"amount":"9.99","amount_without_discount":"9.99","currency":"USD"},"promotions":[{"bonus":[{"image_url":"https://cdn.xsolla.net/img/misc/images/2fc5c491a47413a8e8000447889093c2.png","name":"Xsolla Minigun","quantity":1,"sku":"com.xsolla.minigun_1","type":"virtual_good"}],"date_end":"2026-04-15T16:16:00+03:00","date_start":"2020-04-15T16:16:00+03:00","discount":{"percent":"50.00"},"name":"Bonus promotion"}],"sku":"com.xsolla.electric_shield_1","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":10,"amount_without_discount":10,"calculated_price":{"amount":"10.00","amount_without_discount":"10.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_1","type":"virtual_currency"},{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_1","type":"virtual_currency"},{"amount":200,"amount_without_discount":200,"calculated_price":{"amount":"200.00","amount_without_discount":"200.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_1","type":"virtual_currency"}],"vp_rewards":[{"amount":130,"image_url":"https://cdn3.xsolla.com/img/misc/images/54c0cf9d345817cdacfdde198db178e0.jpg","item_id":175232,"name":"Value point","sku":"com.xsolla.value_point_1"},{"amount":50,"image_url":"https://cdn3.xsolla.com/img/misc/images/54c0cf9d345817cdacfdde198db178e0.jpg","is_clan":true,"item_id":186321,"name":"Clan Reward VP 1","sku":"clan_value_point_sku_1"}]},{"attributes":[],"can_be_bought":true,"description":"Royal shield","groups":[{"external_id":"armour","name":"Armour"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/ed417975312a52efeeab8b039ff25cb1.png","is_free":false,"item_id":259775,"name":"Royal shield","price":{"amount":"19.99","amount_without_discount":"19.99","currency":"USD"},"promotions":[],"sku":"com.xsolla.royal_shield_1","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_2","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_2","type":"virtual_currency"},{"amount":400,"amount_without_discount":400,"calculated_price":{"amount":"400.00","amount_without_discount":"400.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_2","type":"virtual_currency"}],"vp_rewards":[]},{"attributes":[],"can_be_bought":true,"description":"Ancient helmet","groups":[{"external_id":"armour","name":"Armour"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/e70e16d9626f435e519fc8e1cc1e7176.png","is_free":false,"item_id":259776,"name":"Ancient helmet","price":{"amount":"1.99","amount_without_discount":"1.99","currency":"USD"},"promotions":[{"bonus":[{"image_url":"https://cdn.xsolla.net/img/misc/images/2fc5c491a47413a8e8000447889093c2.png","name":"Xsolla Minigun","quantity":1,"sku":"com.xsolla.minigun_1","type":"virtual_good"}],"date_end":"2026-04-15T16:16:00+03:00","date_start":"2020-04-15T16:16:00+03:00","discount":{"percent":"50.00"},"name":"Bonus promotion"}],"sku":"com.xsolla.ancient_helmet_1","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":2,"amount_without_discount":2,"calculated_price":{"amount":"2.00","amount_without_discount":"2.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_3","type":"virtual_currency"},{"amount":4,"amount_without_discount":4,"calculated_price":{"amount":"4.00","amount_without_discount":"4.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_3","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_3","type":"virtual_currency"}],"vp_rewards":[]},{"attributes":[],"can_be_bought":true,"description":"Wooden helmet","groups":[{"external_id":"armour","name":"Armour"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/40d2812e52ad9d988ac20fc842fc66f0.png","is_free":false,"item_id":259777,"name":"Wooden helmet","price":{"amount":"0.99","amount_without_discount":"0.99","currency":"USD"},"promotions":[],"sku":"com.xsolla.wooden_helmet_1","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":1,"amount_without_discount":1,"calculated_price":{"amount":"1.00","amount_without_discount":"1.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_4","type":"virtual_currency"},{"amount":2,"amount_without_discount":2,"calculated_price":{"amount":"2.00","amount_without_discount":"2.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_4","type":"virtual_currency"},{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_4","type":"virtual_currency"}],"vp_rewards":[]}] - `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` (object) 属性名称。 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.can_be_bought` (boolean) 如为true,则用户可以购买商品。 Example: true - `items.custom_attributes` (object) 包含商品属性和值的JSON对象。 - `items.description` (string,null) 商品描述。 Example: "Electric shield" - `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://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png" - `items.is_free` (boolean) 如果为true,则该商品为免费。 - `items.item_id` (integer) 创建商品时提供的内部唯一商品ID。 Example: 259774 - `items.limits` (object,null) 商品限制。 - `items.limits.per_item` (object,null) 商品的购买限制。 - `items.limits.per_item.available` (integer) 所有用户可购买的剩余商品数量。 Example: 3 - `items.limits.per_item.total` (integer) 所有用户可购买的最大商品数量。 Example: 5 - `items.limits.per_user` (object,null) 一个用户的购买数量限制。 - `items.limits.per_user.available` (integer) 当前用户可购买的剩余商品数量。 Example: 3 - `items.limits.per_user.limit_exceeded_visibility` (string) 设定商品在达到购买限制后、下次限制重置前在目录中的可见性。 适用于在recurrent_schedule数组中配置了周期性重置数量限制的商品。 若未配置数量限制重置,则商品在达到购买限制后将不会出现在目录中,无论limit_exceeded_visibility值为何。 Enum: "show", "hide" - `items.limits.per_user.recurrent_schedule` (object) 用户的商品限制循环刷新周期。 - `items.limits.per_user.recurrent_schedule.interval_type` (string) 循环刷新周期类型。 Enum: "daily", "weekly", "monthly", "hourly" - `items.limits.per_user.recurrent_schedule.reset_next_date` (integer) 重置限制次数的日期和时间(Unix时间戳)。 Example: 1677553200 - `items.limits.per_user.total` (integer) 单个用户可购买的最大商品数量。 Example: 5 - `items.name` (string) 商品名称。 Example: "Electric shield" - `items.price` (object) 商品价格。 - `items.price.amount` (string) 折扣后的商品价格。 Example: "9.99" - `items.price.amount_without_discount` (string) 商品价格。 Example: "9.99" - `items.price.currency` (string) 商品价格货币。每[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)。 Example: "USD" - `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: "com.xsolla.electric_shield_1" - `items.type` (string) 商品类型:virtual_good/virtual_currency/bundle/game_key/physical_good。 Enum: "virtual_good", "virtual_currency", "bundle", "game_key", "physical_good" - `items.virtual_item_type` (string) 虚拟物品的类型。 Enum: "consumable", "non_consumable", "non_renewing_subscription" - `items.virtual_prices` (array) 虚拟价格。 - `items.virtual_prices.amount` (integer) 折扣后的商品虚拟货币价格。 Example: 10 - `items.virtual_prices.calculated_price` (object) - `items.virtual_prices.calculated_price.amount` (string) - `items.virtual_prices.calculated_price.amount_without_discount` (string) - `items.virtual_prices.description` (string,null) 虚拟货币说明。 - `items.virtual_prices.image_url` (string) Example: "https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png" - `items.virtual_prices.is_default` (boolean) 商品价格是否为默认。 Example: true - `items.virtual_prices.name` (string) 虚拟货币名称。 Example: "Gold" - `items.virtual_prices.sku` (string) 虚拟货币物品SKU。 Example: "com.xsolla.gold_1" - `items.virtual_prices.type` (string) 虚拟货币类型。 Example: "virtual_currency" - `items.vp_rewards` (array) 奖励积分商品奖励。 - `items.vp_rewards.amount` (integer) 奖励积分的数量。 - `items.vp_rewards.is_clan` (boolean) 该奖励积分是否用于公会奖励链。 Example: true - `items.vp_rewards.item_id` (integer) 内部唯一物品ID。 Example: 1 - `items.vp_rewards.name` (string) 奖励积分名称。 - `items.vp_rewards.sku` (string) 唯一奖励积分ID。 ## Response 404 fields (application/json): - `errorCode` (integer) Example: 4403 - `errorMessage` (string) Example: "[0401-4403]: Item group not found" - `statusCode` (integer) Example: 404