Xsolla-logo

Update coupon promotion

put/v2/project/{project_id}/admin/coupon/{external_id}

Updates a coupon promotion.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
external_id
required
integer

Promotion external ID. Unique promotion identifier within the project.

Example: coupon_44056_1
Request Body schema: application/json
date_start
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

Date when your promotion will be started.

date_end
string or null <date-time>
Default: "2020-04-15T18:16:00+05:00"

Date when your promotion will be finished. Can be null. If date_end is null, promotion will be unlimited by time.

object
Default: {"en-US":"Coupon title","de-DE":"Название купона"}

Name of promotion. Should contain key/value pairs where key is a locale with "^[a-z]{2}-[A-Z]{2}$" format, value is string.

Array of objects or null
redeem_total_limit
integer or null
Default: 10

Limits total numbers of coupons.

redeem_user_limit
integer or null
Default: 10

Limits total numbers of coupons redeemed by single user.

redeem_code_limit
integer or null
Default: 10

Number of redemptions per code.

Responses
204

Coupon was successfully updated.

401

Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.

404

Coupon not found. Make sure the external_id is correct.

422

Invalid request.

Request samples
application/json
{
  • "date_start": "2020-04-15T18:16:00+05:00",
  • "date_end": "2020-04-15T18:16:00+05:00",
  • "promotion_name": {
    },
  • "bonus": [
    ],
  • "redeem_total_limit": 10,
  • "redeem_user_limit": 10,
  • "redeem_code_limit": 10
}
Response samples
application/json
{
  • "statusCode": 401,
  • "errorCode": 1020,
  • "errorMessage": "[0401-1020]: Error in Authentication method occurred"
}