Xsolla-logo

ボーナスプロモーションを更新Server-sideAdmin

put/v2/project/{project_id}/admin/promotion/{promotion_id}/bonus

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

注意

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

プロモーションは、ユーザーによる購入に無料のボーナスアイテムを追加します。 プロモーションは、プロジェクト内のすべての購入、または特定のアイテムを含む購入に適用することができます。

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

プロジェクトID。このパラメータは、ドメインページのプロジェクト名の横にあります。

Example: 44056
promotion_id
required
integer

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

Example: 111425
Request Body schema: application/json
required
Array of objects or null

プロモーションを適用するために、購入に含める必要があるアイテムのセット。このパラメータがnullである場合、プロジェクト内のすべての購入にプロモーションが適用されます。

Array
sku
string
Default: "elven_sword"

アイテムSKU。

required
Array of objects or null
Array
quantity
number
Default: 1

アイテム数量。

sku
string
Default: "elven_shield"

アイテムSKU。

required
object

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

property name*
additional property
string
Array of type = string (objects) or Array of type = date (objects) or Array of type = number (objects)
One of:

ユーザー属性値と比較される条件。 動作が有効になるためには、すべての条件が満たされなければなりません。

[ 1 .. 100 ] items
Array ([ 1 .. 100 ] items)
attribute
required
string [ 1 .. 255 ] characters ^[-_.\\d\\w]+$

ユーザー属性コード。

operator
required
string

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

Enum: Description
eq

イコール

ne

ノットイコール

value
required
string <= 255 characters

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

type
required
string

ユーザー属性タイプ。

Value: "string"
can_be_missing
boolean

Indicates that the condition is met even if attribute is missing from user attributes. Pass true to show the item to users who don't have this attribute. Users who have the attribute, but the value does not match that specified in the condition, will not see the item. False — users who have the attribute, but the value does not match that specified in the condition, or the attribute is missing, will not see the item.

date_end
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

プロモーションが終了する日付。nullにすることができます。 date_endnullの場合、プロモーションは時間無制限となります。

date_start
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

プロモーションを開始する日付。

id
integer

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

object

プロモーションの制限。

per_user
integer or null

別ユーザーでのプロモーション制限。

object or null

制限更新期間。

interval_type = daily (object) or interval_type = weekly (object) or interval_type = monthly (object)
One of:

ユーザー制限の日次更新タイプ。

interval_type
required
string

循環更新期間。

Value: "daily"
time
required
string((0[0-9]|1[0-9]|2[0-3]):00:00)(\+|-)(0[0-9]|1...

希望するタイムゾーンでのリミットの更新時刻(時間単位で四捨五入)。

Responses
204

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

401

基本認証が不合格または不正です。基本認証または正しい認証情報を使用したことを確認してください。

422

無効なリクエスト。

Request samples
application/json
{
  • "attribute_conditions": [
    ],
  • "bonus": [
    ],
  • "condition": [
    ],
  • "date_end": "2020-04-25T18:16:00+05:00",
  • "date_start": "2020-04-15T18:16:00+05:00",
  • "name": {
    }
}
Response samples
application/json
{
  • "errorCode": 1020,
  • "errorMessage": "[0401-1020]: Error in Authentication method occurred",
  • "statusCode": 401
}