Shop Builder API (2.0.0)
- 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属性。
操作
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/{project_id}/items/game/group/{external_id}
- https://store.xsolla.com/api/v2/project/{project_id}/items/game/group/{external_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/items/game/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>'游戏列表已成功接收。
示例: [{"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"}]
响应
application/json
{ "has_more": false, "items": [ { … }, { … } ] }
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/{project_id}/items/game/key/group/{external_id}
- https://store.xsolla.com/api/v2/project/{project_id}/items/game/key/group/{external_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/items/game/key/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>'已成功接收游戏密钥列表。
示例: [{"attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]},{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"description":"Game description","drm_name":"Steam","drm_sku":"steam_key_1","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","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"},"release_date":"2020-08-11T10:00:00+03:00","sku":"com.xsolla.game_1","type":"game_key","virtual_prices":[]},{"attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]},{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"description":"Game description","drm_name":"Steam","drm_sku":"steam_key_2","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","periods":[],"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"release_date":null,"sku":"com.xsolla.game_2","type":"game_key","virtual_prices":[]}]
响应
application/json
{ "has_more": true, "items": [ { … }, { … } ] }
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/{project_id}/items/game/key/sku/{item_sku}
- https://store.xsolla.com/api/v2/project/{project_id}/items/game/key/sku/{item_sku}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/items/game/key/sku/{item_sku}?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>'已成功收到游戏密钥。
与商品对应的属性及其值的列表。可用于目录筛选。
默认值 []
示例: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
商品所属分组。
默认值 []
示例: [{"external_id":"exclusive","name":"Exclusive"}]
图像URL。
示例: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png"
应用于购物车中指定商品的促销活动。仅在以下情况下返回该数组:
为某商品配置了折扣促销活动。
应用了对所选商品提供折扣设置的促销码。
如果未应用任何商品级促销活动,则返回空数组。
响应
application/json
{ "attributes": [ { … }, { … } ], "can_be_bought": true, "description": "Game description", "drm_name": "Steam", "drm_sku": "steam_key_1", "groups": [ { … }, { … } ], "has_keys": true, "image_url": "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png", "is_free": false, "is_pre_order": true, "limits": null, "name": "Game name", "periods": [ { … } ], "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_1", "type": "game_key", "virtual_prices": [] }