Xsolla-logoXsolla Developers
前往发布商帐户

创建每日奖励Server-sideAdmin

post/v2/project/{project_id}/admin/daily_chain

创建每日奖励。

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

项目ID。您可以在您的发布商帐户项目名称旁边找到。

Example: 44056
Request Body schema: application/json
One of:

Base properties for calendar_hard daily reward type.

required
(two-letter (object or null)) or (five-letter (object or null))

包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

One of:

两个小写字母的语言代码。

ar
string or null

阿拉伯语

bg
string or null

保加利亚语

cn
string or null

中文(简体)

cs
string or null

捷克语

de
string or null

德语

en
string or null

英语

es
string or null

西班牙语(西班牙)

fr
string or null

法语

he
string or null

希伯来语

id
string or null

印度尼西亚语

it
string or null

意大利语

ja
string or null

日语

km
string or null

高棉语

ko
string or null

韩语

lo
string or null

老挝语

my
string or null

缅甸语

ne
string or null

尼泊尔语

ph
string or null

菲律宾语

pl
string or null

波兰语

pt
string or null

葡萄牙语

ro
string or null

罗马尼亚语

ru
string or null

俄语

th
string or null

泰语

tr
string or null

土耳其语

tw
string or null

中文(繁体)

vi
string or null

越南语

date_start
required
string <date-time>

每日奖励开始日期。

required
Array of objects
Array
step_number
required
integer >= 1

步骤编号。

required
Array of objects non-empty
Array (non-empty)
sku
required
string [ 1 .. 255 ] characters ^[a-zA-Z0-9_\-–.]*$

唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。

quantity
required
integer >= 1

此sku的每日奖励步骤数量

is_enabled
required
boolean
type
required
string

Daily reward type that determines when users can claim rewards.

Enum: Description
calendar_hard

Unlocks the next step reward every 24 hours. Any unclaimed step rewards are permanently lost once the next step reward becomes available.

rolling_skippable

Unlocks the next step reward every 24 hours based on date_start. Progression is sequential: a new reward will not unlock until the previous one has been claimed. If a user skips one or more days, they continue from where they left off; missed days do not grant multiple rewards.

rolling_unskippable

Unlocks the next step reward every 24 hours based on date_start. Progression is sequential: a new reward will not unlock until the previous one has been claimed. However, if a user skips a day, their progress is reset, and they must start again from the first step.

is_recurrent
boolean
Default: false

Whether the daily reward is recurrent. If true, the daily reward will automatically reset after the end date. The next start_date and end_date schedule is based on the number of daily reward steps and the initial time set on start_date.

(two-letter (object or null)) or (five-letter (object or null))

包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

One of:

两个小写字母的语言代码。

ar
string or null

阿拉伯语

bg
string or null

保加利亚语

cn
string or null

中文(简体)

cs
string or null

捷克语

de
string or null

德语

en
string or null

英语

es
string or null

西班牙语(西班牙)

fr
string or null

法语

he
string or null

希伯来语

id
string or null

印度尼西亚语

it
string or null

意大利语

ja
string or null

日语

km
string or null

高棉语

ko
string or null

韩语

lo
string or null

老挝语

my
string or null

缅甸语

ne
string or null

尼泊尔语

ph
string or null

菲律宾语

pl
string or null

波兰语

pt
string or null

葡萄牙语

ro
string or null

罗马尼亚语

ru
string or null

俄语

th
string or null

泰语

tr
string or null

土耳其语

tw
string or null

中文(繁体)

vi
string or null

越南语

order
integer

定义排列顺序。

Responses
201

每日奖励创建成功。

401

基本认证未通过或错误。确保您使用了基本认证或正确的凭据。

422

每日奖励配置错误。

Request samples
application/json
{
  • "date_start": "2023-04-15T18:16:00+05:00",
  • "description": {
    },
  • "is_enabled": true,
  • "name": {
    },
  • "order": 4,
  • "steps": [
    ],
  • "type": "calendar_hard"
}
Response samples
application/json
{
  • "daily_chain_id": 10
}