コンテンツへスキップ

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 を使用すると、プロモーションコードを管理できます。

操作

プロモーションコードのプロモーションを作成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

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

bonusArray of objects or null(Promotions_coupon_bonus)
discountobject or null
例: {"percent":"10.10"}
discounted_itemsArray of objects or null(Promotions_discounted_items)

プロモーションコードによる割引が適用されるアイテムリスト。

excluded_promotionsArray of integers(excluded_promotions)

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

例: [12,789]
external_idstring(Promotions_coupon-external_id)必須

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

デフォルト "coupon_external_id"
例: "coupon_external_id"
item_price_conditionsArray of objects or null(item_price_conditions_promocode)

カートの中の特定のアイテムにプロモーションを適用するための価格範囲を設定する条件を持つオブジェクトの配列。
ユーザーのカート内の各アイテムの価格は、条件で指定された価格帯と比較されます。ボーナスディスカウントは、カート内のアイテムのうち、価格が条件を満たすものにのみ適用されます。
この配列を渡す場合は、discounted_items配列の値をnullに設定します。

nameobject(Promotions_coupon_name)必須

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

デフォルト {"de-DE":"Gutscheintitel","en-US":"Coupon title"}
例: {"de-DE":"Gutscheintitel","en-US":"Coupon title"}
name.​property name*string追加プロパティ
price_conditionsArray of objects or null(price_conditions_promocode)

カート全体にプロモーションを適用するための価格帯を設定する条件を持つオブジェクトの配列。
ユーザーのカート内の全アイテムの合計価格が、条件で指定された価格範囲と比較されます。ボーナス割引は、カートの価格が指定された条件を満たす場合に、カート内のすべてのアイテムに適用されます。
この配列を渡す場合は、discounted_items 配列の値をnullに設定します。

promotion_periodsArray of objects(promotion_periods)

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

redeem_code_limitinteger or null(Promotions_redeem_code_limit)

コードごとの引き換え回数。

デフォルト 10
例: 10
redeem_total_limitinteger or null(Promotions_coupon-redeem_total_limit)

クーポンの総数を制限します。

デフォルト 10
例: 10
redeem_user_limitinteger or null(Promotions_coupon-redeem_user_limit)

一人のユーザーが引き換えできるクーポンの総数を制限します。

デフォルト 10
例: 10
curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/ja/api/shop-builder/v3/project/44056/admin/promocode \
  -H 'Content-Type: application/json' \
  -d '{
    "attribute_conditions": [
      {
        "attribute": "account_status",
        "can_be_missing": false,
        "operator": "eq",
        "type": "string",
        "value": "golden"
      }
    ],
    "discount": {
      "percent": "10.10"
    },
    "external_id": "coupon_external_id",
    "name": {
      "de-DE": "Neujahrsrabatt",
      "en-US": "New Year Discount"
    },
    "promotion_periods": [
      {
        "date_from": "2020-04-15T18:16:00+05:00",
        "date_until": "2020-04-25T18:16:00+05:00"
      }
    ],
    "redeem_code_limit": 1,
    "redeem_total_limit": 100,
    "redeem_user_limit": 1
  }'

レスポンス

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

ボディapplication/json
external_idstring(Promotions_coupon-external_id)

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

デフォルト "coupon_external_id"
例: "coupon_external_id"
レスポンス
application/json
{ "external_id": "coupon_external_id" }

プロモーションコードのプロモーションを削除Server-sideAdmin

リクエスト

プロモーションコードのプロモーションを削除します。削除されたプロモーション:

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

削除後、プロモーションを復元することはできません。 削除されたプロモーションのプロモーションコードを既存のプロモーションに追加できます。

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

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

例: 44056
external_idinteger必須

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

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

レスポンス

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

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

プロモーションコードのプロモーションを取得Server-sideAdmin

リクエスト

指定されたプロモーションコードを取得します。

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

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

例: 44056
external_idinteger必須

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

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

レスポンス

プロモーションコードは正常に受信されました。

ボディ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

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

bonusArray of objects or null(Promotions_coupon_bonus)
discountobject or null
例: {"discount":{"percent":"10.99"}}
discounted_itemsArray of objects or null(Promotions_discounted_items)

プロモーションコードによる割引が適用されるアイテムリスト。

excluded_promotionsArray of integers(excluded_promotions)

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

例: [12,789]
external_idstring(Promotions_coupon-external_id)

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

デフォルト "coupon_external_id"
例: "coupon_external_id"
is_enabledboolean(Promotions_coupon-is_enabled)
デフォルト true
item_price_conditionsArray of objects or null(item_price_conditions_promocode)

カートの中の特定のアイテムにプロモーションを適用するための価格範囲を設定する条件を持つオブジェクトの配列。
ユーザーのカート内の各アイテムの価格は、条件で指定された価格帯と比較されます。ボーナスディスカウントは、カート内のアイテムのうち、価格が条件を満たすものにのみ適用されます。
この配列を渡す場合は、discounted_items配列の値をnullに設定します。

nameobject(Promotions_coupon_name)

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

デフォルト {"de-DE":"Gutscheintitel","en-US":"Coupon title"}
例: {"de-DE":"Gutscheintitel","en-US":"Coupon title"}
price_conditionsArray of objects or null(price_conditions_promocode)

カート全体にプロモーションを適用するための価格帯を設定する条件を持つオブジェクトの配列。
ユーザーのカート内の全アイテムの合計価格が、条件で指定された価格範囲と比較されます。ボーナス割引は、カートの価格が指定された条件を満たす場合に、カート内のすべてのアイテムに適用されます。
この配列を渡す場合は、discounted_items 配列の値をnullに設定します。

promotion_periodsArray of objects(promotion_periods)

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

redeem_code_limitinteger or null(Promotions_redeem_code_limit)

コードごとの引き換え回数。

デフォルト 10
例: 10
redeem_total_limitinteger or null(Promotions_coupon-redeem_total_limit)

クーポンの総数を制限します。

デフォルト 10
例: 10
redeem_user_limitinteger or null(Promotions_coupon-redeem_user_limit)

一人のユーザーが引き換えできるクーポンの総数を制限します。

デフォルト 10
例: 10
total_limit_stateobject or null(Promotions_promocode_total_limit_state)

一意のプロモーションコードごとの制限。

レスポンス
application/json
{ "bonus": [ {} ], "discount": { "percent": "10.99" }, "discounted_items": null, "excluded_promotions": [ 23, 45 ], "external_id": "summer20221", "is_enabled": true, "name": { "en-US": "Coupon name", "ru-RU": "Название купона" }, "promotion_periods": [ {}, {} ], "redeem_code_limit": 1, "redeem_total_limit": 100, "redeem_user_limit": null, "total_limit_state": { "available": 50, "reserved": 10, "used": 40 } }

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

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

操作

ディスカウント

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

操作

ボーナス

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

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

クライアント

操作

クランクライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作

クライアント

操作
操作