Xsolla-logo
  • 文档
  • 创建帐户

更新奖励促销活动Server-sideAdmin

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

更新促销活动。

注意

如果只想更新促销活动的一部分,也应在请求中传输所有必需数据。

促销活动对进行购买的用户给予免费的奖励商品。 促销活动可以应用于项目中的任何购买或包含特定商品的购买。

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

项目编号。您可以在您的发布商帐户项目名称旁边。

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
}