コンテンツへスキップ

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
ボディapplication/json必須

バンドルデータを持つオブジェクト。

attributesArray of objects(Bundles_admin-post-put-attributes)<= 20 items

属性のリスト。

注意。アイテムの属性は20個以上指定することはできません。制限を超えようとすると、エラーが発生します。
bundle_typestring(Bundles_bundle_type)

バンドルタイプ。standardを使用してアイテムのバンドルを作成し、バンドルに含まれるアイテムの SKU を指定します。 partner_side_contentを使用して空のバンドルを作成し、ウェブフックを使用してユーザー側でアイテムを追加します。このタイプは、パートナー側でのカタログ個人用設定でのみ使用されます。

デフォルト "standard"
列挙型"standard""partner_side_content"
例: "standard"
contentArray of objects(Bundles_admin_content_request)non-empty
例: [{"quantity":1,"sku":"com.xsolla.kg_1"}]
custom_attributesobject(json)(item-custom-attributes)<= 500 characters

アイテムの属性と値を含むJSONオブジェクト。属性により、アイテムを使用するために必要なプレイヤーのレベルなど、より詳細な情報をアイテムに追加することができます。属性はゲームの内部ロジックを豊かにし、専用の「取得」メソッドやウェブフックからアクセスできます。

description(two-letter (object or null)) or (five-letter (object or null))(description-localization-object)必須

アイテムの説明に関するローカライズ用オブジェクト。2文字の小文字の言語コード(例:en)または5文字のロケールコード(例:en-US)のいずれかの形式で値を受け入れます。どちらの形式も入力として受け入れられますが、応答は2文字の小文字の言語コードを返します。同じ言語に対して両方のオプションが提供された場合(例:enen-US)、最後に提供された値が保存されます。サポートされている言語の完全なリストは、ドキュメントで確認できます。

One of:

アイテムの説明に関するローカライズ用オブジェクト。2文字の小文字の言語コード(例:en)または5文字のロケールコード(例:en-US)のいずれかの形式で値を受け入れます。どちらの形式も入力として受け入れられますが、応答は2文字の小文字の言語コードを返します。同じ言語に対して両方のオプションが提供された場合(例:enen-US)、最後に提供された値が保存されます。サポートされている言語の完全なリストは、ドキュメントで確認できます。

description.​arstring or null

アラビア語

description.​bgstring or null

ブルガリア語

description.​cnstring or null

中国語(簡体字)

description.​csstring or null

チェコ語

description.​destring or null

ドイツ語

description.​enstring or null

英語

description.​esstring or null

スペイン語(スペイン)

description.​frstring or null

フランス語

description.​hestring or null

ヘブライ語

description.​idstring or null

インドネシア語

description.​itstring or null

イタリア語

description.​jastring or null

日本語

description.​kmstring or null

クメール語

description.​kostring or null

韓国語

description.​lostring or null

ラオス語

description.​mystring or null

ビルマ語

description.​nestring or null

ネパール語

description.​phstring or null

フィリピン語

description.​plstring or null

ポーランド語

description.​ptstring or null

ポルトガル語

description.​rostring or null

ルーマニア語

description.​rustring or null

ロシア語

description.​thstring or null

タイ語

description.​trstring or null

トルコ語

description.​twstring or null

中国語(繁体字)

description.​vistring or null

ベトナム語

groupsArray of strings(Bundles_groups_request)

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

注。文字列の値はグループ `external_id`を指します。
デフォルト []
例: ["honor"]
image_urlstring or null(Bundles_image_url)

画像URL。

例: "https://image.example.com"
is_enabledboolean(Bundles_is_enabled)

無効の場合、アイテムを検索して購入することはできません。

デフォルト true
例: true
is_freeboolean(value-is_free)

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

デフォルト false
例: false
is_show_in_storeboolean(Bundles_is_show_in_store)

アイテムは購入可能です。

デフォルト false
例: true
limitsobject(bundle-item-limit)

アイテム制限。

long_description(two-letter (object or null)) or (five-letter (object or null))(long-description-localization-object)

アイテムの長文説明のローカライズを含むオブジェクト。2文字の小文字の言語コード(例:en)または5文字のロケールコード(例:en-US)のいずれかの形式で値を受け入れます。どちらの形式も入力として受け入れられますが、応答は2文字の小文字の言語コードを返します。同じ言語に対して両方のバリアント(例:enen-US)が提供された場合、最後に提供された値が保存されます。サポートされている言語の完全なリストは、ドキュメントで確認できます。

Any of:

アイテムの長文説明のローカライズを含むオブジェクト。2文字の小文字の言語コード(例:en)または5文字のロケールコード(例:en-US)のいずれかの形式で値を受け入れます。どちらの形式も入力として受け入れられますが、応答は2文字の小文字の言語コードを返します。同じ言語に対して両方のバリアント(例:enen-US)が提供された場合、最後に提供された値が保存されます。サポートされている言語の完全なリストは、ドキュメントで確認できます。

media_listArray of objects or null

バンドルの追加アセット。

例: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]
name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)必須

アイテム名に関するローカライズ用オブジェクト。2文字の小文字の言語コード(例:en)または5文字の言語コード(例:en-US)のいずれかの形式で値を受け入れます。どちらの形式も入力として受け入れられますが、応答は2文字の小文字の言語コードを返します。同じ言語に対して両方のオプションが提供された場合(例:enen-US)、最後に提供された値が保存されます。サポートされている言語の完全なリストは、ドキュメントで確認できます。

One of:

アイテム名に関するローカライズ用オブジェクト。2文字の小文字の言語コード(例:en)または5文字の言語コード(例:en-US)のいずれかの形式で値を受け入れます。どちらの形式も入力として受け入れられますが、応答は2文字の小文字の言語コードを返します。同じ言語に対して両方のオプションが提供された場合(例:enen-US)、最後に提供された値が保存されます。サポートされている言語の完全なリストは、ドキュメントで確認できます。

name.​arstring or null

アラビア語

name.​bgstring or null

ブルガリア語

name.​cnstring or null

中国語(簡体字)

name.​csstring or null

チェコ語

name.​destring or null

ドイツ語

name.​enstring or null

英語

name.​esstring or null

スペイン語(スペイン)

name.​frstring or null

フランス語

name.​hestring or null

ヘブライ語

name.​idstring or null

インドネシア語

name.​itstring or null

イタリア語

name.​jastring or null

日本語

name.​kmstring or null

クメール語

name.​kostring or null

韓国語

name.​lostring or null

ラオス語

name.​mystring or null

ビルマ語

name.​nestring or null

ネパール語

name.​phstring or null

フィリピン語

name.​plstring or null

ポーランド語

name.​ptstring or null

ポルトガル語

name.​rostring or null

ルーマニア語

name.​rustring or null

ロシア語

name.​thstring or null

タイ語

name.​trstring or null

トルコ語

name.​twstring or null

中国語(繁体字)

name.​vistring or null

ベトナム語

orderinteger(Bundles_order)

リスト内のバンドル順の優先順位。

デフォルト 1
例: 1
periodsArray of objects or null(item-periods)

アイテム販売期間。

pricesArray of objects(Bundles_prices)

実際通貨建ての価格。

regionsArray of objects(Bundles_admin-regions)
skustring(Bundles_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$必須

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

例: "bundle_1"
vc_pricesArray of objects or null
curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/admin/items/bundle \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": [
      {
        "external_id": "class",
        "name": {
          "en": "Class"
        },
        "values": [
          {
            "external_id": "soldier",
            "value": {
              "en": "Soldier"
            }
          },
          {
            "external_id": "officer",
            "value": {
              "en": "Officer"
            }
          }
        ]
      }
    ],
    "content": [
      {
        "quantity": 1,
        "sku": "com.xsolla.iron_gloves_1"
      },
      {
        "quantity": 1,
        "sku": "com.xsolla.iron_boots_1"
      },
      {
        "quantity": 1,
        "sku": "com.xsolla.iron_shield_1"
      },
      {
        "quantity": 1,
        "sku": "com.xsolla.iron_armour_1"
      },
      {
        "quantity": 1,
        "sku": "com.xsolla.iron_helmet_1"
      }
    ],
    "custom_attributes": {
      "purchased": 0,
      "type": "lootbox"
    },
    "description": {
      "de": "Brustpanzer für Soldaten",
      "en": "Chest of armour for soldiers"
    },
    "groups": [
      "chests"
    ],
    "image_url": "https://picture.bundle-with-many-stuff.png",
    "is_enabled": true,
    "is_free": true,
    "limits": {
      "per_item": null,
      "per_user": null
    },
    "long_description": {
      "de": "Brustpanzer für Soldaten",
      "en": "Chest of armour for soldiers"
    },
    "media_list": [
      {
        "type": "image",
        "url": "https://test.com/image0"
      },
      {
        "type": "image",
        "url": "https://test.com/image1"
      }
    ],
    "name": {
      "de": "Brustpanzer",
      "en": "Chest of armour"
    },
    "order": 1,
    "periods": [
      {
        "date_from": "2020-08-11T10:00:00+03:00",
        "date_until": "2020-08-11T20:00:00+03:00"
      }
    ],
    "prices": [
      {
        "amount": "9.99",
        "currency": "USD",
        "is_default": true,
        "is_enabled": true
      },
      {
        "amount": "9.99",
        "currency": "EUR",
        "is_default": false,
        "is_enabled": true
      }
    ],
    "sku": "com.xsolla.armour_chest_1",
    "vc_prices": []
  }'

レスポンス

バンドルが正常に作成されました。

ボディapplication/json
skustring(Bundles_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$

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

例: "bundle_1"
レスポンス
application/json
{ "sku": "com.xsolla.kg_1" }

指定されたグループexternal IDのバンドルリストを取得するServer-sideAdmin

リクエスト

管理用のグループ内のバンドルリストを取得します。



このエンドポイントは、ストアカタログの構築に使用しないでください。
セキュリティ
basicAuth
パス
project_idinteger必須

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

例: 44056
external_idstring必須

グループexternal ID。

デフォルト "all"
クエリ
limitinteger>= 1

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

例: limit=50
offsetinteger>= 0

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

例: offset=0
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/admin/items/bundle/group/external_id/{external_id}?limit=50&offset=0'

レスポンス

バンドルのリストは正常に受信されました。

ボディapplication/json
itemsArray of objects(Bundles_admin_bundle_response)
レスポンス
application/json
{ "items": [ {}, {} ] }

指定されたグループIDのバンドルリストを取得するServer-sideAdmin

リクエスト

管理用のグループ内のバンドルリストを取得します。



このエンドポイントは、ストアカタログの構築に使用しないでください。
セキュリティ
basicAuth
パス
project_idinteger必須

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

例: 44056
group_idinteger必須

グループID。

例: 10
クエリ
limitinteger>= 1

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

例: limit=50
offsetinteger>= 0

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

例: offset=0
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v2/project/44056/admin/items/bundle/group/id/10?limit=50&offset=0'

レスポンス

バンドルのリストは正常に受信されました。

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

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

操作

カート(サーバー側)

操作

決済(クライアント側)

操作

決済(サーバー側)

操作
操作

無料アイテム

操作

ウェブフック

操作
操作

マーチャント

操作

カタログ

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

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

クーポン

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

操作

プロモーションコード

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

操作

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

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

操作

ディスカウント

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

操作

ボーナス

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

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

クライアント

操作

クランクライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作