v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Coupons

Creates a coupon.

post/coupons/coupon

Request body

namestring required

Coupon name. Can't contain spaces or special characters.

discountPercentagenumber required

Discount percentage applied by the coupon.

activeboolean

Whether the coupon is active.

maxRedemptionsPerCustomerinteger

Maximum number of times a customer can redeem this coupon.

expiredBystring date-time

Expiration date of the coupon.

startsAtstring date-time

Start date of the coupon validity. If not provided, defaults to current date and time.

supportedOfferExternalIdsstring[]

List of offer IDs which this coupon applies. Empty array means all offers are supported.

Note: This represents both the offer.sku value in the Create Checkout Session API, and the publisherOfferId in the Offers V2 API.

firstTimePurchaseboolean

Whether the coupon is only valid for first-time purchases.

allowedPlayersstring[]

List of player IDs that can redeem this coupon.

Example request

{
  "name": "summer26",
  "discountPercentage": 1,
  "active": true,
  "maxRedemptionsPerCustomer": 2,
  "expiredBy": "2025-04-02T06:54:51.670Z",
  "startsAt": "2025-02-02T06:54:51.670Z",
  "supportedOfferExternalIds": [
    "bundle1",
    "rollingoffer3"
  ]
}

Response

Coupon created successfully.

namestring

Coupon name.

activeboolean

Whether the coupon is active.

discountPercentagenumber

Discount percentage applied by the coupon.

maxRedemptionsPerCustomerinteger

Maximum number of times a customer can redeem this coupon.

expiredBystring date-time

Expiration date of the coupon.

startsAtstring date-time

Start date of the coupon validity.

supportedOfferExternalIdsstring[]

List of offer external IDs that support this coupon. Empty array means all offers are supported.

firstTimePurchaseboolean

Whether the coupon is only valid for first-time purchases.

allowedPlayersstring[]

List of player IDs allowed to use this coupon. Empty array means all players are allowed.

Example response

{
  "name": "summer26",
  "active": true,
  "discountPercentage": 1,
  "maxRedemptionsPerCustomer": 2,
  "expiredBy": "2025-04-02T06:54:51.670Z",
  "startsAt": "2025-02-02T06:54:51.670Z",
  "supportedOfferExternalIds": [
    "bundle1",
    "rollingoffer3"
  ],
  "allowedPlayers": [
    "player123",
    "player456",
    "player789"
  ]
}