跳转到内容

Overview

  • Version: 2.0.0
  • Servers: https://store.xsolla.com/api
  • Contact Us by Email
  • Contact URL: https://xsolla.com/
  • Required TLS version: 1.2

Shop Builder API provides a third-party solution for implementing the server side for your store interface. Use the endpoints to manage in-game items, in-game currencies, cart, player inventory, promotions, game library, etc.

下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/shop-builder/
https://store.xsolla.com/api/
操作

个性化目录

此API可让您针对用户属性指定规则。如果用户满足具体规则的所有条件,则会显示个性化商品。

有关个性化促销活动的信息,请参阅促销活动部分

要在购买前传递属性,您可以使用艾克索拉Login API或在使Pay Station API生成令牌时将它们传入user.attributes属性

操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作

目录

本API允许获取任意类型的可售商品或指定商品。

操作

获取可售商品列表Client-side

请求

获取用于构建目录的可售商品列表。

注意:

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

注:

使用商品目录API调用无需授权,但若需获取个性化目录,必须在Authorization头中传入用户JWT。
安全
XsollaLoginUserJWT
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 59080
查询
limitinteger>= 1

页面上元素数量的限制。

示例: limit=50
offsetinteger>= 0

元素编号,从该元素开始生成列表(从0开始数)。

示例: offset=0
localestring

响应语言。按照ISO 639-1规定使用两个小写字母的语言代码。

默认值 "en"
additional_fields[]Array of strings

附加字段列表。如果在请求中发送这些字段,则它们将包含在响应中。

枚举"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

ISO 3166-1 alpha-2标准下的两个大写字母的国家/地区代码。 请查看文档详细了解艾克索拉支持的国家/地区国家/地区的判断流程

示例: country=US
promo_codestring[ 1 .. 128 ] characters

区分大小写的唯一券码。包含字母和数字。

示例: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

显示用户不可用的时效性商品。此类商品的有效期尚未开始或已过期。

默认值 0
示例: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/59080/items?limit=50&offset=0&locale=en&additional_fields%5B%5D=media_list&country=US&promo_code=WINTER2021&show_inactive_time_limited_items=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

响应

已成功接收可售商品列表。

正文application/json
has_moreboolean(Pagination_has-more)

用作指示还有更多页面。

示例: true
itemsArray of objects
示例: [{"attributes":[],"can_be_bought":true,"description":"","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_free":false,"item_id":259765,"limits":{"per_user":{"available":3,"limit_exceeded_visibility":"show","recurrent_schedule":{"interval_type":"weekly","reset_next_date":1746057600},"total":5}},"name":"Gold","price":{"amount":"1.00","amount_without_discount":"1.00","currency":"USD"},"sku":"com.xsolla.gold_1","type":"virtual_currency","virtual_prices":[],"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":"com.xsolla.clan_value_point_1"}]},{"attributes":[],"can_be_bought":true,"description":"","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_free":false,"item_id":259766,"limits":null,"name":"Silver","price":{"amount":"0.50","amount_without_discount":"0.50","currency":"USD"},"sku":"com.xsolla.silver_1","type":"virtual_currency","virtual_prices":[],"vp_rewards":[]},{"attributes":[],"can_be_bought":true,"description":"","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_free":false,"item_id":259767,"limits":null,"name":"Bronze","price":{"amount":"0.10","amount_without_discount":"0.10","currency":"USD"},"sku":"com.xsolla.bronze_1","type":"virtual_currency","virtual_prices":[],"vp_rewards":[]},{"attributes":[],"bundle_type":"virtual_currency_package","can_be_bought":true,"content":[{"description":null,"image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","item_id":259765,"name":"Gold","quantity":10,"sku":"com.xsolla.gold_1","type":"virtual_currency"}],"description":"Chest of gold","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/61b8d0785093017ce1f50ebed55c42a9.png","is_free":false,"item_id":259768,"limits":null,"name":"Chest of gold","price":{"amount":"7.99","amount_without_discount":"7.99","currency":"USD"},"sku":"com.xsolla.gold_chest_1","type":"bundle","virtual_prices":[],"vp_rewards":[]},{"attributes":[],"bundle_type":"virtual_currency_package","can_be_bought":true,"content":[{"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","item_id":259766,"name":"Silver","quantity":50,"sku":"com.xsolla.silver_1","type":"virtual_currency"}],"description":"Chest of silver","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/f0b59a3370404e8881107249051b70bd.png","is_free":false,"item_id":259769,"limits":null,"name":"Chest of silver","price":{"amount":"19.99","amount_without_discount":"19.99","currency":"USD"},"sku":"com.xsolla.silver_chest_1","type":"bundle","virtual_prices":[],"vp_rewards":[]},{"attributes":[],"bundle_type":"virtual_currency_package","can_be_bought":true,"content":[{"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","item_id":259767,"name":"Bronze","quantity":100,"sku":"com.xsolla.bronze_2","type":"virtual_currency"}],"description":"Chest of bronze","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/b32eb5b1f4f0c202ea6ac4e21c2eae18.png","is_free":false,"item_id":259770,"limits":null,"name":"Chest of bronze","price":{"amount":"5.99","amount_without_discount":"5.99","currency":"USD"},"sku":"com.xsolla.bronze_chest_1","type":"bundle","virtual_prices":[],"vp_rewards":[]},{"attributes":[],"can_be_bought":true,"description":"Sword","groups":[{"external_id":"swords","name":"Swords"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/a558727a420cad609556e4449b9ecb12.png","is_free":false,"item_id":259771,"limits":null,"name":"Sword","price":{"amount":"1.99","amount_without_discount":"1.99","currency":"USD"},"sku":"com.xsolla.sword_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":"","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":5,"amount_without_discount":5,"calculated_price":{"amount":"5.00","amount_without_discount":"5.00"},"description":"","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":50,"amount_without_discount":50,"calculated_price":{"amount":"50.00","amount_without_discount":"50.00"},"description":"","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":"Saber","groups":[{"external_id":"swords","name":"Swords"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/edd914d60301d77b94926478d253fcb6.png","is_free":false,"item_id":259772,"limits":null,"name":"Saber","price":{"amount":"3.99","amount_without_discount":"3.99","currency":"USD"},"sku":"com.xsolla.saber_1","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":3,"amount_without_discount":3,"calculated_price":{"amount":"3.00","amount_without_discount":"3.00"},"description":"","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":7,"amount_without_discount":7,"calculated_price":{"amount":"7.00","amount_without_discount":"7.00"},"description":"","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":70,"amount_without_discount":70,"calculated_price":{"amount":"70.00","amount_without_discount":"70.00"},"description":"","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":"Bow","groups":[{"external_id":"bows","name":"Bows"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/3bb3b0a5254ad15134c891108898363f.png","is_free":false,"item_id":259773,"limits":null,"name":"Bow","price":{"amount":"4.99","amount_without_discount":"4.99","currency":"USD"},"sku":"com.xsolla.bow_1","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":5,"amount_without_discount":5,"calculated_price":{"amount":"5.00","amount_without_discount":"5.00"},"description":"","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":10,"amount_without_discount":10,"calculated_price":{"amount":"10.00","amount_without_discount":"10.00"},"description":"","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":100,"amount_without_discount":100,"calculated_price":{"amount":"100.00","amount_without_discount":"100.00"},"description":"","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":[]},{"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,"name":"Electric shield","price":{"amount":"9.99","amount_without_discount":"9.99","currency":"USD"},"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":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_5","type":"virtual_currency"},{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_5","type":"virtual_currency"},{"amount":200,"amount_without_discount":200,"calculated_price":{"amount":"200.00","amount_without_discount":"200.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_5","type":"virtual_currency"}],"vp_rewards":[]},{"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"},"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":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_6","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_6","type":"virtual_currency"},{"amount":400,"amount_without_discount":400,"calculated_price":{"amount":"400.00","amount_without_discount":"400.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_6","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"},"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":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_7","type":"virtual_currency"},{"amount":4,"amount_without_discount":4,"calculated_price":{"amount":"4.00","amount_without_discount":"4.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_7","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_7","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"},"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":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_8","type":"virtual_currency"},{"amount":2,"amount_without_discount":2,"calculated_price":{"amount":"2.00","amount_without_discount":"2.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_8","type":"virtual_currency"},{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_8","type":"virtual_currency"}],"vp_rewards":[]},{"attributes":[],"bundle_type":"standard","can_be_bought":true,"content":[{"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,"name":"Electric shield","price":{"amount":"9.99","amount_without_discount":"9.99","currency":"USD"},"quantity":1,"sku":"com.xsolla.electric_shield_2","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":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_10","type":"virtual_currency"},{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_10","type":"virtual_currency"},{"amount":200,"amount_without_discount":200,"calculated_price":{"amount":"200.00","amount_without_discount":"200.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_10","type":"virtual_currency"}]},{"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"},"quantity":1,"sku":"com.xsolla.ancient_helmet_2","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":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_11","type":"virtual_currency"},{"amount":4,"amount_without_discount":4,"calculated_price":{"amount":"4.00","amount_without_discount":"4.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_11","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_11","type":"virtual_currency"}]}],"description":"Chest of armour","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/5212202f9b8c9dbd254652d6cbeba03e.png","is_free":false,"item_id":259778,"name":"Chest of armor","price":{"amount":"19.99","amount_without_discount":"19.99","currency":"USD"},"sku":"com.xsolla.armor_chest_1","total_content_price":{"amount":"11.98","amount_without_discount":"11.98","currency":"USD"},"type":"bundle","virtual_prices":[{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_9","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_9","type":"virtual_currency"},{"amount":400,"amount_without_discount":400,"calculated_price":{"amount":"400.00","amount_without_discount":"400.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_9","type":"virtual_currency"}],"vp_rewards":[]},{"attributes":[],"bundle_type":"standard","can_be_bought":true,"content":[{"attributes":[],"can_be_bought":true,"description":"Saber","groups":[{"external_id":"swords","name":"Swords"}],"image_url":"https://cdn3.xsolla.com/img/misc/images/edd914d60301d77b94926478d253fcb6.png","is_free":false,"item_id":259772,"name":"Saber","price":{"amount":"3.99","amount_without_discount":"3.99","currency":"USD"},"quantity":1,"sku":"com.xsolla.saber_2","type":"virtual_good","virtual_item_type":"non_consumable","virtual_prices":[{"amount":3,"amount_without_discount":3,"calculated_price":{"amount":"3.00","amount_without_discount":"3.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_13","type":"virtual_currency"},{"amount":7,"amount_without_discount":7,"calculated_price":{"amount":"7.00","amount_without_discount":"7.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_13","type":"virtual_currency"},{"amount":70,"amount_without_discount":70,"calculated_price":{"amount":"70.00","amount_without_discount":"70.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_13","type":"virtual_currency"}]},{"attributes":[],"bundle_type":"virtual_currency_package","can_be_bought":true,"content":[{"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","item_id":259766,"name":"Silver","quantity":50,"sku":"com.xsolla.silver_14","type":"virtual_currency"}],"description":"Chest of silver","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/f0b59a3370404e8881107249051b70bd.png","is_free":false,"item_id":259769,"name":"Chest of silver","price":{"amount":"19.99","amount_without_discount":"19.99","currency":"USD"},"quantity":10,"sku":"com.xsolla.silver_chest_2","type":"bundle","virtual_prices":[]},{"attributes":[],"bundle_type":"virtual_currency_package","can_be_bought":true,"content":[{"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","item_id":259767,"name":"Bronze","quantity":100,"sku":"com.xsolla.bronze_11","type":"virtual_currency"}],"description":"Chest of bronze","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/b32eb5b1f4f0c202ea6ac4e21c2eae18.png","is_free":false,"item_id":259770,"name":"Chest of bronze","price":{"amount":"5.99","amount_without_discount":"5.99","currency":"USD"},"quantity":100,"sku":"com.xsolla.bronze_chest_2","type":"bundle","virtual_prices":[]}],"description":"Treasure Chest","groups":[],"image_url":"https://cdn3.xsolla.com/img/misc/images/7b1c0136d91398f9ab17924deee5eeec.png","is_free":false,"item_id":259779,"name":"Treasure Chest","price":{"amount":"9.99","amount_without_discount":"9.99","currency":"USD"},"sku":"com.xsolla.treasure_chest_1","total_content_price":{"amount":"802.89","amount_without_discount":"802.89","currency":"USD"},"type":"bundle","virtual_prices":[{"amount":10,"amount_without_discount":10,"calculated_price":{"amount":"10.00","amount_without_discount":"10.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/e2e9ce8b00eb0190c161c4258b899101.png","is_default":true,"item_id":259765,"name":"Gold","sku":"com.xsolla.gold_12","type":"virtual_currency"},{"amount":20,"amount_without_discount":20,"calculated_price":{"amount":"20.00","amount_without_discount":"20.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/015e4f4ea4deb1e2c92d5c21a4d58309.png","is_default":false,"item_id":259766,"name":"Silver","sku":"com.xsolla.silver_12","type":"virtual_currency"},{"amount":40,"amount_without_discount":40,"calculated_price":{"amount":"40.00","amount_without_discount":"40.00"},"description":"","image_url":"https://cdn3.xsolla.com/img/misc/images/b0beedd5763b612bd3a5631e6cb1d1ff.png","is_default":false,"item_id":259767,"name":"Bronze","sku":"com.xsolla.bronze_12","type":"virtual_currency"}],"vp_rewards":[]}]
响应
application/json
{ "has_more": false, "items": [ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} ] }

按指定组获取可售商品列表Client-side

请求

从指定组获取用于构建目录的可售商品列表。

注意:

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

注:

使用商品目录API调用无需授权,但若需获取个性化目录,必须在Authorization头中传入用户JWT。
安全
XsollaLoginUserJWT
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 59080
external_idstring必需

组外部ID。

默认值 "armour"
查询
limitinteger>= 1

页面上元素数量的限制。

示例: limit=50
offsetinteger>= 0

元素编号,从该元素开始生成列表(从0开始数)。

示例: offset=0
localestring

响应语言。按照ISO 639-1规定使用两个小写字母的语言代码。

默认值 "en"
additional_fields[]Array of strings

附加字段列表。如果在请求中发送这些字段,则它们将包含在响应中。

枚举"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

ISO 3166-1 alpha-2标准下的两个大写字母的国家/地区代码。 请查看文档详细了解艾克索拉支持的国家/地区国家/地区的判断流程

示例: country=US
promo_codestring[ 1 .. 128 ] characters

区分大小写的唯一券码。包含字母和数字。

示例: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

显示用户不可用的时效性商品。此类商品的有效期尚未开始或已过期。

默认值 0
示例: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/59080/items/group/{external_id}?limit=50&offset=0&locale=en&additional_fields%5B%5D=media_list&country=US&promo_code=WINTER2021&show_inactive_time_limited_items=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

响应

已成功接收指定组的可售商品列表。

正文application/json
has_moreboolean(Pagination_has-more)

用作指示还有更多页面。

示例: true
itemsArray of objects
示例: [{"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":[]}]
响应
application/json
{ "has_more": true, "items": [ {}, {}, {}, {} ] }

按ID获取可售商品Client-side

请求

按ID获取可售商品。

注:

此端点无需授权即可访问,返回通用数据。但是授权后可以通过用户详细信息来丰富响应,获得个性化结果,例如适用的用户限制和促销活动等。
安全
XsollaLoginUserJWT
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 59080
item_idstring必需

物品ID。

示例: 259774
查询
promo_codestring[ 1 .. 128 ] characters

区分大小写的唯一券码。包含字母和数字。

示例: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

显示用户不可用的时效性商品。此类商品的有效期尚未开始或已过期。

默认值 0
示例: show_inactive_time_limited_items=1
additional_fields[]Array of strings

附加字段列表。如果在请求中发送这些字段,则它们将包含在响应中。

枚举"media_list""order""long_description""custom_attributes""item_order_in_group"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/59080/items/id/259774?promo_code=WINTER2021&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

响应

已成功接收可售商品。

正文application/json
attributesArray of objects(Virtual-Items-Currency_client-attributes)

与商品对应的属性及其值的列表。可用于目录筛选。

默认值 []
示例: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
can_be_boughtboolean

如为true,则用户可以购买商品。

示例: true
custom_attributesobject(json)(item-custom-attributes-response)

包含商品属性和值的JSON对象。

descriptionstring

商品描述。

示例: "Electric shield"
groupsArray of objects(items_client_groups_response)

商品所属分组。

默认值 []
示例: [{"external_id":"exclusive","name":"Exclusive"}]
image_urlstring

图像URL。

示例: "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png"
is_freeboolean(value-is_free)

如果为true,则该商品为免费。

默认值 false
示例: false
item_idinteger

创建商品时提供的内部唯一商品ID。

示例: 259774
limitsobject or null(Catalog_item_limits)

商品限制。

namestring

商品名称。

示例: "Electric shield"
priceobject

商品价格。

promotionsArray of objects(Catalog_item_promotions)

应用于购物车中指定商品的促销活动。仅在以下情况下返回该数组:

  • 为某商品配置了折扣促销活动。

  • 应用了对所选商品提供折扣设置的促销码。

如果未应用任何商品级促销活动,则返回空数组。

skustring

唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。

示例: "electric_shield"
typestring

商品类型:virtual_good/virtual_currency/bundle/game_key/physical_good

枚举"virtual_good""virtual_currency""bundle""game_key""physical_good"
示例: "virtual_good"
virtual_item_typestring

虚拟物品的类型。

枚举 值描述
consumable

使用后从物品库中消失的物品(例如弹药)。

non_consumable

无限期地留在物品库中的物品。

non_renewing_subscription

时效性商品,代表在有限时间内对服务或内容的访问权限。

示例: "non-consumable"
virtual_pricesArray of objects

虚拟价格。

vp_rewardsArray of objects(client-item-value-point-reward)

奖励积分商品奖励。

响应
application/json
{ "attributes": [], "can_be_bought": true, "custom_attributes": { "attr": "value", "purchased": 0 }, "description": "Electric shield", "groups": [ {} ], "image_url": "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png", "is_free": false, "item_id": 259774, "limits": { "per_user": {} }, "name": "Electric shield", "price": { "amount": "9.99", "amount_without_discount": "9.99", "currency": "USD" }, "promotions": [ {} ], "sku": "com.xsolla.electric_shield_1", "type": "virtual_good", "virtual_item_type": "non_consumable", "virtual_prices": [ {}, {}, {} ], "vp_rewards": [ {}, {} ] }
操作
操作
操作
操作
操作

优惠券

此API让您可以管理优惠券。

操作

促销码

此API让您可以管理促销码。

操作

特别目录优惠

此API让您可以管理特别目录优惠活动。

操作

折扣

此API让您可以管理折扣促销活动。

操作

奖励

此API让您可以管理奖励促销活动。

操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作