Xsolla-logo

Get coupon rewards

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

Project ID.

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

Unique case sensitive code. Contains letters and numbers.

Example: WINTER2021
Responses
200

List of coupon rewards was successfully received.

401

Authentication not passed or wrong.

403

Authorization header not sent.

404

Enter valid coupon code.

422

Invalid request.

Request samples
curl -i -X GET \
  'https://store.xsolla.com/api/v2/project/{project_id}/coupon/code/{coupon_code}/rewards' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'
Response samples
application/json
{
  • "bonus": [
    ],
  • "discount": {
    },
  • "is_selectable": true
}