Xsolla-logo

Get promo code reward

get/v2/project/{project_id}/promocode/code/{promocode_code}/rewards

Gets promo code 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 promo code contains a game as a bonus (type=unit).

Request
path Parameters
project_id
required
integer

Project ID.

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

Unique case sensitive code. Contains letters and numbers.

Example: SO6rew99j9
Responses
200

List of promo code 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}/promocode/code/{promocode_code}/rewards' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'
Response samples
application/json
{
  • "bonus": [
    ],
  • "discount": {
    },
  • "is_selectable": true,
  • "discounted_items": [
    ]
}