Xsolla-logo
  • 文档
  • 创建帐户

Get coupon rewardsClient-side

get/v2/project/{project_id}/coupon/code/{coupon_code}/rewards

Gets coupons rewards by its code. Can be used to allow users to choose one of many items as a bonus. The usual case is choosing a DRM if the coupon contains a game as a bonus (type=unit).

SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

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

Example: 44056
coupon_code
required
string [ 1 .. 128 ] characters

区分大小写的唯一券码。包含字母和数字。

Example: WINTER2021
Responses
200

已成功接收优惠券奖励列表。

401

认证未通过或错误。

403

未发送授权标头。

404

输入有效的优惠券码。

422

无效的请求。

Request samples
Response samples
application/json
{
  • "bonus": [
    ],
  • "discount": {
    },
  • "is_selectable": true
}