Xsolla-logo

Get promo code rewardClient-side

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).

SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

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 promo code.

422

Invalid request.

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