Coupons

Update coupons

[!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.

Update all coupons or a specific batch of coupons in the given campaign.

You can find the batchId on the Coupons page of your campaign in the Campaign Manager, or you can use List coupons.

[!note] Note

  • Only send sequential requests to this endpoint.
  • Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team.
  • With this PUT endpoint, if you do not explicitly set a value for the startDate and expiryDate properties in your request, it is automatically set to null.

To update a specific coupon, use Update coupon.

put/v1/applications/{applicationId}/campaigns/{campaignId}/coupons

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

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.

attributesobject

Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see Managing attributes.

Coupon attributes can also be set to mandatory in your Application settings. If your Application uses mandatory attributes, you must use this property to set their value.

batchIDstring

The ID of the batch the coupon(s) belong to.

Example request

{
  "usageLimit": 100,
  "discountLimit": 30,
  "reservationLimit": 45,
  "startDate": "2020-01-24T14:15:22Z",
  "expiryDate": "2023-08-24T14:15:22Z"
}

Response

No Content

Changes

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