Xsolla-logo
  • 文档
  • 创建帐户

创建特别目录优惠促销活动

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

创建一个特别目录优惠促销活动。

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

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

Example: 44056
Request Body schema: application/json
external_id
required
string
Default: "coupon_external_id"

唯一促销活动ID。 external_id只能包含小写英文字母和数字字符、句点、破折号和下划线。

required
object
Default: {"de-DE":"Gutscheintitel","en-US":"Coupon title"}

促销活动名称。应包含键/值对, 其中键是"^[a-z]{2}-[A-Z]{2}$"格式的区域设置,值是字符串。

property name*
additional property
string
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"

促销活动开始日期。

items
Array of strings

使用特别目录优惠后可用的商品SKU列表。

redeem_code_limit
integer or null
Default: 10

每个代码的兑换次数。

redeem_total_limit
integer or null
Default: 10

限制优惠券的总数。

redeem_user_limit
integer or null
Default: 10

限制单个用户兑换的优惠券总数。

Responses
201

已成功创建特别目录优惠。

401

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

422

无效的请求。

Request samples
application/json
{
  • "date_end": "2020-04-15T18:16:00+05:00",
  • "date_start": "2020-04-15T18:16:00+05:00",
  • "external_id": "coupon_external_id",
  • "items": [
    ],
  • "name": {
    },
  • "redeem_code_limit": 10,
  • "redeem_total_limit": 10,
  • "redeem_user_limit": 10
}
Response samples
application/json
{
  • "coupon_id": "coupon_external_id"
}