Xsolla-logo

Create unique catalog offer code

post/v2/project/{project_id}/admin/unique_catalog_offer/{external_id}/code

Creates unique catalog offer code.

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
coupon_code
string [ 1 .. 128 ] characters ^[a-zA-Z0-9]+$
Default: "WINTER2021"

Unique case sensitive code. Contains letters and numbers.

Responses
201

Code was successfully created.

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. The code already exists.

Request samples
application/json
{
  • "coupon_code": "WINTER2021"
}
Response samples
application/json
{
  • "code": "WINTER2021"
}