Xsolla-logo

Generate codes for promo code promotionServer-sideAdmin

put/v2/project/{project_id}/admin/promocode/{external_id}/code/generate

Generates codes for a promo code promotion.

SecuritybasicAuth
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
external_id
required
integer

Promotion external ID. Unique promotion identifier within the project.

Example: coupon_44056_1
Request Body schema: application/json
count
required
integer [ 1 .. 100000 ]
Responses
200

Codes were successfully generated.

401

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

404

Promo code not found. Make sure the external_id is correct.

Request samples
application/json
{
  • "count": 10
}
Response samples
application/json
{
  • "count": 10
}