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/ja/api/shop-builder/
https://store.xsolla.com/api/
個人用カタログ
ユーザー属性に応じたルールを指定することができるAPIです。 ユーザーが具体的なルールの条件をすべて満たした場合、パーソナライズされたアイテムが表示されます。
パーソナライズされたプロモーションについては、プロモーションセクションを参照してください。
購入前に属性を渡すには、Xsolla Login APIを使うか、Pay Station APIを使ってトークンを生成する際にそれをuser.attributesプロパティに渡します。
操作
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/coupon/code/{coupon_code}/rewards
- https://store.xsolla.com/api/v2/project/{project_id}/coupon/code/{coupon_code}/rewards
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/coupon/code/WINTER2021/rewards \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'レスポンス
application/json
{ "bonus": [ { … }, { … } ], "discount": { "percent": "10.00" }, "is_selectable": true }
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/coupon/redeem
- https://store.xsolla.com/api/v2/project/{project_id}/coupon/redeem
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/coupon/redeem \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"coupon_code": "WINTER2021",
"selected_unit_items": {
"game_1": "game_1_steam",
"game_2": "game_2_playstation"
}
}'クーポンは正常に引き換えされました。
例: [{"attributes":[],"description":"Take it, take it all! All of Xsolla's riches in one Mega Booster.","groups":[{"external_id":"powerups","name":"Power Ups"}],"image_url":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","is_free":false,"name":"Xsolla Booster Mega","price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"quantity":1,"sku":"com.xsolla.booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[]}]
レスポンス
application/json
{ "items": [ { … } ] }
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/{project_id}/admin/coupon
- https://store.xsolla.com/api/v3/project/{project_id}/admin/coupon
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/44056/admin/coupon?limit=50&offset=0'レスポンス
application/json
{ "active_promotions_count": 2, "inactive_promotions_count": 0, "items": [ { … }, { … } ], "total_promotions_count": 2 }