コンテンツへスキップ

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プロパティに渡します。

操作

カタログフィルタルールのリストを取得Server-sideAdmin

リクエスト

ユーザー属性に適用されるすべてのルールを取得します。

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

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

例: 44056
クエリ
limitinteger>= 1

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

例: limit=50
offsetinteger>= 0

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

例: offset=0
is_enabledinteger

is_enabledフラグで要素を絞り込みます。

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/admin/user/attribute/rule?limit=50&offset=0&is_enabled=0'

レスポンス

ルールが正常に受信されました。

ボディapplication/json
has_moreboolean

ルールのある別のページが存在する場合。

itemsArray of objects(user-attribute_personalized-catalog)
total_items_countnumber

ルールの合計数。

レスポンス
application/json
{ "has_more": true, "items": [ {} ], "total_items_count": 20 }

カタログフィルタルールを作成Server-sideAdmin

リクエスト

ユーザー属性のルールを作成します。

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

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

例: 44056
ボディapplication/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(personalized-catalog_user-attribute_conditions_model-post)[ 1 .. 100 ] items必須

ユーザー属性を検証するための条件。 ユーザー属性が指定されたすべての条件に一致するかどうかに基づいて、カタログ内のアイテムの可用性を決定します。

One of:
attribute_conditions[].​attributestring(user-attribute_conditions_properties_attribute)[ 1 .. 255 ] characters^[-_.\d\w]+$必須

ユーザー属性コード。

attribute_conditions[].​can_be_missingboolean(user-attribute_conditions_properties_can_be_missing)

ユーザー属性に属性がない場合でも条件を満たすことを示します。trueを渡すと、この属性を持たないユーザーにもアイテムを表示します。属性は持っているが、値が条件で指定されたものと一致しないユーザーには、アイテムは表示されません。false - その属性を持っているが、値が条件に指定されたものと一致しないか、属性が欠落しているユーザーには、アイテムは表示されません。

attribute_conditions[].​operatorstring(user-attribute_conditions_properties_operator_string)必須

条件によって実行される操作のタイプ。string属性タイプの場合。

列挙型 値説明
eq

イコール

ne

ノットイコール

attribute_conditions[].​typestring(user-attribute_conditions_properties_type-string)必須

ユーザー属性タイプ。

"string"
attribute_conditions[].​valuestring(user-attribute_conditions_properties_value)<= 255 characters必須

ユーザー属性値の比較対象となる条件値。ライプは属性タイプに依存します。

is_enabledboolean必須

ルールが有効な場合。

is_satisfied_for_unauthboolean

アイテムを無許可のユーザーに表示するかどうか。「true」の場合、カタログ表示ルールに関係なく、アイテムは権限のないユーザーに表示されます。デフォルトでは「false」です。

itemsArray of objects[ 1 .. 100 ] items必須
One of:

属性値が条件を満たした場合に、ユーザーに表示されるアイテム。

items[].​item_idnumber必須

アイテムID。

namestring[ 1 .. 255 ] characters^\S必須

ルールの読みやすい名前。パブリッシャーアカウントでルールを表示するために使用します。

curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/admin/user/attribute/rule \
  -H 'Content-Type: application/json' \
  -d '{
    "attribute_conditions": [
      {
        "attribute": "race",
        "can_be_missing": false,
        "operator": "eq",
        "type": "string",
        "value": "ork"
      }
    ],
    "is_enabled": true,
    "is_satisfied_for_unauth": false,
    "items": [
      {
        "item_id": 1
      }
    ],
    "name": "Ork race armor rule"
  }'

レスポンス

ルールが正常に作成されました。

ボディapplication/json
rule_idnumber

ルールID。

レスポンス
application/json
{ "rule_id": 1 }

クライアントサイドで検索するためのすべてのカタログルールを取得しますServer-sideAdmin

リクエスト

クライアントサイドで検索するためのすべてのカタログルールのリストを取得します。

注意

ルールID、名前、is_enabled
のみを返します。
セキュリティ
basicAuth
パス
project_idinteger必須

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

例: 44056
curl -i -X GET \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/admin/user/attribute/rule/all

レスポンス

ルールが正常に受信されました。

ボディapplication/json
itemsArray of objects(user-attribute_personalized-catalog_all)
レスポンス
application/json
{ "items": [ {}, {} ] }
操作
操作

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

操作

カート(サーバー側)

操作

決済(クライアント側)

操作

決済(サーバー側)

操作
操作

無料アイテム

操作

ウェブフック

操作
操作

マーチャント

操作

カタログ

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

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

クーポン

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

操作

プロモーションコード

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

操作

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

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

操作

ディスカウント

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

操作

ボーナス

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

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

クライアント

操作

クランクライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作