Xsolla-logo

Create Campaign

post/merchants/{merchant_id}/coupon_promotions

Create a new coupon campaign.

SecuritybasicAuth
Request
path Parameters
merchant_id
required
integer

Merchant ID.

Request Body schema: application/json
campaign_code
required
string

Campaign name.

project_id
required
integer

Project ID.

required
object

Object containing localized campaign names.

expiration_date
string <datetime>

Campaign expiration date in the YYYY-MM-DD’T’HH:MM:SS format per ISO 8601.

virtual_currency_amount
number <float>

Virtual currency amount in a reward.

object

Array of virtual items parameters in a reward.

object

Object containing subscription parameters in a reward.

redeems_count
integer

Maximum number of coupon redeems. If null is passed, the redeems number is unlimited.

redeems_count_for_user
integer

Maximum number of coupon redeems per user. If null is passed, the redeems number is unlimited.

campaign_redeems_count_for_user
integer

Maximum number of coupon redeems per user within a campaign. If null is passed, the redeems number is unlimited.

Responses
201

Created.

Request samples
application/json
{
  • "campaign_code": "sample_campaign",
  • "campaign_names": {
    },
  • "campaign_redeems_count_for_user": "1",
  • "expiration_date": "2019-12-31",
  • "project_id": "12345",
  • "redeems_count": "10",
  • "redeems_count_for_user": "1",
  • "subscription_coupon": null,
  • "virtual_currency_amount": "200"
}
Response samples
application/json
{
  • "id": 9134
}