Xsolla-logo

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

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

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

注意

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

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

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
Array
sku
required
string
Default: "elven_sword"

アイテムSKU。

required
object
percent
required
string

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

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_start
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

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

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

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

404

プロモーションが見つかりません。promotion_idが正しいことを確認してください。

422

無効なリクエスト。

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