Coupons

Create coupons asynchronously

[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete.

If you want to create less than 20,001 coupons, you can use the Create coupons endpoint.

post/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async

Request

Path parameters

applicationIdinteger required

The ID of the Application. It is displayed in your Talon.One deployment URL.

campaignIdinteger required

The ID of the campaign. It is displayed in your Talon.One deployment URL.

Request body

usageLimitinteger required

The number of times the coupon code can be redeemed. 0 means unlimited redemptions but any campaign usage limits will still apply.

discountLimitnumber

The total discount value that the code can give. Typically used to represent a gift card value.

reservationLimitinteger

The number of reservations that can be made with this coupon code.

startDatestring date-time

Timestamp at which point the coupon becomes valid.

expiryDatestring date-time

Expiration date of the coupon. Coupon never expires if this is omitted.

numberOfCouponsinteger required

The number of new coupon codes to generate for the campaign.

attributesobject required

Arbitrary properties associated with coupons.

isReservationMandatoryboolean

An indication of whether the code can be redeemed only if it has been reserved first.

Example request

{
  "usageLimit": 100,
  "discountLimit": 30,
  "reservationLimit": 45,
  "startDate": "2020-01-24T14:15:22Z",
  "expiryDate": "2023-08-24T14:15:22Z",
  "numberOfCoupons": 200000,
  "couponSettings": {
    "validCharacters": [
      "A",
      "B",
      "C",
      "D",
      "E",
      "F",
      "G",
      "H",
      "I",
      "J",
      "K",
      "L",
      "M",
      "N",
      "O",
      "P",
      "Q",
      "R",
      "S",
      "T",
      "U",
      "V",
      "W",
      "X",
      "Y",
      "Z",
      "0",
      "1",
      "2",
      "3",
      "4",
      "5",
      "6",
      "7",
      "8",
      "9"
    ],
    "couponPattern": "SUMMER-####-####"
  }
}

Response

OK

batchIdstring required

The batch ID that all coupons created by the request will have.

Example response

{
  "batchId": "tqyrgahe"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.