Coupons

Update coupon

[!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 the specified coupon.

[!note] With this PUT endpoint, if you do not explicitly set a value for the startDate, expiryDate, and recipientIntegrationId properties in your request, it is automatically set to null.

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

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.

couponIdstring required

The internal ID of the coupon code. You can find this value in the id property from the List coupons endpoint response.

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.

recipientIntegrationIdstring

The integration ID for this coupon's beneficiary's profile.

attributesobject

Arbitrary properties associated with this item.

isReservationMandatoryboolean

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

implicitlyReservedboolean

An indication of whether the coupon is implicitly reserved for all customers.

Example request

{
  "usageLimit": 100,
  "discountLimit": 30,
  "reservationLimit": 45,
  "startDate": "2020-01-24T14:15:22Z",
  "expiryDate": "2023-08-24T14:15:22Z",
  "limits": [
    {
      "action": "createCoupon",
      "limit": 1000,
      "period": "yearly",
      "entities": [
        "Coupon"
      ]
    }
  ],
  "recipientIntegrationId": "URNGV8294NV"
}

Response

OK

idinteger required

The internal ID of the coupon.

createdstring date-time required

The time the coupon was created.

campaignIdinteger required

The ID of the campaign that owns this entity.

valuestring required

The coupon code.

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.

usageCounterinteger required

The number of times the coupon has been successfully redeemed.

discountCounternumber

The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon.

discountRemaindernumber

The remaining discount this coupon can give.

reservationCounternumber

The number of times this coupon has been reserved.

attributesobject

Custom attributes associated with this coupon.

referralIdinteger

The integration ID of the referring customer (if any) for whom this coupon was created as an effect.

recipientIntegrationIdstring

The Integration ID of the customer that is allowed to redeem this coupon.

importIdinteger

The ID of the Import which created this coupon.

reservationboolean

Defines the reservation type:

  • true: The coupon can be reserved for multiple customers.
  • false: The coupon can be reserved only for one customer. It is a personal code.
batchIdstring

The id of the batch the coupon belongs to.

isReservationMandatoryboolean

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

implicitlyReservedboolean

An indication of whether the coupon is implicitly reserved for all customers.

Example response

{
  "id": 6,
  "created": "2020-06-10T09:05:27.993483Z",
  "campaignId": 211,
  "value": "XMAS-20-2021",
  "usageLimit": 100,
  "discountLimit": 30,
  "reservationLimit": 45,
  "startDate": "2020-01-24T14:15:22Z",
  "expiryDate": "2023-08-24T14:15:22Z",
  "limits": [
    {
      "action": "createCoupon",
      "limit": 1000,
      "period": "yearly",
      "entities": [
        "Coupon"
      ]
    }
  ],
  "usageCounter": 10,
  "discountCounter": 10,
  "discountRemainder": 5,
  "reservationCounter": 1,
  "referralId": 326632952,
  "recipientIntegrationId": "URNGV8294NV",
  "importId": 4,
  "batchId": "32535-43255"
}

Changes

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