コンテンツへスキップ

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/shop-builder/
https://store.xsolla.com/api/
操作

個人用カタログ

ユーザー属性に応じたルールを指定することができるAPIです。 ユーザーが具体的なルールの条件をすべて満たした場合、パーソナライズされたアイテムが表示されます。

パーソナライズされたプロモーションについては、プロモーションセクションを参照してください。

購入前に属性を渡すには、Xsolla Login APIを使うか、Pay Station APIを使ってトークンを生成する際にそれをuser.attributesプロパティに渡します。

操作
操作
操作

カート(クライアント側)

操作

カート(サーバー側)

操作

決済(クライアント側)

操作

決済(サーバー側)

操作
操作

無料アイテム

操作

ウェブフック

操作
操作

マーチャント

操作

カタログ

このAPIは販売可能なアイテムや特定のアイテムを取得することができます。

操作

IDによる販売可能なアイテムを取得するClient-side

リクエスト

IDによる販売可能なアイテムを取得します。



このエンドポイントは認証なしでアクセスでき、一般的なデータを返します。しかし、認証は、利用可能なユーザー制限やプロモーションのような、パーソナライズされた結果のためのユーザー固有の詳細で応答の質を高めます。
セキュリティ
XsollaLoginUserJWT
パス
project_idinteger必須

プロジェクトID。このパラメータは、パブリッシャーアカウントのプロジェクト名の横にあります。

例: 59080
item_idstring必須

アイテムID。

例: 259774
クエリ
promo_codestring[ 1 .. 128 ] characters

大文字と小文字を区別する一意のコードです。文字と数字が含まれます。

例: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

ユーザーに利用可能でない、期限付きアイテムを表示します。このようなアイテムの有効期間はまだ開始されていないか、すでに期限切れです。

デフォルト 0
例: show_inactive_time_limited_items=1
additional_fields[]Array of strings

追加フィールドのリスト。これらのフィールドは、リクエストの中で送信すると、応答に含まれます。

アイテム 列挙型"media_list""order""long_description""custom_attributes""item_order_in_group"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/59080/items/id/259774?promo_code=WINTER2021&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

レスポンス

販売可能なアイテムが正常に受信されました。

ボディapplication/json
attributesArray of objects(Virtual-Items-Currency_client-attributes)

アイテムに対応する属性と値のリスト。カタログのフィルタリングに使用できます。

デフォルト []
例: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
can_be_boughtboolean

trueの場合、ユーザーはアイテムを購入することができます。

例: true
custom_attributesobject(json)(item-custom-attributes-response)

アイテムの属性と値を含むJSONオブジェクト。

descriptionstring

アイテムの説明。

例: "Electric shield"
groupsArray of objects(items_client_groups_response)

アイテムが所属するグループ。

デフォルト []
例: [{"external_id":"exclusive","name":"Exclusive"}]
image_urlstring

画像URL。

例: "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png"
is_freeboolean(value-is_free)

trueの場合で、アイテムは無料です。

デフォルト false
例: false
item_idinteger

アイテム作成時に付与される内部一意のアイテムID。

例: 259774
limitsobject or null(Catalog_item_limits)

アイテム制限。

namestring

アイテム名。

例: "Electric shield"
priceobject

アイテム価格。

promotionsArray of objects(Catalog_item_promotions)

カート内の特定アイテムに適用されるプロモーション。この配列は、以下のケースで返されます:

  • 特定のアイテムに対して、割引キャンペーンが構成されている場合。

  • 選択されたアイテムの割引設定を持つプロモーションコードが適用された場合。

アイテムレベルのプロモーションが適用されない場合は、空の配列が返されます。

skustring

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

例: "electric_shield"
typestring

アイテムタイプ:virtual_good/virtual_currency/bundle/game_key/physical_good

列挙型"virtual_good""virtual_currency""bundle""game_key""physical_good"
例: "virtual_good"
virtual_item_typestring

仮想アイテムタイプ。

列挙型 値説明
consumable

使用後にインベントリから消えるアイテム(例:弾丸)。

non_consumable

無期限でインベントリに保管できるアイテム。

non_renewing_subscription

期間限定のサービスやコンテンツへのアクセスを表すことができる時間制限のあるアイテム。

例: "non-consumable"
virtual_pricesArray of objects

仮想価格。

vp_rewardsArray of objects(client-item-value-point-reward)

バリューポイントアイテム報酬。

レスポンス
application/json
{ "attributes": [], "can_be_bought": true, "custom_attributes": { "attr": "value", "purchased": 0 }, "description": "Electric shield", "groups": [ {} ], "image_url": "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png", "is_free": false, "item_id": 259774, "limits": { "per_user": {} }, "name": "Electric shield", "price": { "amount": "9.99", "amount_without_discount": "9.99", "currency": "USD" }, "promotions": [ {} ], "sku": "com.xsolla.electric_shield_1", "type": "virtual_good", "virtual_item_type": "non_consumable", "virtual_prices": [ {}, {}, {} ], "vp_rewards": [ {}, {} ] }

SKUによる販売可能なアイテムを取得するClient-side

リクエスト

カタログを作成するためにSKUによる販売可能なアイテムを取得します。



このエンドポイントは認証なしでアクセスでき、一般的なデータを返します。しかし、認証は、利用可能なユーザー制限やプロモーションのような、パーソナライズされた結果のためのユーザー固有の詳細で応答の質を高めます。
セキュリティ
XsollaLoginUserJWT
パス
project_idinteger必須

プロジェクトID。このパラメータは、パブリッシャーアカウントのプロジェクト名の横にあります。

例: 59080
skustring必須

アイテムSKU。

例: electric_shield
クエリ
promo_codestring[ 1 .. 128 ] characters

大文字と小文字を区別する一意のコードです。文字と数字が含まれます。

例: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

ユーザーに利用可能でない、期限付きアイテムを表示します。このようなアイテムの有効期間はまだ開始されていないか、すでに期限切れです。

デフォルト 0
例: show_inactive_time_limited_items=1
additional_fields[]Array of strings

追加フィールドのリスト。これらのフィールドは、リクエストの中で送信すると、応答に含まれます。

アイテム 列挙型"media_list""order""long_description""custom_attributes""item_order_in_group"
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/59080/items/sku/electric_shield?promo_code=WINTER2021&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

レスポンス

販売可能なアイテムが正常に受信されました。

ボディapplication/json
attributesArray of objects(Virtual-Items-Currency_client-attributes)

アイテムに対応する属性と値のリスト。カタログのフィルタリングに使用できます。

デフォルト []
例: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
can_be_boughtboolean

trueの場合、ユーザーはアイテムを購入することができます。

例: true
custom_attributesobject(json)(item-custom-attributes-response)

アイテムの属性と値を含むJSONオブジェクト。

descriptionstring

アイテムの説明。

例: "Electric shield"
groupsArray of objects(items_client_groups_response)

アイテムが所属するグループ。

デフォルト []
例: [{"external_id":"exclusive","name":"Exclusive"}]
image_urlstring

画像URL。

例: "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png"
is_freeboolean(value-is_free)

trueの場合で、アイテムは無料です。

デフォルト false
例: false
item_idinteger

アイテム作成時に付与される内部一意のアイテムID。

例: 259774
limitsobject or null(Catalog_item_limits)

アイテム制限。

namestring

アイテム名。

例: "Electric shield"
priceobject

アイテム価格。

promotionsArray of objects(Catalog_item_promotions)

カート内の特定アイテムに適用されるプロモーション。この配列は、以下のケースで返されます:

  • 特定のアイテムに対して、割引キャンペーンが構成されている場合。

  • 選択されたアイテムの割引設定を持つプロモーションコードが適用された場合。

アイテムレベルのプロモーションが適用されない場合は、空の配列が返されます。

skustring

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

例: "electric_shield"
typestring

アイテムタイプ:virtual_good/virtual_currency/bundle/game_key/physical_good

列挙型"virtual_good""virtual_currency""bundle""game_key""physical_good"
例: "virtual_good"
virtual_item_typestring

仮想アイテムタイプ。

列挙型 値説明
consumable

使用後にインベントリから消えるアイテム(例:弾丸)。

non_consumable

無期限でインベントリに保管できるアイテム。

non_renewing_subscription

期間限定のサービスやコンテンツへのアクセスを表すことができる時間制限のあるアイテム。

例: "non-consumable"
virtual_pricesArray of objects

仮想価格。

vp_rewardsArray of objects(client-item-value-point-reward)

バリューポイントアイテム報酬。

レスポンス
application/json
{ "attributes": [], "can_be_bought": true, "custom_attributes": { "attr": "value", "purchased": 0 }, "description": "Electric shield", "groups": [ {} ], "image_url": "https://cdn3.xsolla.com/img/misc/images/d2d6b1b517e6a7f3765c3bb5a3cfb87d.png", "is_free": false, "item_id": 259774, "limits": { "per_user": {} }, "name": "Electric shield", "price": { "amount": "9.99", "amount_without_discount": "9.99", "currency": "USD" }, "promotions": [ {} ], "sku": "com.xsolla.electric_shield_1", "type": "virtual_good", "virtual_item_type": "non_consumable", "virtual_prices": [ {}, {}, {} ], "vp_rewards": [ {}, {} ] }
操作
操作
操作
操作
操作

クーポン

このAPIを使用すると、クーポンを管理できます。

操作

プロモーションコード

このAPI を使用すると、プロモーションコードを管理できます。

操作

ユニークなカタログオファー

このAPIを使用すると、ユニークなカタログオファーを管理することができます。

操作

ディスカウント

このAPIを使用すると、割引キャンペーンを管理することができます。

操作

ボーナス

このAPIを使用すると、ボーナスプロモーションを管理できます。

操作
操作
操作
操作
操作
操作

クライアント

操作

クランクライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作