- プロモーションコードの特典を入手
コードのプロモーションコード制限を取得する
プロモーションコードのプロモーションをアクティブ化
プロモーションコードのプロモーション用のコードを取得
プロモーションコードのプロモーション用のコードを作成
プロモーションコードのプロモーション用のコードを生成
プロモーションコードのプロモーションを非アクティブ化
指定したユーザーのプロモーションコード上限を取得する
プロモーションコードを引き換える
カートからプロモーションコードを削除
プロモーションコードのプロモーションのリストを取得
プロモーションコードのプロモーションを作成
プロモーションコードのプロモーションを削除
プロモーションコードのプロモーションを取得
プロモーションコードのプロモーションを更新
プロモーションコードの特典を入手
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}/admin/user/limit/promocode/external_id/{external_id}
- https://store.xsolla.com/api/v2/project/{project_id}/admin/user/limit/promocode/external_id/{external_id}
- 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/v2/project/44056/admin/user/limit/promocode/external_id/coupon_44056_1?user_external_id=d342dad2-9d59-11e9-a384-42010aa8003f'レスポンス
application/json
{ "per_user": { "available": 9, "total": 10 } }
- 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 } }