コンテンツへスキップ

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は販売可能なアイテムや特定のアイテムを取得することができます。

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

クーポン

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

操作

プロモーションコード

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

操作

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

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

操作

ディスカウント

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

操作

アイテムプロモーションのリストを取得Server-sideAdmin

リクエスト

プロジェクトのアイテムプロモーションのリストを取得します。

プロモーションは、アイテムの割引(%)を提供します。 指定したアイテムの全価格に割引が適用されます。

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

プロジェクトID。

デフォルト 59080
クエリ
limitinteger

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

offsetinteger

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

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/{project_id}/admin/promotion/item?limit=0&offset=0'

レスポンス

アイテムプロモーションのリストが正常に受信されました。

ボディapplication/json
active_promotions_countinteger(active_promotions_count)

アクティブなプロモーションの数。

inactive_promotions_countinteger(inactive_promotions_count)

非アクティブ化されたプロモーションの数。

promotionsArray of objects
total_promotions_countinteger(total_promotions_count)

プロモーションの合計数。

レスポンス
application/json
{ "active_promotions_count": 4, "inactive_promotions_count": 0, "promotions": [ {}, {}, {}, {} ], "total_promotions_count": 4 }

アイテムの割引プロモーションを作成Server-sideAdmin

リクエスト

アイテムの割引キャンペーンを作成します。

キャンペーンは、アイテムの割引(%)を提供します。 指定したアイテムの全価格に割引が適用されます。

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

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

例: 44056
ボディapplication/json必須

プロモーションデータを持つオブジェクト。

attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(promotion_user-attribute_conditions_model-post)[ 1 .. 100 ] items

ユーザー属性を検証するための条件。 ユーザー属性が指定されたすべての条件に一致するかどうかに基づいて、プロモーションの可用性を決定します。

discountobject必須
discount.​percentstring必須

割引率。 アイテムの価格は、この割引率で計算された値で減少し、小数点以下2桁に四捨五入されます。

例: 10
excluded_promotionsArray of integers(excluded_promotions)

このプロモーションを適用する際に除外するプロモーションIDのリスト。
Example:[12, 789]

例: [12,789]
is_enabledboolean(Promotions_is_enabled)

プロモーションが有効かどうか。

例: true
itemsArray of objects必須
items[].​skustring必須

アイテムSKU。

デフォルト "elven_sword"
limitsobject(Promotions_promotion_limits)

プロモーションの制限。

nameobject必須

プロモーション名。キーと値のペアを含む必要があります。 キーは"^[a-z]{{2}-[A-Z]{2}$"フォーマットのロケール、値は文字列です。

例: {"en-US":"Promotion","ru-RU":"Акция"}
name.​property name*string追加プロパティ
price_conditionsArray of objects or null(price_conditions_discount)

プロモーションを適用する価格帯を設定する条件を持つオブジェクトの配列。
プロモーションは、価格が配列内のすべての条件を満たすアイテムにのみ適用されます。この配列を渡す場合は、アイテムオブジェクトの値をnullに設定します。

promotion_periodsArray of objects(promotion_periods)

プロモーションの有効期間。複数の期間を指定する場合は、date_fromdate_untilの両方が必須となります。

curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/44056/admin/promotion/item \
  -H 'Content-Type: application/json' \
  -d '{
    "attribute_conditions": [
      {
        "attribute": "race",
        "operator": "eq",
        "type": "string",
        "value": "ork"
      },
      {
        "attribute": "level",
        "can_be_missing": true,
        "operator": "eq",
        "type": "number",
        "value": "10"
      }
    ],
    "discount": {
      "percent": "24.00"
    },
    "is_enabled": true,
    "items": [],
    "name": {
      "en-US": "Ork set discount",
      "ru-RU": "Скидка на набор для орка"
    },
    "promotion_periods": [
      {
        "date_from": "2020-04-15T18:16:00+05:00",
        "date_until": "2020-04-25T18:16:00+05:00"
      }
    ]
  }'

レスポンス

プロモーションは正常に作成されました。

ボディapplication/json
promotion_idinteger

プロモーションID。プロジェクト内での一意のプロモーション識別子。

レスポンス
application/json
{ "promotion_id": 2384756 }

アイテムプロモーションを削除Server-sideAdmin

リクエスト

割引プロモーションを削除します。削除されたプロモーション:

  • プロジェクトで設定されたプロモーションのリストから消えます。
  • アイテムカタログとカートに適用されなくなります。

削除後、プロモーションは復元できません。

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

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

例: 44056
promotion_idinteger必須

プロモーションID。プロジェクト内での一意のプロモーション識別子。

例: 111425
curl -i -X DELETE \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/44056/admin/promotion/111425/item

レスポンス

プロモーションは正常に削除されました。

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

ボーナス

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

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

クライアント

操作

クランクライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作