コンテンツへスキップ

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。このパラメータは、パブリッシャーアカウントのプロジェクト名の横にあります。

例: 44056
promotion_idinteger必須

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

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

レスポンス

アイテムプロモーションは正常に受信されました。

ボディapplication/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(promotion_user-attribute_conditions_model-get)[ 1 .. 100 ] items

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

discountobject
例: {"percent":"15.00"}
excluded_promotionsArray of integers(excluded_promotions)

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

例: [12,789]
idinteger

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

例: 1
is_enabledboolean(Promotions_is_enabled)

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

例: true
itemsArray of objects or null
例: [{"sku":"com.xsolla.elven_sword_1"},{"sku":"com.xsolla.elven_helmet_1"},{"sku":"com.xsolla.elven_armor_1"}]
limitsobject(Promotions_promotion_limits_response)

プロモーションの制限。

nameobject

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

例: {"en-US":"Promotion","ru-RU":"Акция"}
price_conditionsArray of objects or null(price_conditions_discount)

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

promotion_periodsArray of objects(promotion_periods)

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

レスポンス
application/json
{ "discount": { "percent": "20.00" }, "excluded_promotions": [ 23, 45 ], "id": 1, "is_enabled": true, "items": [ {}, {} ], "limits": { "per_item": null, "per_user": {}, "recurrent_schedule": {} }, "name": { "en-US": "Promotion", "ru-RU": "Акция" }, "price_conditions": [ {}, {} ], "promotion_periods": [ {} ] }

アイテムプロモーションを更新するServer-sideAdmin

リクエスト

プロモーションを更新します。

注意

新しいデータは古いデータに取って代わります。プロモーションの一部だけを更新したい場合は、必要なデータもすべてリクエストで転送する必要があります。

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

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

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

例: 44056
promotion_idinteger必須

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

例: 111425
ボディ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 PUT \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/44056/admin/promotion/111425/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"
      }
    ]
  }'

レスポンス

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

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

ボーナス

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

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

クライアント

操作

クランクライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作