Xsolla-logoXsolla Developers
or
To Publisher Account

Set RewardsServer-sideAdmin

put/merchants/{merchant_id}/promotions/{promotion_id}/rewards

Sets the rewards for a promotion. If the promotion is read-only (read_only = true), you cannot update the rewards.

Notice

This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

SecuritybasicAuth
Request
path Parameters
merchant_id
required
integer

Merchant ID.

promotion_id
required
integer

Promotion ID.

Request Body schema: application/json
object

Set the reward for the whole purchase.

discount_percent
number <float>

Discount percentage.

object

Set the reward for a virtual currency package.

bonus_percent
number <float>

Reward as a percentage of the package amount.

bonus_amount
number <float>

Reward as an absolute quantity of the virtual currency.

object

Set the reward for specific virtual items.

Array of objects

Discounts for specific virtual items.

Array
localized_name
string

Plan name in default language (en), replicates name.en value.

sku
string

Item SKU.

discount_percent
number <float>

Discount percentage.

max_amount
number <integer>

Maximum number of items to apply the promotion to.

Array of objects

Extra virtual items given as a bonus.

Array
id
integer
localized_name
string

Plan name in default language (en), replicates name.en value.

sku
string

Item SKU.

quantity
integer

Number of virtual items given as a bonus.

object

Sets the reward for a subscription.

trial_days
integer

Trial period in days.

Responses
204

No content.

Request samples
application/json
{
  • "item": {
    },
  • "package": {
    },
  • "purchase": {
    },
  • "subscription": {
    }
}