- プロモーションコードを引き換える
コードのプロモーションコード制限を取得する
プロモーションコードのプロモーションをアクティブ化
プロモーションコードのプロモーション用のコードを取得
プロモーションコードのプロモーション用のコードを作成
プロモーションコードのプロモーション用のコードを生成
プロモーションコードのプロモーションを非アクティブ化
指定したユーザーのプロモーションコード上限を取得する
プロモーションコードの特典を入手
カートからプロモーションコードを削除
プロモーションコードのプロモーションのリストを取得
プロモーションコードのプロモーションを作成
プロモーションコードのプロモーションを削除
プロモーションコードのプロモーションを取得
プロモーションコードのプロモーションを更新
プロモーションコードを引き換える
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}/promocode/code/{promocode_code}/rewards
- https://store.xsolla.com/api/v2/project/{project_id}/promocode/code/{promocode_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/promocode/code/SO6rew99j9/rewards \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'レスポンス
application/json
{ "bonus": [ { … }, { … } ], "discount": { "percent": "10.00" }, "discounted_items": [ { … } ], "is_selectable": true }
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/promocode/redeem
- https://store.xsolla.com/api/v2/project/{project_id}/promocode/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/promocode/redeem \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cart": {
"id": "current"
},
"coupon_code": "SUMMER2021",
"selected_unit_items": {
"game_1": "game_1_steam",
"game_2": "game_2_playstation"
}
}'プロモーションコードは正常に引き換えされました。
例: [{"attributes":[],"can_be_bought":{"$ref":"../schemas/Can_be_bought.yaml"},"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,"limits":{"$ref":"../schemas/Catalog_item_limits.yaml"},"name":"Xsolla Booster Mega","periods":{"$ref":"../schemas/item-periods.yaml"},"price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"promotions":{"$ref":"../schemas/Catalog_item_promotions.yaml"},"quantity":123,"sku":"com.xsolla.booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[],"vp_rewards":{"$ref":"../schemas/reward-chain-client/client-item-value-point-reward.yaml"}}]
カート価格。
例: {"amount":"6150.0000000000000000","amount_without_discount":"6150.0000000000000000","currency":"USD"}
レスポンス
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ { … }, { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "12300.0000000000000000", "currency": "USD" }, "rewards": { "bonus": [ … ], "discount": { … }, "discounted_items": [ … ], "is_selectable": false } }
- Mock serverhttps://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/{project_id}/promocode/remove
- https://store.xsolla.com/api/v2/project/{project_id}/promocode/remove
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/promocode/remove \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"cart": {
"id": "current"
}
}'プロモーションコードは正常にキャンセルされました。
例: [{"attributes":[],"can_be_bought":true,"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,"limits":{"per_user":{"available":3,"recurrent_schedule":{"interval_type":"weekly","reset_next_date":1746057600},"total":5}},"name":"Xsolla Booster Mega","periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}],"price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","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"}],"quantity":123,"sku":"com.xsolla.booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","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"}]}]
レスポンス
application/json
{ "cart_id": "cart_id", "is_free": false, "items": [ { … } ], "price": { "amount": "6150.0000000000000000", "amount_without_discount": "6150.0000000000000000", "currency": "USD" } }