コンテンツへスキップ

Shop Builder API (2.0.0)

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/ja/api/deprecated/inventory/
https://store.xsolla.com/api/

クライアント

操作

アイテムを消費するClient-side

リクエスト

クライアントエンドポイント。現在のユーザーインベントリからアイテムを消費します。

セキュリティ
XsollaLoginUserJWT
パス
project_idinteger必須

プロジェクトID。

デフォルト 44056
クエリ
platformstring

ユーザーがプレイするパブリッシングプラットフォーム。

デフォルト "xsolla"
列挙型"playstation_network""xbox_live""xsolla""pc_standalone""nintendo_shop""google_play""app_store_ios""android_standalone""ios_standalone""android_other"
ボディapplication/json
quantitynumber必須

アイテム数量。

デフォルト 1
例: 1
skustring必須

一意のアイテムID。SKUには、小文字と大文字のラテン英数字、ピリオド、ダッシュ、およびアンダースコアのみが含まれます。

デフォルト "booster_mega_1"
例: "booster_mega_1"
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/ja/api/deprecated/inventory/v2/project/{project_id}/user/inventory/item/consume?platform=playstation_network' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "quantity": 1,
    "sku": "booster_mega_1"
  }'

レスポンス

ユーザーインベントリからアイテムが消費されました。

レスポンス
コンテンツなし

現在のユーザーインベントリーを取得するClient-side

リクエスト

クライアントエンドポイント。現在のユーザーインベントリを取得します。

注意

すべてのプロジェクトには、回答で得られるアイテムの数に制限があります。初期値および最大値は、1応答あたり50アイテムです。ページごとにより多くのデータを取得するには、LIMITOFFSETフィールドを使用してください。
セキュリティ
XsollaLoginUserJWT
パス
project_idinteger必須

プロジェクトID。このパラメータは、ドメインページのプロジェクト名の横にあります。

例: 44056
クエリ
limitinteger>= 1

ページでの要素数の制限。

例: limit=50
offsetinteger>= 0

リストが生成される要素番号(カウントは0から始まります)。

例: offset=0
platformstring

ユーザーがプレイするパブリッシングプラットフォーム。

デフォルト "xsolla"
列挙型"playstation_network""xbox_live""xsolla""pc_standalone""nintendo_shop""google_play""app_store_ios""android_standalone""ios_standalone""android_other"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/deprecated/inventory/v2/project/44056/user/inventory/items?limit=50&offset=0&platform=playstation_network' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

レスポンス

ユーザーインベントリが正常に取得されました。

ボディapplication/json
itemsArray of objects
例: [{"attributes":[],"description":"Big Rocket - short description","groups":[],"image_url":"https://picture.bigrocket.png","instance_id":null,"name":"Rocket","quantity":null,"remaining_uses":1,"sku":"com.xsolla.instanciated_item_1","type":"virtual_good","virtual_item_type":"non_consumable"},{"attributes":[],"description":"description","groups":[],"image_url":"http://image.png","instance_id":null,"name":"SHOTGUN FOR TRUE RAIDERS","quantity":2,"remaining_uses":1,"sku":"com.xsolla.shotgun_raider_1","type":"virtual_good","virtual_item_type":"non_consumable"},{"attributes":[{"external_id":"stack_size","name":"Stack size","values":[{"external_id":"stack_size_value_99c25352ab6e34a0e0755fc2a9daa7a76021dce2","value":5}]},{"external_id":"licensed","name":"Licensed","values":[{"external_id":"licensed_value_d75d8034dd2f82cb3d2789f5ec1837a6c350b505","value":true}]}],"description":null,"groups":[],"image_url":null,"instance_id":null,"name":"HEADPHONES","quantity":5,"remaining_uses":1,"sku":"com.xsolla.headphones_for_pro_1","type":"virtual_good","virtual_item_type":"non_consumable"},{"attributes":[],"description":null,"groups":[],"image_url":null,"instance_id":null,"name":"UNIQUE DIAMONDS","quantity":100,"remaining_uses":1,"sku":"com.xsolla.platform_currency_1","type":"virtual_currency"}]
レスポンス
application/json
{ "items": [ {}, {}, {}, {} ] }

現在のユーザーの時間制限のあるアイテムを取得するClient-side

リクエスト

クライアントエンドポイント。現在のユーザーの時間制限のあるイテムを取得します。

セキュリティ
XsollaLoginUserJWT
パス
project_idinteger必須

プロジェクトID。

デフォルト 44056
クエリ
platformstring

ユーザーがプレイするパブリッシングプラットフォーム。

デフォルト "xsolla"
列挙型"playstation_network""xbox_live""xsolla""pc_standalone""nintendo_shop""google_play""app_store_ios""android_standalone""ios_standalone""android_other"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/deprecated/inventory/v2/project/{project_id}/user/time_limited_items?platform=playstation_network' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

レスポンス

ユーザーの期間限定アイテムが正常に取得されました。

ボディapplication/json
itemsArray of objects
例: [{"amount":10,"description":"Ruble","image_url":"https://picture.bigrocket.png","name":"Ruble","sku":"com.xsolla.VC_1","type":"virtual_currency","virtual_item_type":"non_renewing_subscription"},{"amount":5000,"description":"Xsollar","image_url":"http://image.png","name":"Xsollar","sku":"com.xsolla.VC_2","type":"virtual_currency","virtual_item_type":"non_renewing_subscription"}]
レスポンス
application/json
{ "items": [ {}, {}, {} ] }

現在のユーザーの仮想残高を取得Client-side

リクエスト

クライアントエンドポイント。現在のユーザーの仮想残高を取得します。

セキュリティ
XsollaLoginUserJWT
パス
project_idinteger必須

プロジェクトID。

デフォルト 44056
クエリ
platformstring

ユーザーがプレイするパブリッシングプラットフォーム。

デフォルト "xsolla"
列挙型"playstation_network""xbox_live""xsolla""pc_standalone""nintendo_shop""google_play""app_store_ios""android_standalone""ios_standalone""android_other"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/deprecated/inventory/v2/project/{project_id}/user/virtual_currency_balance?platform=playstation_network' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

レスポンス

ユーザーの仮想残高は正常に取得されました。

ボディapplication/json
itemsArray of objects
例: [{"description":"The PLEX or “30-day Pilot's License EXtension” is a virtual item that represents 30 days of subscription time and can be bought for cash and then sold to other players for in-game ISK.","expired_at":1746057600,"image_url":"https://picture.bigrocket.png","name":"PLEX","sku":"com.xsolla.plex_1","status":"active","type":"virtual_good","virtual_item_type":"non_renewing_subscription"},{"description":"WoW token allows players to buy game time World of Warcraft for money and sell it for game gold at auction.","expired_at":1546304461,"image_url":"https://picture.bigrocket.png","name":"WoW Token","sku":"com.xsolla.token_1","status":"expired","type":"virtual_good","virtual_item_type":"non_renewing_subscription"}]
レスポンス
application/json
{ "items": [ {}, {} ] }
操作

クロスインベントリ

操作